Version in base suite: 10.3.18-0+deb10u1 Base version: mariadb-10.3_10.3.18-0+deb10u1 Target version: mariadb-10.3_10.3.22-1+deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/m/mariadb-10.3/mariadb-10.3_10.3.18-0+deb10u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/m/mariadb-10.3/mariadb-10.3_10.3.22-1+deb10u1.dsc /srv/release.debian.org/tmp/3aMEIt4tLu/mariadb-10.3-10.3.22/mysql-test/std_data/binlog_before_20574.bin |binary mariadb-10.3-10.3.22/.clang-format | 2 mariadb-10.3-10.3.22/Docs/INFO_SRC | 10 mariadb-10.3-10.3.22/VERSION | 2 mariadb-10.3-10.3.22/client/mysql.cc | 8 mariadb-10.3-10.3.22/client/mysqldump.c | 11 mariadb-10.3-10.3.22/cmake/cpack_rpm.cmake | 11 mariadb-10.3-10.3.22/cmake/install_layout.cmake | 32 mariadb-10.3-10.3.22/cmake/os/Linux.cmake | 4 mariadb-10.3-10.3.22/cmake/os/Windows.cmake | 7 mariadb-10.3-10.3.22/cmake/sign.cmake.in | 22 mariadb-10.3-10.3.22/dbug/dbug.c | 162 mariadb-10.3-10.3.22/debian/changelog | 18 mariadb-10.3-10.3.22/debian/gitlab-ci.yml | 437 mariadb-10.3-10.3.22/debian/libmariadb3.symbols | 6 mariadb-10.3-10.3.22/debian/patches/Add_default_ExecStartPre_to_mariadb@.service.patch | 19 mariadb-10.3-10.3.22/debian/patches/mips-connect-unaligned.patch | 30 mariadb-10.3-10.3.22/debian/patches/series | 1 mariadb-10.3-10.3.22/debian/salsa-ci.yml | 437 mariadb-10.3-10.3.22/extra/crc32-vpmsum/CMakeLists.txt | 2 mariadb-10.3-10.3.22/extra/innochecksum.cc | 4 mariadb-10.3-10.3.22/extra/mariabackup/CMakeLists.txt | 2 mariadb-10.3-10.3.22/extra/mariabackup/backup_copy.cc | 36 mariadb-10.3-10.3.22/extra/mariabackup/backup_mysql.cc | 43 mariadb-10.3-10.3.22/extra/mariabackup/backup_mysql.h | 3 mariadb-10.3-10.3.22/extra/mariabackup/changed_page_bitmap.cc | 2 mariadb-10.3-10.3.22/extra/mariabackup/fil_cur.cc | 4 mariadb-10.3-10.3.22/extra/mariabackup/innobackupex.cc | 11 mariadb-10.3-10.3.22/extra/mariabackup/xtrabackup.cc | 61 mariadb-10.3-10.3.22/extra/yassl/src/yassl_error.cpp | 4 mariadb-10.3-10.3.22/extra/yassl/taocrypt/include/error.hpp | 4 mariadb-10.3-10.3.22/extra/yassl/taocrypt/src/asn.cpp | 4 mariadb-10.3-10.3.22/include/heap.h | 2 mariadb-10.3-10.3.22/include/intrusive_list.h | 190 mariadb-10.3-10.3.22/include/lf.h | 1 mariadb-10.3-10.3.22/include/my_dbug.h | 10 mariadb-10.3-10.3.22/include/my_global.h | 14 mariadb-10.3-10.3.22/include/my_sys.h | 4 mariadb-10.3-10.3.22/include/mysql/psi/mysql_file.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/mysql_idle.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/mysql_socket.h | 18 mariadb-10.3-10.3.22/include/mysql/psi/mysql_stage.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/mysql_statement.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/mysql_table.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/mysql_thread.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/psi.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v0.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v1.h | 13 mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v2.h | 13 mariadb-10.3-10.3.22/include/mysql/service_wsrep.h | 4 mariadb-10.3-10.3.22/include/source_revision.h | 2 mariadb-10.3-10.3.22/include/sslopt-case.h | 2 mariadb-10.3-10.3.22/libmariadb/CMakeLists.txt | 6 mariadb-10.3-10.3.22/libmariadb/cmake/CheckFunctions.cmake | 1 mariadb-10.3-10.3.22/libmariadb/include/ma_common.h | 1 mariadb-10.3-10.3.22/libmariadb/include/ma_priv.h | 31 mariadb-10.3-10.3.22/libmariadb/include/mariadb_stmt.h | 4 mariadb-10.3-10.3.22/libmariadb/include/mariadb_version.h.in | 2 mariadb-10.3-10.3.22/libmariadb/include/mysql.h | 3 mariadb-10.3-10.3.22/libmariadb/libmariadb/CMakeLists.txt | 11 mariadb-10.3-10.3.22/libmariadb/libmariadb/ma_client_plugin.c.in | 2 mariadb-10.3-10.3.22/libmariadb/libmariadb/ma_pvio.c | 3 mariadb-10.3-10.3.22/libmariadb/libmariadb/mariadb_lib.c | 60 mariadb-10.3-10.3.22/libmariadb/libmariadb/mariadb_stmt.c | 9 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/gnutls.c | 108 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/ma_schannel.c | 673 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/ma_schannel.h | 20 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/openssl.c | 6 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel.c | 213 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel_certs.c | 855 mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel_certs.h | 53 mariadb-10.3-10.3.22/libmariadb/libmariadb/win32_errmsg.c | 132 mariadb-10.3-10.3.22/libmariadb/libmariadb/win32_errmsg.h | 2 mariadb-10.3-10.3.22/libmariadb/plugins/auth/CMakeLists.txt | 2 mariadb-10.3-10.3.22/libmariadb/plugins/auth/caching_sha2_pw.c | 8 mariadb-10.3-10.3.22/libmariadb/plugins/auth/gssapi_errmsg.c | 2 mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/connection.c | 46 mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/ps_bugs.c | 50 mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/ssl.c.in | 40 mariadb-10.3-10.3.22/man/mysql-test-run.pl.1 | 6 mariadb-10.3-10.3.22/mysql-test/collections/10.0-compatible.list | 1 mariadb-10.3-10.3.22/mysql-test/include/binlog_inject_error.inc | 4 mariadb-10.3-10.3.22/mysql-test/include/binlog_parallel_replication_marks.test | 2 mariadb-10.3-10.3.22/mysql-test/include/ctype_utf8_ilseq.inc | 1 mariadb-10.3-10.3.22/mysql-test/include/index_merge1.inc | 52 mariadb-10.3-10.3.22/mysql-test/include/index_merge2.inc | 48 mariadb-10.3-10.3.22/mysql-test/include/index_merge_2sweeps.inc | 24 mariadb-10.3-10.3.22/mysql-test/include/index_merge_ror.inc | 5 mariadb-10.3-10.3.22/mysql-test/include/index_merge_ror_cpk.inc | 12 mariadb-10.3-10.3.22/mysql-test/include/partition_mrr.inc | 46 mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges.inc | 20 mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges_innodb.result | 11 mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges_myisam.result | 11 mariadb-10.3-10.3.22/mysql-test/main/cache_temporal_4265.result | 3 mariadb-10.3-10.3.22/mysql-test/main/cache_temporal_4265.test | 6 mariadb-10.3-10.3.22/mysql-test/main/compare.result | 20 mariadb-10.3-10.3.22/mysql-test/main/compare.test | 14 mariadb-10.3-10.3.22/mysql-test/main/connect_debug.result | 10 mariadb-10.3-10.3.22/mysql-test/main/connect_debug.test | 15 mariadb-10.3-10.3.22/mysql-test/main/create.result | 2 mariadb-10.3-10.3.22/mysql-test/main/create.test | 2 mariadb-10.3-10.3.22/mysql-test/main/create_drop_server.result | 4 mariadb-10.3-10.3.22/mysql-test/main/create_or_replace2.result | 4 mariadb-10.3-10.3.22/mysql-test/main/create_or_replace2.test | 4 mariadb-10.3-10.3.22/mysql-test/main/create_w_max_indexes_128.result | 256 mariadb-10.3-10.3.22/mysql-test/main/cte_nonrecursive.result | 22 mariadb-10.3-10.3.22/mysql-test/main/cte_nonrecursive.test | 20 mariadb-10.3-10.3.22/mysql-test/main/cte_recursive.result | 6 mariadb-10.3-10.3.22/mysql-test/main/ctype_binary.result | 2 mariadb-10.3-10.3.22/mysql-test/main/ctype_cp1251.result | 2 mariadb-10.3-10.3.22/mysql-test/main/ctype_latin1.result | 2 mariadb-10.3-10.3.22/mysql-test/main/ctype_uca.result | 46 mariadb-10.3-10.3.22/mysql-test/main/ctype_uca_innodb.result | 31 mariadb-10.3-10.3.22/mysql-test/main/ctype_ucs.result | 2 mariadb-10.3-10.3.22/mysql-test/main/ctype_utf8.result | 79 mariadb-10.3-10.3.22/mysql-test/main/default_session.result | 28 mariadb-10.3-10.3.22/mysql-test/main/default_session.test | 24 mariadb-10.3-10.3.22/mysql-test/main/delete_use_source.result | 11 mariadb-10.3-10.3.22/mysql-test/main/delete_use_source.test | 3 mariadb-10.3-10.3.22/mysql-test/main/derived_cond_pushdown.result | 30 mariadb-10.3-10.3.22/mysql-test/main/derived_cond_pushdown.test | 28 mariadb-10.3-10.3.22/mysql-test/main/drop_bad_db_type.result | 5 mariadb-10.3-10.3.22/mysql-test/main/drop_bad_db_type.test | 6 mariadb-10.3-10.3.22/mysql-test/main/engine_error_in_alter-8453.result | 5 mariadb-10.3-10.3.22/mysql-test/main/engine_error_in_alter-8453.test | 5 mariadb-10.3-10.3.22/mysql-test/main/error_simulation.result | 11 mariadb-10.3-10.3.22/mysql-test/main/error_simulation.test | 11 mariadb-10.3-10.3.22/mysql-test/main/events_bugs.result | 4 mariadb-10.3-10.3.22/mysql-test/main/events_bugs.test | 4 mariadb-10.3-10.3.22/mysql-test/main/foreign_key.result | 26 mariadb-10.3-10.3.22/mysql-test/main/foreign_key.test | 24 mariadb-10.3-10.3.22/mysql-test/main/func_json.result | 21 mariadb-10.3-10.3.22/mysql-test/main/func_json.test | 17 mariadb-10.3-10.3.22/mysql-test/main/func_math.result | 101 mariadb-10.3-10.3.22/mysql-test/main/func_math.test | 63 mariadb-10.3-10.3.22/mysql-test/main/func_misc.result | 22 mariadb-10.3-10.3.22/mysql-test/main/func_misc.test | 21 mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre.result | 18 mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre.test | 8 mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre_debug.result | 3 mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre_debug.test | 3 mariadb-10.3-10.3.22/mysql-test/main/func_time.result | 19 mariadb-10.3-10.3.22/mysql-test/main/func_time.test | 8 mariadb-10.3-10.3.22/mysql-test/main/group_by.result | 16 mariadb-10.3-10.3.22/mysql-test/main/group_by.test | 14 mariadb-10.3-10.3.22/mysql-test/main/group_min_max.result | 4 mariadb-10.3-10.3.22/mysql-test/main/index_merge_innodb.result | 75 mariadb-10.3-10.3.22/mysql-test/main/index_merge_innodb.test | 52 mariadb-10.3-10.3.22/mysql-test/main/index_merge_myisam.result | 76 mariadb-10.3-10.3.22/mysql-test/main/index_merge_myisam.test | 14 mariadb-10.3-10.3.22/mysql-test/main/information_schema_db.result | 79 mariadb-10.3-10.3.22/mysql-test/main/information_schema_db.test | 44 mariadb-10.3-10.3.22/mysql-test/main/innodb_icp.result | 4 mariadb-10.3-10.3.22/mysql-test/main/insert_debug-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/main/insert_debug.result | 29 mariadb-10.3-10.3.22/mysql-test/main/insert_debug.test | 54 mariadb-10.3-10.3.22/mysql-test/main/join.result | 56 mariadb-10.3-10.3.22/mysql-test/main/join.test | 65 mariadb-10.3-10.3.22/mysql-test/main/join_cache.result | 72 mariadb-10.3-10.3.22/mysql-test/main/join_cache.test | 40 mariadb-10.3-10.3.22/mysql-test/main/log_slow_debug.result | 3 mariadb-10.3-10.3.22/mysql-test/main/log_slow_debug.test | 3 mariadb-10.3-10.3.22/mysql-test/main/mdev6830.result | 2 mariadb-10.3-10.3.22/mysql-test/main/mdev6830.test | 4 mariadb-10.3-10.3.22/mysql-test/main/merge-big.result | 2 mariadb-10.3-10.3.22/mysql-test/main/merge-big.test | 2 mariadb-10.3-10.3.22/mysql-test/main/merge_debug.result | 2 mariadb-10.3-10.3.22/mysql-test/main/merge_debug.test | 2 mariadb-10.3-10.3.22/mysql-test/main/metadata.result | 22 mariadb-10.3-10.3.22/mysql-test/main/myisam.result | 23 mariadb-10.3-10.3.22/mysql-test/main/myisam.test | 19 mariadb-10.3-10.3.22/mysql-test/main/myisam_debug.result | 4 mariadb-10.3-10.3.22/mysql-test/main/myisam_debug.test | 4 mariadb-10.3-10.3.22/mysql-test/main/mysql_tzinfo_to_sql_symlink.result | 20 mariadb-10.3-10.3.22/mysql-test/main/mysqld--help.result | 4 mariadb-10.3-10.3.22/mysql-test/main/opt_tvc.result | 53 mariadb-10.3-10.3.22/mysql-test/main/opt_tvc.test | 31 mariadb-10.3-10.3.22/mysql-test/main/order_by.result | 30 mariadb-10.3-10.3.22/mysql-test/main/order_by.test | 16 mariadb-10.3-10.3.22/mysql-test/main/order_by_innodb.result | 27 mariadb-10.3-10.3.22/mysql-test/main/order_by_innodb.test | 28 mariadb-10.3-10.3.22/mysql-test/main/partition_debug_sync.result | 1 mariadb-10.3-10.3.22/mysql-test/main/partition_debug_sync.test | 3 mariadb-10.3-10.3.22/mysql-test/main/partition_innodb.result | 24 mariadb-10.3-10.3.22/mysql-test/main/partition_innodb.test | 20 mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_aria.result | 79 mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_aria.test | 2 mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_innodb.result | 79 mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_innodb.test | 4 mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_myisam.result | 79 mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_myisam.test | 3 mariadb-10.3-10.3.22/mysql-test/main/partition_pruning.result | 10 mariadb-10.3-10.3.22/mysql-test/main/partition_pruning.test | 13 mariadb-10.3-10.3.22/mysql-test/main/partition_ucs2.result | 13 mariadb-10.3-10.3.22/mysql-test/main/partition_ucs2.test | 19 mariadb-10.3-10.3.22/mysql-test/main/partition_utf8.result | 16 mariadb-10.3-10.3.22/mysql-test/main/partition_utf8.test | 22 mariadb-10.3-10.3.22/mysql-test/main/processlist.result | 7 mariadb-10.3-10.3.22/mysql-test/main/processlist.test | 4 mariadb-10.3-10.3.22/mysql-test/main/processlist_notembedded.result | 12 mariadb-10.3-10.3.22/mysql-test/main/processlist_notembedded.test | 34 mariadb-10.3-10.3.22/mysql-test/main/range.result | 10 mariadb-10.3-10.3.22/mysql-test/main/range_innodb.result | 3 mariadb-10.3-10.3.22/mysql-test/main/range_innodb.test | 3 mariadb-10.3-10.3.22/mysql-test/main/range_interrupted-13751.result | 4 mariadb-10.3-10.3.22/mysql-test/main/range_interrupted-13751.test | 4 mariadb-10.3-10.3.22/mysql-test/main/range_mrr_icp.result | 10 mariadb-10.3-10.3.22/mysql-test/main/range_vs_index_merge.result | 2 mariadb-10.3-10.3.22/mysql-test/main/range_vs_index_merge_innodb.result | 2 mariadb-10.3-10.3.22/mysql-test/main/select_debug.result | 2 mariadb-10.3-10.3.22/mysql-test/main/select_debug.test | 2 mariadb-10.3-10.3.22/mysql-test/main/selectivity.result | 198 mariadb-10.3-10.3.22/mysql-test/main/selectivity.test | 142 mariadb-10.3-10.3.22/mysql-test/main/selectivity_innodb.result | 198 mariadb-10.3-10.3.22/mysql-test/main/show_explain.result | 178 mariadb-10.3-10.3.22/mysql-test/main/show_explain.test | 182 mariadb-10.3-10.3.22/mysql-test/main/show_explain_non_select.result | 8 mariadb-10.3-10.3.22/mysql-test/main/show_explain_non_select.test | 8 mariadb-10.3-10.3.22/mysql-test/main/show_explain_ps.result | 5 mariadb-10.3-10.3.22/mysql-test/main/show_explain_ps.test | 5 mariadb-10.3-10.3.22/mysql-test/main/slowlog_enospace-10508.result | 5 mariadb-10.3-10.3.22/mysql-test/main/slowlog_enospace-10508.test | 5 mariadb-10.3-10.3.22/mysql-test/main/sp-bugs.result | 2 mariadb-10.3-10.3.22/mysql-test/main/sp-bugs.test | 2 mariadb-10.3-10.3.22/mysql-test/main/sp-code.result | 3 mariadb-10.3-10.3.22/mysql-test/main/sp-code.test | 3 mariadb-10.3-10.3.22/mysql-test/main/sp-security.test | 2 mariadb-10.3-10.3.22/mysql-test/main/sp.result | 2 mariadb-10.3-10.3.22/mysql-test/main/sp.test | 2 mariadb-10.3-10.3.22/mysql-test/main/ssl_7937.test | 13 mariadb-10.3-10.3.22/mysql-test/main/ssl_8k_key.test | 3 mariadb-10.3-10.3.22/mysql-test/main/ssl_crl.test | 4 mariadb-10.3-10.3.22/mysql-test/main/ssl_crl_clients.test | 14 mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca,bad.result | 1 mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.combinations | 11 mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.result | 2 mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.test | 22 mariadb-10.3-10.3.22/mysql-test/main/stat_tables-enospc.result | 5 mariadb-10.3-10.3.22/mysql-test/main/stat_tables-enospc.test | 5 mariadb-10.3-10.3.22/mysql-test/main/stat_tables.result | 26 mariadb-10.3-10.3.22/mysql-test/main/stat_tables.test | 27 mariadb-10.3-10.3.22/mysql-test/main/stat_tables_innodb.result | 26 mariadb-10.3-10.3.22/mysql-test/main/subselect_sj.result | 26 mariadb-10.3-10.3.22/mysql-test/main/subselect_sj.test | 26 mariadb-10.3-10.3.22/mysql-test/main/subselect_sj2_mat.result | 14 mariadb-10.3-10.3.22/mysql-test/main/subselect_sj_jcl6.result | 34 mariadb-10.3-10.3.22/mysql-test/main/sum_distinct-big.result | 40 mariadb-10.3-10.3.22/mysql-test/main/sum_distinct-big.test | 48 mariadb-10.3-10.3.22/mysql-test/main/system_mysql_db.result | 4 mariadb-10.3-10.3.22/mysql-test/main/system_mysql_db_fix40123.result | 4 mariadb-10.3-10.3.22/mysql-test/main/table_value_constr.result | 13 mariadb-10.3-10.3.22/mysql-test/main/table_value_constr.test | 10 mariadb-10.3-10.3.22/mysql-test/main/type_bit.test | 2 mariadb-10.3-10.3.22/mysql-test/main/type_datetime.result | 81 mariadb-10.3-10.3.22/mysql-test/main/type_datetime.test | 43 mariadb-10.3-10.3.22/mysql-test/main/type_int.result | 13 mariadb-10.3-10.3.22/mysql-test/main/type_int.test | 12 mariadb-10.3-10.3.22/mysql-test/main/type_newdecimal.result | 64 mariadb-10.3-10.3.22/mysql-test/main/type_newdecimal.test | 43 mariadb-10.3-10.3.22/mysql-test/main/type_time.result | 66 mariadb-10.3-10.3.22/mysql-test/main/type_time.test | 34 mariadb-10.3-10.3.22/mysql-test/main/union_crash-714.result | 4 mariadb-10.3-10.3.22/mysql-test/main/union_crash-714.test | 4 mariadb-10.3-10.3.22/mysql-test/main/uniques_crash-7912.result | 11 mariadb-10.3-10.3.22/mysql-test/main/uniques_crash-7912.test | 26 mariadb-10.3-10.3.22/mysql-test/main/warnings_debug.result | 2 mariadb-10.3-10.3.22/mysql-test/main/warnings_debug.test | 2 mariadb-10.3-10.3.22/mysql-test/main/win.result | 90 mariadb-10.3-10.3.22/mysql-test/main/win.test | 85 mariadb-10.3-10.3.22/mysql-test/mysql-test-run.pl | 202 mariadb-10.3-10.3.22/mysql-test/suite/binlog/include/binlog_index.inc | 4 mariadb-10.3-10.3.22/mysql-test/suite/binlog/include/binlog_ioerr.inc | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_index.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_invalid_read_in_rotate.result | 18 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_ioerr.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result | 55 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_show_binlog_event_random_pos.result | 12 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_write_error.result | 51 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/read_only.result | 128 mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/read_only_statement.result | 128 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.combinations | 5 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.test | 48 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test | 13 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.combinations | 5 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.test | 37 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only.inc | 79 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only_statement.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_index.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_ioerr.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.result | 27 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.test | 46 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_row_annotate.result | 9 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_write_error.result | 51 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/mysqlbinlog.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/mysqlbinlog.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_checksum.result | 11 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_corruption.result | 13 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_incident.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel.result | 18 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result | 50 mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/func_misc.result | 12 mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/sp-goto-debug.result | 236 mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/sp-goto.result | 79 mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/t/sp-goto-debug.test | 178 mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/t/sp-goto.test | 98 mariadb-10.3-10.3.22/mysql-test/suite/encryption/disabled.def | 1 mariadb-10.3-10.3.22/mysql-test/suite/encryption/r/innodb-redo-badkey.result | 7 mariadb-10.3-10.3.22/mysql-test/suite/encryption/t/innodb-redo-badkey.test | 7 mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx.result | 16 mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx.test | 21 mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx_versioning.result | 8 mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx_versioning.test | 7 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_basics_mixed.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_check_constraint.result | 121 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_check_constraints.result | 235 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_is.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_mysql.result | 8 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result | 8 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_tables_mysql.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_basics_mixed.test | 5 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_check_constraint.test | 92 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_check_constraints.test | 103 mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/views/views_master.inc | 2 mariadb-10.3-10.3.22/mysql-test/suite/galera/disabled.def | 33 mariadb-10.3-10.3.22/mysql-test/suite/galera/galera_2nodes.cnf | 11 mariadb-10.3-10.3.22/mysql-test/suite/galera/galera_4nodes.cnf | 4 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-284.result | 11 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-328C.result | 23 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-336.result | 8 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-369.result | 49 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-388.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-402.result | 8 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-44.result | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera#500.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_as_slave_ctas.result | 28 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result | 29 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_events2.result | 123 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_forced_binlog_format.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_gcs_fragment.result | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_gtid.result | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_ist_restart_joiner.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_log_bin.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_partition.result | 424 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_rsu_drop_pk.result | 50 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_shutdown_nonprim.result | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_dirty_reads.result | 7 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_node_address.result | 19 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_notify_cmd.result | 17 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_reject_queries.result | 5 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/galera/r/mysql-wsrep#332.result | 34 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-284.test | 16 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-313-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-313.cnf | 12 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-328B.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-328C.test | 36 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-329-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-329.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-336.test | 16 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-388.test | 8 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-44-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-44.test | 30 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait1-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait8-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait8.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/enforce_storage_engine2.cnf | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/enforce_storage_engine2.opt | 2 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf | 14 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf | 5 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_ctas.test | 75 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf | 6 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test | 65 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_bf_background_statistics.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_checksum.cnf | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_events2.test | 148 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush_local.cnf | 12 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush_local.opt | 3 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_forced_binlog_format.test | 6 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid.test | 8 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_load_data.cnf | 11 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin.test | 5 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_mdev_13787.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_mdev_13787.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_partition.cnf | 18 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_partition.test | 450 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_rsu_drop_pk.test | 28 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sbr_binlog.cnf | 7 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_shutdown_nonprim.test | 36 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf | 2 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_udf-master.opt | 2 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_udf.cnf | 15 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_v1_row_events-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_v1_row_events.cnf | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_dirty_reads.test | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_node_address.test | 22 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf | 13 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd.test | 8 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_reject_queries.test | 6 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_sst_auth.cnf | 12 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_sst_auth.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf | 12 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf | 10 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/mysql-wsrep#201.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/query_cache.cnf | 9 mariadb-10.3-10.3.22/mysql-test/suite/galera/t/query_cache.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result | 72 mariadb-10.3-10.3.22/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test | 112 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff | 14 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff | 13 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff | 13 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/blob-update-debug.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/ibuf_not_empty.result | 5 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/information_schema_grants.result | 304 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-32k-crash.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-64k-crash.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-alter-nullable.result | 19 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-autoinc.result | 24 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result | 36 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-mdev-7513.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-replace-debug.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-wl5522-1.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-wl5522.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug11754376.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug30113362.result | 119 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug56947.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_corrupt_bit.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_stats_persistent.result | 31 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_wl6326.result | 371 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_wl6326_big.result | 449 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter,4k.rdiff | 126 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter.result | 29 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter_bugs.result | 16 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter_debug.result | 18 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result | 30 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result | 45 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/stat_tables.result | 15 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/temporary_table_optimization.result | 18 mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/undo_log.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/alter_algorithm.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/blob-update-debug.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/ibuf_not_empty.test | 62 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/information_schema_grants.opt | 33 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/information_schema_grants.test | 311 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-32k-crash.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-64k-crash.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-alter-nullable.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-autoinc.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test | 41 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-mdev-7513.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-replace-debug.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test | 5 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug11754376.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug30113362.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug30113362.test | 242 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug56947.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_corrupt_bit.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_force_recovery.test | 5 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_stats_persistent.test | 30 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326.test | 506 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326_big.test | 716 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter.test | 22 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter_bugs.test | 21 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter_debug.test | 26 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test | 53 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test | 6 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test | 32 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/stat_tables.test | 17 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/temporary_table_optimization.test | 8 mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/undo_log.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/concurrent_insert.result | 24 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/crash_recovery.result | 44 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result | 19 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result | 33 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/sync_block.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/concurrent_insert.test | 32 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/crash_recovery.test | 55 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test | 49 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test | 27 mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/sync_block.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/r/rtree_debug.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_debug.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_rollback1.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_rollback2.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/bug53591.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/cmp_per_index.result | 33 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/wl5522_zip.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/bug53591.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/cmp_per_index.test | 30 mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/json/r/json_no_table.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/maria/aria_pack_mdev14183.result | 22 mariadb-10.3-10.3.22/mysql-test/suite/maria/aria_pack_mdev14183.test | 23 mariadb-10.3-10.3.22/mysql-test/suite/maria/icp.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/maria/lock.result | 33 mariadb-10.3-10.3.22/mysql-test/suite/maria/lock.test | 46 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/extra_lsndir_stream.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/extra_lsndir_stream.test | 7 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/incremental_backup.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/incremental_backup.test | 63 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test | 20 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/mdev-18438.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/mdev-18438.test | 11 mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/partial.test | 18 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_add.inc | 21 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_change.inc | 25 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_drop.inc | 19 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_exchange.inc | 19 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_add.inc | 21 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_change.inc | 25 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_drop.inc | 19 mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_exchange.inc | 19 mariadb-10.3-10.3.22/mysql-test/suite/parts/r/alter_data_directory_innodb.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug.result | 42 mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug_innodb.result | 169 mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug_myisam.result | 131 mariadb-10.3-10.3.22/mysql-test/suite/parts/r/reorganize_partition_innodb.result | 160 mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug.test | 7 mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug_innodb.test | 7 mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug_myisam.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/parts/t/reorganize_partition_innodb.test | 103 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_peer_addr.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/misc.result | 16 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test | 13 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/dml_esms_by_digest.test | 13 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_peer_addr.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/misc.test | 48 mariadb-10.3-10.3.22/mysql-test/suite/plugins/r/server_audit.result | 26 mariadb-10.3-10.3.22/mysql-test/suite/plugins/t/feedback_plugin_load.test | 6 mariadb-10.3-10.3.22/mysql-test/suite/plugins/t/server_audit.test | 20 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_binlog_errors.inc | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_checksum.inc | 12 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_corruption.inc | 17 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_incident.inc | 6 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_parallel.inc | 20 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc | 112 mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_stop_middle_group.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/circular_serverid0.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/kill_race_condition.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_000011.result | 10 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result | 9 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_bug33931.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_bug41902.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_checksum.result | 11 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_corruption.result | 13 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_incident.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_init_slave_errors.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_ip_mix.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_ip_mix2.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_mdev-11092.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel.result | 18 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result | 50 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_read_only2.result | 53 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_rotate_logs.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_row_big_table_id.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_gtid_reconnect.result | 40 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result | 40 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_show_slave_running.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_skip_error.result | 10 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_stop_slave.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_view_debug.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/circular_serverid0.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/kill_race_condition.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_000011.test | 20 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_binlog_rollback_cleanup.test | 46 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_bug33931.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_bug41902.test | 5 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test | 6 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_ip_mix.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_ip_mix2.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test | 8 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_mdev-11092.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_parallel_ignored_errors.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_read_only2.test | 30 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_rotate_logs.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_big_table_id.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test | 19 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_index_choice.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_gtid_reconnect.test | 74 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test | 87 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_show_slave_running.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_skip_error.test | 14 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_stop_slave.test | 12 mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_view_debug.test | 3 mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/other.result | 91 mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/other.test | 136 mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/rebuild.result | 161 mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/rebuild.test | 20 mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/view.result | 10 mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/view.test | 11 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/debug_dbug_func.result | 50 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result | 20 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result | 6 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/sysvars_innodb.result | 28 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/debug_dbug_func.test | 36 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test | 22 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/init_connect_basic.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/init_slave_basic.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test | 13 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test | 5 mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/timestamp_basic.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/vcol/r/vcol_keys_innodb.result | 15 mariadb-10.3-10.3.22/mysql-test/suite/vcol/t/vcol_keys_innodb.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/vcol/t/vcol_keys_innodb.test | 18 mariadb-10.3-10.3.22/mysql-test/suite/versioning/common.inc | 2 mariadb-10.3-10.3.22/mysql-test/suite/versioning/common_finish.inc | 3 mariadb-10.3-10.3.22/mysql-test/suite/versioning/key_type.combinations | 3 mariadb-10.3-10.3.22/mysql-test/suite/versioning/key_type.inc | 14 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/alter.result | 67 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/create.result | 19 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/delete.result | 21 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/delete_history.result | 131 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/foreign.result | 94 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/online.result | 4 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/partition.result | 67 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/partition_innodb.result | 1 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/replace.result | 10 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/select.result | 49 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/truncate.result | 131 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/trx_id.result | 26 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update-big.result | 2 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update.result | 68 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update2.result | 21 mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/view.result | 151 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/alter.test | 44 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/create.test | 10 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/delete.test | 26 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/delete_history.test | 144 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/engines.combinations | 8 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/foreign.test | 104 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/online.test | 4 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/partition.test | 62 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/partition_innodb.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/replace.test | 17 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/select.test | 44 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/truncate.test | 144 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/trx_id.test | 32 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update-big.test | 2 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update.test | 85 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update2.test | 31 mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/view.test | 108 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/disabled.def | 3 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/my.cnf | 4 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result | 16 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result | 8 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/variables.result | 34 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/alter_table_innodb.cnf | 12 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/alter_table_innodb.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/binlog_format.opt | 2 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mdev_10186.cnf | 15 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mdev_10186.opt | 1 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt | 3 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt | 3 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test | 1 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/pool_of_threads.opt | 2 mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/variables.test | 19 mariadb-10.3-10.3.22/mysql-test/unstable-tests | 984 - mariadb-10.3-10.3.22/mysys/lf_alloc-pin.c | 14 mariadb-10.3-10.3.22/mysys/my_lockmem.c | 1 mariadb-10.3-10.3.22/pcre/ChangeLog | 2 mariadb-10.3-10.3.22/pcre/doc/html/pcredemo.html | 4 mariadb-10.3-10.3.22/pcre/doc/html/pcrejit.html | 2 mariadb-10.3-10.3.22/pcre/doc/pcre.txt | 2 mariadb-10.3-10.3.22/pcre/doc/pcredemo.3 | 4 mariadb-10.3-10.3.22/pcre/doc/pcrejit.3 | 2 mariadb-10.3-10.3.22/pcre/pcre_compile.c | 2 mariadb-10.3-10.3.22/pcre/pcre_internal.h | 2 mariadb-10.3-10.3.22/pcre/pcredemo.c | 4 mariadb-10.3-10.3.22/plugin/auth_pam/CMakeLists.txt | 10 mariadb-10.3-10.3.22/plugin/auth_pam/mapper/user_map.conf | 13 mariadb-10.3-10.3.22/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf | 2 mariadb-10.3-10.3.22/scripts/mysql_install_db.sh | 2 mariadb-10.3-10.3.22/scripts/mysql_system_tables.sql | 2 mariadb-10.3-10.3.22/scripts/mysql_system_tables_data.sql | 2 mariadb-10.3-10.3.22/scripts/mysqlaccess.sh | 2 mariadb-10.3-10.3.22/scripts/mysqld_multi.sh | 7 mariadb-10.3-10.3.22/scripts/mysqld_safe.sh | 13 mariadb-10.3-10.3.22/scripts/wsrep_sst_mariabackup.sh | 11 mariadb-10.3-10.3.22/sql-bench/bench-init.pl.sh | 2 mariadb-10.3-10.3.22/sql-common/client.c | 7 mariadb-10.3-10.3.22/sql-common/client_plugin.c | 13 mariadb-10.3-10.3.22/sql/CMakeLists.txt | 66 mariadb-10.3-10.3.22/sql/derror.cc | 75 mariadb-10.3-10.3.22/sql/events.cc | 40 mariadb-10.3-10.3.22/sql/field.cc | 54 mariadb-10.3-10.3.22/sql/field.h | 7 mariadb-10.3-10.3.22/sql/filesort.cc | 1 mariadb-10.3-10.3.22/sql/ha_partition.cc | 65 mariadb-10.3-10.3.22/sql/ha_partition.h | 33 mariadb-10.3-10.3.22/sql/ha_sequence.cc | 2 mariadb-10.3-10.3.22/sql/handler.cc | 99 mariadb-10.3-10.3.22/sql/handler.h | 29 mariadb-10.3-10.3.22/sql/item.cc | 57 mariadb-10.3-10.3.22/sql/item.h | 9 mariadb-10.3-10.3.22/sql/item_cmpfunc.cc | 6 mariadb-10.3-10.3.22/sql/item_cmpfunc.h | 3 mariadb-10.3-10.3.22/sql/item_func.cc | 27 mariadb-10.3-10.3.22/sql/item_func.h | 20 mariadb-10.3-10.3.22/sql/item_strfunc.cc | 2 mariadb-10.3-10.3.22/sql/item_sum.cc | 22 mariadb-10.3-10.3.22/sql/item_sum.h | 97 mariadb-10.3-10.3.22/sql/item_timefunc.cc | 16 mariadb-10.3-10.3.22/sql/item_timefunc.h | 47 mariadb-10.3-10.3.22/sql/item_windowfunc.h | 164 mariadb-10.3-10.3.22/sql/keycaches.cc | 15 mariadb-10.3-10.3.22/sql/keycaches.h | 7 mariadb-10.3-10.3.22/sql/lex.h | 2 mariadb-10.3-10.3.22/sql/log.cc | 8 mariadb-10.3-10.3.22/sql/log_event.cc | 148 mariadb-10.3-10.3.22/sql/log_event.h | 15 mariadb-10.3-10.3.22/sql/log_event_old.cc | 4 mariadb-10.3-10.3.22/sql/multi_range_read.cc | 33 mariadb-10.3-10.3.22/sql/multi_range_read.h | 5 mariadb-10.3-10.3.22/sql/mysql_upgrade_service.cc | 2 mariadb-10.3-10.3.22/sql/mysqld.cc | 22 mariadb-10.3-10.3.22/sql/mysqld.h | 3 mariadb-10.3-10.3.22/sql/opt_range.cc | 26 mariadb-10.3-10.3.22/sql/opt_subselect.cc | 64 mariadb-10.3-10.3.22/sql/opt_subselect.h | 17 mariadb-10.3-10.3.22/sql/proxy_protocol.cc | 2 mariadb-10.3-10.3.22/sql/rpl_mi.cc | 2 mariadb-10.3-10.3.22/sql/rpl_parallel.cc | 16 mariadb-10.3-10.3.22/sql/rpl_record.cc | 9 mariadb-10.3-10.3.22/sql/rpl_rli.cc | 2 mariadb-10.3-10.3.22/sql/semisync_master.cc | 2 mariadb-10.3-10.3.22/sql/session_tracker.cc | 4 mariadb-10.3-10.3.22/sql/share/errmsg-utf8.txt | 6 mariadb-10.3-10.3.22/sql/slave.cc | 67 mariadb-10.3-10.3.22/sql/sp.cc | 4 mariadb-10.3-10.3.22/sql/sp_cache.cc | 2 mariadb-10.3-10.3.22/sql/sp_head.cc | 101 mariadb-10.3-10.3.22/sql/sp_head.h | 25 mariadb-10.3-10.3.22/sql/sql_acl.cc | 5 mariadb-10.3-10.3.22/sql/sql_admin.cc | 8 mariadb-10.3-10.3.22/sql/sql_audit.h | 22 mariadb-10.3-10.3.22/sql/sql_base.cc | 54 mariadb-10.3-10.3.22/sql/sql_cache.cc | 7 mariadb-10.3-10.3.22/sql/sql_class.cc | 103 mariadb-10.3-10.3.22/sql/sql_class.h | 45 mariadb-10.3-10.3.22/sql/sql_cte.cc | 16 mariadb-10.3-10.3.22/sql/sql_db.cc | 4 mariadb-10.3-10.3.22/sql/sql_delete.cc | 65 mariadb-10.3-10.3.22/sql/sql_derived.cc | 34 mariadb-10.3-10.3.22/sql/sql_insert.cc | 135 mariadb-10.3-10.3.22/sql/sql_join_cache.cc | 2 mariadb-10.3-10.3.22/sql/sql_lex.cc | 14 mariadb-10.3-10.3.22/sql/sql_lex.h | 34 mariadb-10.3-10.3.22/sql/sql_load.cc | 2 mariadb-10.3-10.3.22/sql/sql_parse.cc | 65 mariadb-10.3-10.3.22/sql/sql_partition.cc | 67 mariadb-10.3-10.3.22/sql/sql_partition_admin.cc | 2 mariadb-10.3-10.3.22/sql/sql_prepare.cc | 6 mariadb-10.3-10.3.22/sql/sql_repl.cc | 95 mariadb-10.3-10.3.22/sql/sql_select.cc | 278 mariadb-10.3-10.3.22/sql/sql_select.h | 9 mariadb-10.3-10.3.22/sql/sql_sequence.cc | 7 mariadb-10.3-10.3.22/sql/sql_servers.cc | 4 mariadb-10.3-10.3.22/sql/sql_show.cc | 69 mariadb-10.3-10.3.22/sql/sql_statistics.cc | 160 mariadb-10.3-10.3.22/sql/sql_statistics.h | 3 mariadb-10.3-10.3.22/sql/sql_table.cc | 158 mariadb-10.3-10.3.22/sql/sql_trigger.cc | 2 mariadb-10.3-10.3.22/sql/sql_tvc.cc | 56 mariadb-10.3-10.3.22/sql/sql_type.h | 14 mariadb-10.3-10.3.22/sql/sql_union.cc | 17 mariadb-10.3-10.3.22/sql/sql_update.cc | 41 mariadb-10.3-10.3.22/sql/sql_view.cc | 15 mariadb-10.3-10.3.22/sql/sql_window.cc | 6 mariadb-10.3-10.3.22/sql/sql_yacc.cc | 9531 +++++----- mariadb-10.3-10.3.22/sql/sql_yacc.yy | 103 mariadb-10.3-10.3.22/sql/sql_yacc_ora.cc | 8953 ++++----- mariadb-10.3-10.3.22/sql/sql_yacc_ora.yy | 79 mariadb-10.3-10.3.22/sql/sys_vars.cc | 2 mariadb-10.3-10.3.22/sql/sys_vars.ic | 2 mariadb-10.3-10.3.22/sql/table.cc | 74 mariadb-10.3-10.3.22/sql/table.h | 43 mariadb-10.3-10.3.22/sql/temporary_tables.cc | 7 mariadb-10.3-10.3.22/sql/threadpool_common.cc | 2 mariadb-10.3-10.3.22/sql/threadpool_generic.cc | 2 mariadb-10.3-10.3.22/sql/threadpool_win.cc | 1 mariadb-10.3-10.3.22/sql/tztime.cc | 10 mariadb-10.3-10.3.22/sql/uniques.h | 12 mariadb-10.3-10.3.22/sql/unireg.cc | 3 mariadb-10.3-10.3.22/sql/wsrep_dummy.cc | 4 mariadb-10.3-10.3.22/sql/wsrep_hton.cc | 26 mariadb-10.3-10.3.22/sql/wsrep_mysqld.cc | 94 mariadb-10.3-10.3.22/sql/wsrep_thd.cc | 67 mariadb-10.3-10.3.22/sql/wsrep_thd.h | 2 mariadb-10.3-10.3.22/sql/wsrep_var.cc | 10 mariadb-10.3-10.3.22/storage/connect/CMakeLists.txt | 22 mariadb-10.3-10.3.22/storage/connect/connect.cc | 69 mariadb-10.3-10.3.22/storage/connect/connect.h | 2 mariadb-10.3-10.3.22/storage/connect/filamzip.cpp | 2 mariadb-10.3-10.3.22/storage/connect/filter.h | 1 mariadb-10.3-10.3.22/storage/connect/ha_connect.cc | 74 mariadb-10.3-10.3.22/storage/connect/javaconn.cpp | 2 mariadb-10.3-10.3.22/storage/connect/jdbconn.cpp | 11 mariadb-10.3-10.3.22/storage/connect/mycat.cc | 115 mariadb-10.3-10.3.22/storage/connect/mycat.h | 4 mariadb-10.3-10.3.22/storage/connect/myconn.cpp | 10 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/disabled.def | 1 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/grant.result | 174 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/grant2.result | 258 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/ini_grant.result | 26 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/mysql_grant.result | 24 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/xml2_grant.result | 30 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/xml_grant.result | 30 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant.inc | 30 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant.test | 24 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant2.test | 260 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/ini_grant.result | 89 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/ini_grant.test | 26 mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/mysql_grant.test | 24 mariadb-10.3-10.3.22/storage/connect/plgdbsem.h | 29 mariadb-10.3-10.3.22/storage/connect/reldef.cpp | 280 mariadb-10.3-10.3.22/storage/connect/reldef.h | 9 mariadb-10.3-10.3.22/storage/connect/rest.h | 33 mariadb-10.3-10.3.22/storage/connect/restget.cpp | 42 mariadb-10.3-10.3.22/storage/connect/tabcmg.cpp | 23 mariadb-10.3-10.3.22/storage/connect/tabdos.cpp | 23 mariadb-10.3-10.3.22/storage/connect/tabdos.h | 1 mariadb-10.3-10.3.22/storage/connect/tabfix.cpp | 2 mariadb-10.3-10.3.22/storage/connect/tabfmt.cpp | 5 mariadb-10.3-10.3.22/storage/connect/tabjson.cpp | 44 mariadb-10.3-10.3.22/storage/connect/tabmysql.cpp | 9 mariadb-10.3-10.3.22/storage/connect/tabodbc.cpp | 6 mariadb-10.3-10.3.22/storage/connect/tabrest.cpp | 142 mariadb-10.3-10.3.22/storage/connect/tabrest.h | 21 mariadb-10.3-10.3.22/storage/connect/tabutil.cpp | 16 mariadb-10.3-10.3.22/storage/connect/tabutil.h | 3 mariadb-10.3-10.3.22/storage/connect/tabvct.cpp | 3 mariadb-10.3-10.3.22/storage/connect/tabxml.cpp | 4 mariadb-10.3-10.3.22/storage/connect/valblk.cpp | 4 mariadb-10.3-10.3.22/storage/connect/value.cpp | 583 mariadb-10.3-10.3.22/storage/connect/xindex.cpp | 14 mariadb-10.3-10.3.22/storage/connect/xtable.h | 5 mariadb-10.3-10.3.22/storage/example/ha_example.cc | 4 mariadb-10.3-10.3.22/storage/federatedx/AUTHORS | 2 mariadb-10.3-10.3.22/storage/federatedx/ha_federatedx.cc | 7 mariadb-10.3-10.3.22/storage/heap/_check.c | 27 mariadb-10.3-10.3.22/storage/heap/ha_heap.cc | 4 mariadb-10.3-10.3.22/storage/heap/hp_close.c | 6 mariadb-10.3-10.3.22/storage/innobase/.clang-format | 11 mariadb-10.3-10.3.22/storage/innobase/btr/btr0btr.cc | 405 mariadb-10.3-10.3.22/storage/innobase/btr/btr0bulk.cc | 46 mariadb-10.3-10.3.22/storage/innobase/btr/btr0cur.cc | 433 mariadb-10.3-10.3.22/storage/innobase/btr/btr0defragment.cc | 8 mariadb-10.3-10.3.22/storage/innobase/btr/btr0pcur.cc | 23 mariadb-10.3-10.3.22/storage/innobase/btr/btr0scrub.cc | 12 mariadb-10.3-10.3.22/storage/innobase/btr/btr0sea.cc | 34 mariadb-10.3-10.3.22/storage/innobase/buf/buf0buf.cc | 108 mariadb-10.3-10.3.22/storage/innobase/buf/buf0dblwr.cc | 14 mariadb-10.3-10.3.22/storage/innobase/buf/buf0flu.cc | 9 mariadb-10.3-10.3.22/storage/innobase/buf/buf0rea.cc | 33 mariadb-10.3-10.3.22/storage/innobase/dict/dict0boot.cc | 28 mariadb-10.3-10.3.22/storage/innobase/dict/dict0crea.cc | 84 mariadb-10.3-10.3.22/storage/innobase/dict/dict0defrag_bg.cc | 6 mariadb-10.3-10.3.22/storage/innobase/dict/dict0dict.cc | 261 mariadb-10.3-10.3.22/storage/innobase/dict/dict0load.cc | 41 mariadb-10.3-10.3.22/storage/innobase/dict/dict0mem.cc | 6 mariadb-10.3-10.3.22/storage/innobase/dict/dict0stats.cc | 108 mariadb-10.3-10.3.22/storage/innobase/eval/eval0eval.cc | 295 mariadb-10.3-10.3.22/storage/innobase/fil/fil0crypt.cc | 37 mariadb-10.3-10.3.22/storage/innobase/fil/fil0fil.cc | 133 mariadb-10.3-10.3.22/storage/innobase/fsp/fsp0fsp.cc | 36 mariadb-10.3-10.3.22/storage/innobase/fts/fts0config.cc | 3 mariadb-10.3-10.3.22/storage/innobase/fts/fts0fts.cc | 141 mariadb-10.3-10.3.22/storage/innobase/fts/fts0opt.cc | 169 mariadb-10.3-10.3.22/storage/innobase/fts/fts0sql.cc | 3 mariadb-10.3-10.3.22/storage/innobase/gis/gis0geo.cc | 55 mariadb-10.3-10.3.22/storage/innobase/gis/gis0rtree.cc | 122 mariadb-10.3-10.3.22/storage/innobase/gis/gis0sea.cc | 38 mariadb-10.3-10.3.22/storage/innobase/handler/ha_innodb.cc | 369 mariadb-10.3-10.3.22/storage/innobase/handler/ha_innodb.h | 11 mariadb-10.3-10.3.22/storage/innobase/handler/handler0alter.cc | 113 mariadb-10.3-10.3.22/storage/innobase/ibuf/ibuf0ibuf.cc | 160 mariadb-10.3-10.3.22/storage/innobase/include/btr0btr.h | 127 mariadb-10.3-10.3.22/storage/innobase/include/btr0btr.ic | 65 mariadb-10.3-10.3.22/storage/innobase/include/btr0bulk.h | 5 mariadb-10.3-10.3.22/storage/innobase/include/btr0cur.h | 41 mariadb-10.3-10.3.22/storage/innobase/include/buf0buf.h | 23 mariadb-10.3-10.3.22/storage/innobase/include/buf0buf.ic | 12 mariadb-10.3-10.3.22/storage/innobase/include/buf0flu.h | 10 mariadb-10.3-10.3.22/storage/innobase/include/data0data.h | 2 mariadb-10.3-10.3.22/storage/innobase/include/data0data.ic | 2 mariadb-10.3-10.3.22/storage/innobase/include/dict0crea.h | 20 mariadb-10.3-10.3.22/storage/innobase/include/dict0dict.h | 32 mariadb-10.3-10.3.22/storage/innobase/include/dict0load.h | 7 mariadb-10.3-10.3.22/storage/innobase/include/dict0mem.h | 76 mariadb-10.3-10.3.22/storage/innobase/include/dict0priv.ic | 2 mariadb-10.3-10.3.22/storage/innobase/include/dict0types.h | 4 mariadb-10.3-10.3.22/storage/innobase/include/dyn0buf.h | 96 mariadb-10.3-10.3.22/storage/innobase/include/fil0crypt.h | 4 mariadb-10.3-10.3.22/storage/innobase/include/fil0fil.h | 25 mariadb-10.3-10.3.22/storage/innobase/include/fil0fil.ic | 2 mariadb-10.3-10.3.22/storage/innobase/include/fts0fts.h | 58 mariadb-10.3-10.3.22/storage/innobase/include/fts0opt.h | 3 mariadb-10.3-10.3.22/storage/innobase/include/fts0priv.h | 13 mariadb-10.3-10.3.22/storage/innobase/include/gis0geo.h | 13 mariadb-10.3-10.3.22/storage/innobase/include/gis0rtree.h | 21 mariadb-10.3-10.3.22/storage/innobase/include/gis0rtree.ic | 2 mariadb-10.3-10.3.22/storage/innobase/include/handler0alter.h | 4 mariadb-10.3-10.3.22/storage/innobase/include/ibuf0ibuf.h | 8 mariadb-10.3-10.3.22/storage/innobase/include/lock0lock.h | 12 mariadb-10.3-10.3.22/storage/innobase/include/lock0priv.h | 3 mariadb-10.3-10.3.22/storage/innobase/include/lock0priv.ic | 2 mariadb-10.3-10.3.22/storage/innobase/include/log0log.h | 8 mariadb-10.3-10.3.22/storage/innobase/include/log0recv.h | 15 mariadb-10.3-10.3.22/storage/innobase/include/mem0mem.h | 5 mariadb-10.3-10.3.22/storage/innobase/include/mtr0log.h | 8 mariadb-10.3-10.3.22/storage/innobase/include/mtr0log.ic | 27 mariadb-10.3-10.3.22/storage/innobase/include/mtr0mtr.h | 327 mariadb-10.3-10.3.22/storage/innobase/include/mtr0mtr.ic | 88 mariadb-10.3-10.3.22/storage/innobase/include/mtr0types.h | 19 mariadb-10.3-10.3.22/storage/innobase/include/page0cur.h | 15 mariadb-10.3-10.3.22/storage/innobase/include/page0cur.ic | 4 mariadb-10.3-10.3.22/storage/innobase/include/page0page.h | 53 mariadb-10.3-10.3.22/storage/innobase/include/page0page.ic | 52 mariadb-10.3-10.3.22/storage/innobase/include/page0types.h | 3 mariadb-10.3-10.3.22/storage/innobase/include/page0zip.h | 9 mariadb-10.3-10.3.22/storage/innobase/include/page0zip.ic | 3 mariadb-10.3-10.3.22/storage/innobase/include/pars0grm.h | 158 mariadb-10.3-10.3.22/storage/innobase/include/pars0pars.h | 35 mariadb-10.3-10.3.22/storage/innobase/include/que0que.h | 3 mariadb-10.3-10.3.22/storage/innobase/include/rem0cmp.h | 68 mariadb-10.3-10.3.22/storage/innobase/include/rem0cmp.ic | 35 mariadb-10.3-10.3.22/storage/innobase/include/rem0rec.h | 211 mariadb-10.3-10.3.22/storage/innobase/include/rem0rec.ic | 75 mariadb-10.3-10.3.22/storage/innobase/include/rem0types.h | 4 mariadb-10.3-10.3.22/storage/innobase/include/row0ftsort.h | 3 mariadb-10.3-10.3.22/storage/innobase/include/row0ins.h | 22 mariadb-10.3-10.3.22/storage/innobase/include/row0log.h | 8 mariadb-10.3-10.3.22/storage/innobase/include/row0merge.h | 2 mariadb-10.3-10.3.22/storage/innobase/include/row0row.h | 24 mariadb-10.3-10.3.22/storage/innobase/include/row0row.ic | 8 mariadb-10.3-10.3.22/storage/innobase/include/row0upd.h | 13 mariadb-10.3-10.3.22/storage/innobase/include/row0upd.ic | 2 mariadb-10.3-10.3.22/storage/innobase/include/row0vers.h | 6 mariadb-10.3-10.3.22/storage/innobase/include/srv0srv.h | 21 mariadb-10.3-10.3.22/storage/innobase/include/trx0purge.h | 7 mariadb-10.3-10.3.22/storage/innobase/include/trx0rec.h | 4 mariadb-10.3-10.3.22/storage/innobase/include/trx0trx.h | 9 mariadb-10.3-10.3.22/storage/innobase/include/univ.i | 3 mariadb-10.3-10.3.22/storage/innobase/include/ut0mem.h | 24 mariadb-10.3-10.3.22/storage/innobase/include/ut0new.h | 7 mariadb-10.3-10.3.22/storage/innobase/include/ut0rnd.h | 71 mariadb-10.3-10.3.22/storage/innobase/include/ut0rnd.ic | 70 mariadb-10.3-10.3.22/storage/innobase/include/ut0wqueue.h | 29 mariadb-10.3-10.3.22/storage/innobase/innodb.cmake | 8 mariadb-10.3-10.3.22/storage/innobase/lock/lock0lock.cc | 48 mariadb-10.3-10.3.22/storage/innobase/log/log0log.cc | 12 mariadb-10.3-10.3.22/storage/innobase/log/log0recv.cc | 213 mariadb-10.3-10.3.22/storage/innobase/mem/mem0mem.cc | 13 mariadb-10.3-10.3.22/storage/innobase/mtr/mtr0mtr.cc | 582 mariadb-10.3-10.3.22/storage/innobase/os/os0file.cc | 160 mariadb-10.3-10.3.22/storage/innobase/os/os0proc.cc | 6 mariadb-10.3-10.3.22/storage/innobase/os/os0thread.cc | 10 mariadb-10.3-10.3.22/storage/innobase/page/page0cur.cc | 103 mariadb-10.3-10.3.22/storage/innobase/page/page0page.cc | 173 mariadb-10.3-10.3.22/storage/innobase/page/page0zip.cc | 60 mariadb-10.3-10.3.22/storage/innobase/pars/lexyy.cc | 1160 - mariadb-10.3-10.3.22/storage/innobase/pars/pars0grm.cc | 2116 -- mariadb-10.3-10.3.22/storage/innobase/pars/pars0grm.y | 118 mariadb-10.3-10.3.22/storage/innobase/pars/pars0lex.l | 84 mariadb-10.3-10.3.22/storage/innobase/pars/pars0pars.cc | 144 mariadb-10.3-10.3.22/storage/innobase/rem/rem0cmp.cc | 115 mariadb-10.3-10.3.22/storage/innobase/rem/rem0rec.cc | 160 mariadb-10.3-10.3.22/storage/innobase/row/row0ftsort.cc | 23 mariadb-10.3-10.3.22/storage/innobase/row/row0import.cc | 165 mariadb-10.3-10.3.22/storage/innobase/row/row0ins.cc | 95 mariadb-10.3-10.3.22/storage/innobase/row/row0log.cc | 65 mariadb-10.3-10.3.22/storage/innobase/row/row0merge.cc | 67 mariadb-10.3-10.3.22/storage/innobase/row/row0mysql.cc | 31 mariadb-10.3-10.3.22/storage/innobase/row/row0purge.cc | 55 mariadb-10.3-10.3.22/storage/innobase/row/row0row.cc | 45 mariadb-10.3-10.3.22/storage/innobase/row/row0sel.cc | 70 mariadb-10.3-10.3.22/storage/innobase/row/row0trunc.cc | 221 mariadb-10.3-10.3.22/storage/innobase/row/row0uins.cc | 61 mariadb-10.3-10.3.22/storage/innobase/row/row0umod.cc | 30 mariadb-10.3-10.3.22/storage/innobase/row/row0undo.cc | 4 mariadb-10.3-10.3.22/storage/innobase/row/row0upd.cc | 88 mariadb-10.3-10.3.22/storage/innobase/row/row0vers.cc | 36 mariadb-10.3-10.3.22/storage/innobase/srv/srv0mon.cc | 2 mariadb-10.3-10.3.22/storage/innobase/srv/srv0srv.cc | 87 mariadb-10.3-10.3.22/storage/innobase/srv/srv0start.cc | 2 mariadb-10.3-10.3.22/storage/innobase/sync/sync0debug.cc | 2 mariadb-10.3-10.3.22/storage/innobase/sync/sync0rw.cc | 24 mariadb-10.3-10.3.22/storage/innobase/trx/trx0i_s.cc | 6 mariadb-10.3-10.3.22/storage/innobase/trx/trx0purge.cc | 10 mariadb-10.3-10.3.22/storage/innobase/trx/trx0rec.cc | 65 mariadb-10.3-10.3.22/storage/innobase/trx/trx0rseg.cc | 2 mariadb-10.3-10.3.22/storage/innobase/trx/trx0sys.cc | 2 mariadb-10.3-10.3.22/storage/innobase/trx/trx0trx.cc | 37 mariadb-10.3-10.3.22/storage/innobase/trx/trx0undo.cc | 4 mariadb-10.3-10.3.22/storage/innobase/ut/ut0mem.cc | 50 mariadb-10.3-10.3.22/storage/innobase/ut/ut0rnd.cc | 7 mariadb-10.3-10.3.22/storage/innobase/ut/ut0wqueue.cc | 31 mariadb-10.3-10.3.22/storage/maria/ha_maria.cc | 10 mariadb-10.3-10.3.22/storage/maria/ma_blockrec.c | 6 mariadb-10.3-10.3.22/storage/maria/ma_check.c | 5 mariadb-10.3-10.3.22/storage/maria/ma_close.c | 2 mariadb-10.3-10.3.22/storage/maria/ma_extra.c | 3 mariadb-10.3-10.3.22/storage/maria/ma_key_recover.c | 5 mariadb-10.3-10.3.22/storage/maria/ma_loghandler.c | 31 mariadb-10.3-10.3.22/storage/maria/ma_loghandler.h | 2 mariadb-10.3-10.3.22/storage/maria/ma_packrec.c | 3 mariadb-10.3-10.3.22/storage/maria/ma_recovery.c | 4 mariadb-10.3-10.3.22/storage/maria/ma_recovery.h | 2 mariadb-10.3-10.3.22/storage/maria/ma_recovery_util.c | 11 mariadb-10.3-10.3.22/storage/maria/ma_state.c | 26 mariadb-10.3-10.3.22/storage/maria/maria_chk.c | 3 mariadb-10.3-10.3.22/storage/maria/maria_def.h | 1 mariadb-10.3-10.3.22/storage/maria/maria_pack.c | 16 mariadb-10.3-10.3.22/storage/maria/trnman.c | 2 mariadb-10.3-10.3.22/storage/mroonga/ha_mroonga.hpp | 7 mariadb-10.3-10.3.22/storage/myisam/NEWS | 4 mariadb-10.3-10.3.22/storage/myisam/ft_boolean_search.c | 2 mariadb-10.3-10.3.22/storage/myisam/ha_myisam.cc | 13 mariadb-10.3-10.3.22/storage/myisam/mi_check.c | 13 mariadb-10.3-10.3.22/storage/myisam/mi_create.c | 2 mariadb-10.3-10.3.22/storage/myisam/mi_delete.c | 2 mariadb-10.3-10.3.22/storage/myisam/mi_dynrec.c | 4 mariadb-10.3-10.3.22/storage/myisam/mi_extra.c | 7 mariadb-10.3-10.3.22/storage/myisam/mi_key.c | 2 mariadb-10.3-10.3.22/storage/myisam/mi_locking.c | 2 mariadb-10.3-10.3.22/storage/myisam/mi_packrec.c | 5 mariadb-10.3-10.3.22/storage/myisam/mi_rfirst.c | 2 mariadb-10.3-10.3.22/storage/myisam/mi_search.c | 2 mariadb-10.3-10.3.22/storage/myisam/mi_test_all.sh | 4 mariadb-10.3-10.3.22/storage/myisam/myisamchk.c | 5 mariadb-10.3-10.3.22/storage/myisam/myisamdef.h | 2 mariadb-10.3-10.3.22/storage/myisam/myisamlog.c | 2 mariadb-10.3-10.3.22/storage/myisam/myisampack.c | 4 mariadb-10.3-10.3.22/storage/myisam/sort.c | 2 mariadb-10.3-10.3.22/storage/perfschema/CMakeLists.txt | 15 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_account.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_account.h | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_host.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_host.h | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread.h | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread_connect_attr.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread_connect_attr.h | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_user.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/cursor_by_user.h | 13 mariadb-10.3-10.3.22/storage/perfschema/gen_pfs_lex_token.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/ha_perfschema.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/ha_perfschema.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_account.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_account.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_atomic.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_autosize.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_column_types.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_column_values.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_column_values.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_con_slice.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_con_slice.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_defaults.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_defaults.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_digest.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_digest.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_engine_table.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_engine_table.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events_stages.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events_stages.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events_statements.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events_statements.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events_waits.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_events_waits.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_global.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_global.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_host.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_host.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_instr.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_instr.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_instr_class.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_instr_class.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_lock.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_server.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_server.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_actor.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_actor.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_object.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_object.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_stat.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_timer.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_timer.h | 15 mariadb-10.3-10.3.22/storage/perfschema/pfs_user.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_user.h | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_visitor.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/pfs_visitor.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_accounts.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_accounts.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_all_instr.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_all_instr.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_account_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_account_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_host_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_host_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_thread_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_thread_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_user_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_user_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_global_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esgs_global_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_account_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_account_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_digest.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_digest.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_host_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_host_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_thread_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_thread_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_user_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_user_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_global_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_esms_global_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_stages.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_stages.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_statements.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_statements.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_waits.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_waits.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_waits_summary.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_events_waits_summary.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_account_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_account_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_host_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_host_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_thread_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_thread_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_user_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_user_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_global_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_ews_global_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_file_instances.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_file_instances.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_instance.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_instance.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_helper.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_helper.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_host_cache.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_host_cache.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_hosts.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_hosts.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_os_global_by_type.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_os_global_by_type.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_performance_timers.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_performance_timers.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_session_account_connect_attrs.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_session_account_connect_attrs.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_session_connect.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_session_connect.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_session_connect_attrs.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_session_connect_attrs.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_actors.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_actors.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_consumers.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_consumers.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_instruments.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_instruments.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_objects.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_objects.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_timers.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_setup_timers.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_socket_instances.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_socket_instances.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_event_name.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_event_name.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_instance.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_instance.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_sync_instances.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_sync_instances.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_threads.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_threads.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_index_usage.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_index_usage.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_table.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_table.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_tlws_by_table.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_tlws_by_table.h | 13 mariadb-10.3-10.3.22/storage/perfschema/table_users.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/table_users.h | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/CMakeLists.txt | 15 mariadb-10.3-10.3.22/storage/perfschema/unittest/conf.txt | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_account-oom-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_connect_attr-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_host-oom-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr-oom-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr_class-oom-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr_class-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_misc-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_server_stubs.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_timer-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_user-oom-t.cc | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_pfs_defaults.h | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_pfs_global.h | 13 mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_print_error.h | 13 mariadb-10.3-10.3.22/storage/rocksdb/CMakeLists.txt | 2 mariadb-10.3-10.3.22/storage/rocksdb/build_rocksdb.cmake | 2 mariadb-10.3-10.3.22/storage/rocksdb/ha_rocksdb.cc | 37 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc | 4 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc | 4 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result | 12 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result | 12 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result | 12 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result | 12 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result | 12 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result | 12 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result | 42 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result | 2 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/issue255.result | 16 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result | 6 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result | 119 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result | 8 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/ttl_secondary_read_filtering.result | 1 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/issue255.test | 17 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/lock_rows_not_exist.test | 2 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test | 4 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test | 114 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test | 8 mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test | 3 mariadb-10.3-10.3.22/storage/rocksdb/rdb_datadic.cc | 20 mariadb-10.3-10.3.22/storage/rocksdb/rdb_datadic.h | 18 mariadb-10.3-10.3.22/storage/sequence/mysql-test/sequence/group_by.result | 6 mariadb-10.3-10.3.22/storage/sequence/mysql-test/sequence/group_by.test | 7 mariadb-10.3-10.3.22/storage/sphinx/ha_sphinx.cc | 9 mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/disabled.def | 2 mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/sphinx.result | 20 mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/sphinx.test | 13 mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/suite.pm | 33 mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/union-5539.result | 2 mariadb-10.3-10.3.22/storage/spider/CMakeLists.txt | 3 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/include/select_by_null_deinit.inc | 11 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/include/select_by_null_init.inc | 24 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/r/select_by_null.result | 90 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/t/select_by_null.cnf | 3 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test | 72 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/r/pushdown_not_like.result | 63 mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/t/pushdown_not_like.test | 138 mariadb-10.3-10.3.22/storage/spider/spd_db_include.h | 2 mariadb-10.3-10.3.22/storage/spider/spd_db_mysql.cc | 16 mariadb-10.3-10.3.22/storage/tokudb/CMakeLists.txt | 1 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/DartConfig.cmake | 10 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake | 34 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc | 6 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc | 10 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-flusher.cc | 44 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-internal.h | 21 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-ops.cc | 56 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-ops.h | 4 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-verify.cc | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft.cc | 28 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft.h | 10 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/loader/loader.cc | 4 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/logger/logger.cc | 12 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/node.cc | 18 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/node.h | 21 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/block_table.cc | 4 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc | 12 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/txn/rollback.cc | 4 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/txn/txn.cc | 4 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc | 9 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-coverage-tests.bash | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-drd-tests.bash | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-release-tests.bash | 2 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/tokuvalgrind | 52 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb.cc | 58 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb_db.cc | 8 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb_db.h | 1 mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/tools/tokuftdump.cc | 2 mariadb-10.3-10.3.22/storage/tokudb/ha_tokudb.cc | 7 mariadb-10.3-10.3.22/storage/tokudb/ha_tokudb.h | 3 mariadb-10.3-10.3.22/storage/tokudb/hatoku_cmp.cc | 8 mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result | 4 mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result | 4 mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result | 4 mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/t/type_bit.test | 2 mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb_bugs/r/2970.result | 2 mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result | 168 mariadb-10.3-10.3.22/storage/tokudb/tests/math_test_int.cc | 162 mariadb-10.3-10.3.22/storage/tokudb/tests/math_test_uint.cc | 84 mariadb-10.3-10.3.22/storage/tokudb/tests/sint_test.cc | 1 mariadb-10.3-10.3.22/storage/tokudb/tests/tokudb_buffer_test.cc | 11 mariadb-10.3-10.3.22/storage/tokudb/tests/uint_test.cc | 1 mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test.cc | 9 mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test_uint32.cc | 15 mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test_uint64.cc | 15 mariadb-10.3-10.3.22/storage/tokudb/tokudb_buffer.h | 4 mariadb-10.3-10.3.22/storage/tokudb/tokudb_math.h | 6 mariadb-10.3-10.3.22/storage/tokudb/tokudb_status.h | 4 mariadb-10.3-10.3.22/strings/ctype-simple.c | 21 mariadb-10.3-10.3.22/strings/json_lib.c | 9 mariadb-10.3-10.3.22/strings/my_strtoll10.c | 17 mariadb-10.3-10.3.22/support-files/CMakeLists.txt | 3 mariadb-10.3-10.3.22/support-files/mariadb.service.in | 30 mariadb-10.3-10.3.22/support-files/mariadb@.service.in | 42 mariadb-10.3-10.3.22/support-files/mysql-log-rotate.sh | 10 mariadb-10.3-10.3.22/support-files/rpm/server-postin.sh | 3 mariadb-10.3-10.3.22/support-files/rpm/server-preun.sh | 2 mariadb-10.3-10.3.22/support-files/use_galera_new_cluster.conf | 3 mariadb-10.3-10.3.22/wsrep/wsrep_api.h | 2 mariadb-10.3-10.3.22/wsrep/wsrep_gtid.c | 2 mariadb-10.3-10.3.22/zlib/zlib.h | 2 1471 files changed, 39884 insertions(+), 25679 deletions(-) diff -Nru mariadb-10.3-10.3.18/.clang-format mariadb-10.3-10.3.22/.clang-format --- mariadb-10.3-10.3.18/.clang-format 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/.clang-format 2020-01-26 18:37:27.000000000 +0000 @@ -90,7 +90,7 @@ PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Right ReflowComments: true -SortIncludes: true +SortIncludes: false SortUsingDeclarations: true SpaceAfterCStyleCast: true SpaceAfterLogicalNot: false diff -Nru mariadb-10.3-10.3.18/Docs/INFO_SRC mariadb-10.3-10.3.22/Docs/INFO_SRC --- mariadb-10.3-10.3.18/Docs/INFO_SRC 2019-09-08 16:53:01.000000000 +0000 +++ mariadb-10.3-10.3.22/Docs/INFO_SRC 2020-01-26 18:37:30.000000000 +0000 @@ -1,8 +1,8 @@ -commit: 604f80e77c054758aa449064cdc29dfa13a71922 -date: 2019-09-08 19:49:40 +0300 -build-date: 2019-09-08 16:53:01 +0000 -short: 604f80e +commit: 0152704ae3f857668dbc05803950adcf131b8685 +date: 2020-01-26 20:34:09 +0200 +build-date: 2020-01-26 18:37:30 +0000 +short: 0152704 branch: HEAD -MariaDB source 10.3.18 +MariaDB source 10.3.22 diff -Nru mariadb-10.3-10.3.18/VERSION mariadb-10.3-10.3.22/VERSION --- mariadb-10.3-10.3.18/VERSION 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/VERSION 2020-01-26 18:37:27.000000000 +0000 @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=3 -MYSQL_VERSION_PATCH=18 +MYSQL_VERSION_PATCH=22 SERVER_MATURITY=stable diff -Nru mariadb-10.3-10.3.18/client/mysql.cc mariadb-10.3-10.3.22/client/mysql.cc --- mariadb-10.3-10.3.18/client/mysql.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/client/mysql.cc 2020-01-26 18:37:27.000000000 +0000 @@ -2671,7 +2671,7 @@ static void initialize_readline () { /* Allow conditional parsing of the ~/.inputrc file. */ - rl_readline_name= "mysql"; + rl_readline_name= (char *) "mysql"; rl_terminal_name= getenv("TERM"); /* Tell the completer that we want a crack first. */ @@ -3211,7 +3211,7 @@ com_go(String *buffer,char *line __attribute__((unused))) { char buff[200]; /* about 110 chars used so far */ - char time_buff[53+3+1]; /* time max + space&parens + NUL */ + char time_buff[53+3+1]; /* time max + space & parens + NUL */ MYSQL_RES *result; ulonglong timer; ulong warnings= 0; @@ -3231,7 +3231,7 @@ if (buffer->is_empty()) { - if (status.batch) // Ignore empty quries + if (status.batch) // Ignore empty queries. return 0; return put_info("No query specified\n",INFO_ERROR); @@ -3296,7 +3296,7 @@ else time_buff[0]= '\0'; - /* Every branch must truncate buff . */ + /* Every branch must truncate buff. */ if (result) { if (!mysql_num_rows(result) && ! quick && !column_types_flag) diff -Nru mariadb-10.3-10.3.18/client/mysqldump.c mariadb-10.3-10.3.22/client/mysqldump.c --- mariadb-10.3-10.3.18/client/mysqldump.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/client/mysqldump.c 2020-01-26 18:37:27.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2010, 2017, MariaDB Corporation. + Copyright (c) 2010, 2019, 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 @@ -1081,7 +1081,7 @@ my_progname_short); return(EX_USAGE); } - if (strcmp(default_charset, charset_info->csname) && + if (strcmp(default_charset, MYSQL_AUTODETECT_CHARSET_NAME) && !(charset_info= get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(MY_WME)))) exit(1); @@ -1546,6 +1546,9 @@ char query_buffer[QUERY_LENGTH]; size_t query_length; + if (!strcmp(cs_name, MYSQL_AUTODETECT_CHARSET_NAME)) + cs_name= (char *)my_default_csname(); + /* Server lacks facility. This is not an error, by arbitrary decision . */ if (!server_supports_switching_charsets) return FALSE; @@ -4545,7 +4548,7 @@ /* -View Specific database initalization. +View Specific database initialization. SYNOPSIS init_dumping_views @@ -4562,7 +4565,7 @@ /* -Table Specific database initalization. +Table Specific database initialization. SYNOPSIS init_dumping_tables diff -Nru mariadb-10.3-10.3.18/cmake/cpack_rpm.cmake mariadb-10.3-10.3.22/cmake/cpack_rpm.cmake --- mariadb-10.3-10.3.18/cmake/cpack_rpm.cmake 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/cmake/cpack_rpm.cmake 2020-01-26 18:37:27.000000000 +0000 @@ -100,8 +100,11 @@ "%ignore /etc" "%ignore /etc/init.d" "%ignore /etc/logrotate.d" + "%ignore /etc/security" "%ignore /etc/systemd" "%ignore /etc/systemd/system" + "%ignore /lib" + "%ignore /lib/security" "%ignore ${CMAKE_INSTALL_PREFIX}" "%ignore ${CMAKE_INSTALL_PREFIX}/bin" "%ignore ${CMAKE_INSTALL_PREFIX}/include" @@ -195,7 +198,7 @@ SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES") SET(${p} "${${p}} ${alt} = ${ver} ${alt}%{?_isa} = ${ver} config(${alt}) = ${ver}") SET(o "CPACK_RPM_${real}_PACKAGE_OBSOLETES") - SET(${o} "${${o}} ${alt} ${alt}%{?_isa}") + SET(${o} "${${o}} ${alt}") ENDMACRO(ALTERNATIVE_NAME) ALTERNATIVE_NAME("devel" "mysql-devel") @@ -215,8 +218,9 @@ ALTERNATIVE_NAME("server" "mariadb-server") ALTERNATIVE_NAME("server" "mysql-compat-server") ALTERNATIVE_NAME("test" "mariadb-test") -ELSEIF(RPM MATCHES "(rhel|centos)8") - SET(PYTHON_SHEBANG "/usr/bin/python3") +ENDIF() +IF(RPM MATCHES "fedora31" OR RPM MATCHES "(rhel|centos)8") + SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang") ENDIF() # If we want to build build MariaDB-shared-compat, @@ -249,6 +253,7 @@ STRING(REPLACE "\n" " " compat_provides "${compat_provides}") STRING(REPLACE "\n" " " compat_obsoletes "${compat_obsoletes}") + STRING(REGEX REPLACE "[^ ]+\\([^ ]+ *" "" compat_obsoletes "${compat_obsoletes}") SETA(CPACK_RPM_compat_PACKAGE_PROVIDES "${compat_provides}") SETA(CPACK_RPM_compat_PACKAGE_OBSOLETES "${compat_obsoletes}") diff -Nru mariadb-10.3-10.3.18/cmake/install_layout.cmake mariadb-10.3-10.3.22/cmake/install_layout.cmake --- mariadb-10.3-10.3.18/cmake/install_layout.cmake 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/cmake/install_layout.cmake 2020-01-26 18:37:27.000000000 +0000 @@ -139,11 +139,10 @@ # IF(CMAKE_SIZEOF_VOID_P EQUAL 8) SET(INSTALL_LIBDIR_RPM "lib64") - SET(INSTALL_PLUGINDIR_RPM "lib64/mysql/plugin") ELSE() SET(INSTALL_LIBDIR_RPM "lib") - SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin") ENDIF() +SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin") # SET(INSTALL_INCLUDEDIR_RPM "include/mysql") # @@ -164,6 +163,7 @@ SET(INSTALL_SYSTEMD_UNITDIR_RPM "/usr/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_RPM "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_RPM "/usr/lib/tmpfiles.d") +SET(INSTALL_PAMDIR_RPM "/lib/security") # # DEB layout @@ -196,6 +196,11 @@ SET(INSTALL_SYSTEMD_UNITDIR_DEB "/lib/systemd/system") SET(INSTALL_SYSTEMD_SYSUSERSDIR_DEB "/usr/lib/sysusers.d") SET(INSTALL_SYSTEMD_TMPFILESDIR_DEB "/usr/lib/tmpfiles.d") +IF(CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(INSTALL_PAMDIR_DEB "/lib/x86_64-linux-gnu/security") +ELSE() + SET(INSTALL_PAMDIR_DEB "/lib/i386-linux-gnu/security") +ENDIF() # # SVR4 layout @@ -235,17 +240,18 @@ # Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR # will be defined as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE # layout is chosen) -FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN SYSCONF SYSCONF2 - INFO MYSQLTEST SQLBENCH DOCREADME SUPPORTFILES MYSQLDATA UNIX_ADDR - SYSTEMD_UNIT SYSTEMD_SYSUSERS SYSTEMD_TMPFILES) - SET(INSTALL_${var}DIR ${INSTALL_${var}DIR_${INSTALL_LAYOUT}} - CACHE STRING "${var} installation directory" ${FORCE}) - MARK_AS_ADVANCED(INSTALL_${var}DIR) - - IF(IS_ABSOLUTE ${INSTALL_${var}DIR}) - SET(INSTALL_${var}DIRABS ${INSTALL_${var}DIR}) - ELSE() - SET(INSTALL_${var}DIRABS "${CMAKE_INSTALL_PREFIX}/${INSTALL_${var}DIR}") +GET_CMAKE_PROPERTY(ALL_VARS VARIABLES) +FOREACH (V ${ALL_VARS}) + IF (V MATCHES "^(INSTALL_([A-Z_0-9]+)DIR)_${INSTALL_LAYOUT}$") + SET(var ${CMAKE_MATCH_1}) + SET(${var} "${${V}}" CACHE STRING "${CMAKE_MATCH_2} installation directory" ${FORCE}) + MARK_AS_ADVANCED(${var}) + + IF(IS_ABSOLUTE "${${var}}") + SET(${var}ABS "${${var}}") + ELSE() + SET(${var}ABS "${CMAKE_INSTALL_PREFIX}/${${var}}") + ENDIF() ENDIF() ENDFOREACH() diff -Nru mariadb-10.3-10.3.18/cmake/os/Linux.cmake mariadb-10.3-10.3.22/cmake/os/Linux.cmake --- mariadb-10.3-10.3.18/cmake/os/Linux.cmake 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/cmake/os/Linux.cmake 2020-01-26 18:37:27.000000000 +0000 @@ -26,9 +26,9 @@ # Fix CMake (< 2.8) flags. -rdynamic exports too many symbols. FOREACH(LANG C CXX) - STRING(REPLACE "-rdynamic" "" + STRING(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS - ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS} + "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}" ) ENDFOREACH() diff -Nru mariadb-10.3-10.3.18/cmake/os/Windows.cmake mariadb-10.3-10.3.22/cmake/os/Windows.cmake --- mariadb-10.3-10.3.18/cmake/os/Windows.cmake 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/cmake/os/Windows.cmake 2020-01-26 18:37:27.000000000 +0000 @@ -196,11 +196,18 @@ IF(MYSQL_MAINTAINER_MODE MATCHES "ERR") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") + FOREACH(type EXE SHARED MODULE) + FOREACH(cfg RELEASE DEBUG RELWITHDEBINFO) + SET(CMAKE_${type}_LINKER_FLAGS_${cfg} "${CMAKE_${type}_LINKER_FLAGS_${cfg}} /WX") + ENDFOREACH() + ENDFOREACH() ENDIF() IF(MSVC_VERSION LESS 1910) # Noisy warning C4800: 'type': forcing value to bool 'true' or 'false' (performance warning), # removed in VS2017 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800") + ELSEIF (NOT (CMAKE_CXX_COMPILER_ID MATCHES Clang)) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2OptimizeHugeFunctions") ENDIF() ENDIF() diff -Nru mariadb-10.3-10.3.18/cmake/sign.cmake.in mariadb-10.3-10.3.22/cmake/sign.cmake.in --- mariadb-10.3-10.3.18/cmake/sign.cmake.in 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/cmake/sign.cmake.in 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,31 @@ +# If timestamping is used, it can (rarely) fail, when public timestamping service has issues. +# +# To handle the error gracefully and tranparently, we'll retry the signtool command, +# second time without "/t URL" parameter +SET(SIGNTOOL_PARAMETERS_NO_TIMESTAMP "@SIGNTOOL_PARAMETERS@") +LIST(FIND SIGNTOOL_PARAMETERS_NO_TIMESTAMP /t idx) +IF(NOT(idx EQUAL -1)) + LIST(REMOVE_AT SIGNTOOL_PARAMETERS_NO_TIMESTAMP ${idx}) + #remove the URL following /t , as well + LIST(REMOVE_AT SIGNTOOL_PARAMETERS_NO_TIMESTAMP ${idx}) +ENDIF() + +GET_FILENAME_COMPONENT(SIGNTOOL_DIR "@SIGNTOOL_EXECUTABLE@" DIRECTORY) +GET_FILENAME_COMPONENT(SIGNTOOL_NAME "@SIGNTOOL_EXECUTABLE@" NAME) + FILE(GLOB_RECURSE files "@CMAKE_BINARY_DIR@/*.signme") MESSAGE(STATUS "signing files") + + FOREACH(f ${files}) STRING(REPLACE ".signme" "" exe_location "${f}") string (REPLACE ";" " " params "@SIGNTOOL_PARAMETERS@") - #MESSAGE("@SIGNTOOL_EXECUTABLE@" sign ${params} "${exe_location}") EXECUTE_PROCESS(COMMAND - "@SIGNTOOL_EXECUTABLE@" sign @SIGNTOOL_PARAMETERS@ "${exe_location}" + cmd /c "${SIGNTOOL_NAME}" sign @SIGNTOOL_PARAMETERS@ "${exe_location}" 2>NUL + || "${SIGNTOOL_NAME}" sign ${SIGNTOOL_PARAMETERS_NO_TIMESTAMP} "${exe_location}" + WORKING_DIRECTORY ${SIGNTOOL_DIR} RESULT_VARIABLE ERR) IF(NOT ${ERR} EQUAL 0) MESSAGE( "Error ${ERR} signing ${exe_location}") diff -Nru mariadb-10.3-10.3.18/dbug/dbug.c mariadb-10.3-10.3.22/dbug/dbug.c --- mariadb-10.3-10.3.18/dbug/dbug.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/dbug/dbug.c 2020-01-26 18:37:27.000000000 +0000 @@ -225,11 +225,8 @@ const char *file; /* Name of current user file */ struct _db_stack_frame_ *framep; /* Pointer to current frame */ struct settings *stack; /* debugging settings */ - const char *jmpfunc; /* Remember current function for setjmp */ - const char *jmpfile; /* Remember current file for setjmp */ int lineno; /* Current debugger output line number */ uint level; /* Current function nesting level */ - int jmplevel; /* Remember nesting level at setjmp() */ /* * The following variables are used to hold the state information @@ -327,8 +324,36 @@ */ #include +/* +** Protects writing to all file descriptors, init_settings.keywords +** pointer and it's pointee - a linked list with keywords. +*/ static pthread_mutex_t THR_LOCK_dbug; +static void LockMutex(CODE_STATE *cs) +{ + if (!cs->locked) + pthread_mutex_lock(&THR_LOCK_dbug); + cs->locked++; +} +static void UnlockMutex(CODE_STATE *cs) +{ + --cs->locked; + assert(cs->locked >= 0); + if (cs->locked == 0) + pthread_mutex_unlock(&THR_LOCK_dbug); +} +static void LockIfInitSettings(CODE_STATE *cs) +{ + if (cs->stack == &init_settings) + LockMutex(cs); +} +static void UnlockIfInitSettings(CODE_STATE *cs) +{ + if (cs->stack == &init_settings) + UnlockMutex(cs); +} + static CODE_STATE *code_state(void) { CODE_STATE *cs, **cs_ptr; @@ -456,16 +481,9 @@ const char *end; int rel, f_used=0; struct settings *stack; - int org_cs_locked; stack= cs->stack; - if (!(org_cs_locked= cs->locked)) - { - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked= 1; - } - if (control[0] == '-' && control[1] == '#') control+=2; @@ -479,7 +497,9 @@ stack->sub_level= 0; stack->out_file= sstderr; stack->functions= NULL; + LockIfInitSettings(cs); stack->keywords= NULL; + UnlockIfInitSettings(cs); stack->processes= NULL; } else if (!stack->out_file) @@ -495,7 +515,9 @@ { /* never share with the global parent - it can change under your feet */ stack->functions= ListCopy(init_settings.functions); + LockMutex(cs); stack->keywords= ListCopy(init_settings.keywords); + UnlockMutex(cs); stack->processes= ListCopy(init_settings.processes); } else @@ -519,21 +541,31 @@ case 'd': if (sign < 0 && control == end) { + LockIfInitSettings(cs); if (!is_shared(stack, keywords)) FreeList(stack->keywords); stack->keywords=NULL; + UnlockIfInitSettings(cs); stack->flags &= ~DEBUG_ON; break; } + LockIfInitSettings(cs); if (rel && is_shared(stack, keywords)) stack->keywords= ListCopy(stack->keywords); + UnlockIfInitSettings(cs); if (sign < 0) { if (DEBUGGING) + { + LockIfInitSettings(cs); stack->keywords= ListDel(stack->keywords, control, end); + UnlockIfInitSettings(cs); + } break; } + LockIfInitSettings(cs); stack->keywords= ListAdd(stack->keywords, control, end); + UnlockIfInitSettings(cs); stack->flags |= DEBUG_ON; break; case 'D': @@ -668,11 +700,6 @@ control=end+1; end= DbugStrTok(control); } - if (!org_cs_locked) - { - cs->locked= 0; - pthread_mutex_unlock(&THR_LOCK_dbug); - } return !rel || f_used; } @@ -1005,7 +1032,9 @@ get_code_state_if_not_set_or_return *buf=0; + LockIfInitSettings(cs); op_list_to_buf('d', cs->stack->keywords, DEBUGGING); + UnlockIfInitSettings(cs); op_int_to_buf ('D', cs->stack->delay, 0); op_list_to_buf('f', cs->stack->functions, cs->stack->functions); op_bool_to_buf('F', cs->stack->flags & FILE_ON); @@ -1100,7 +1129,6 @@ void _db_enter_(const char *_func_, const char *_file_, uint _line_, struct _db_stack_frame_ *_stack_frame_) { - int save_errno, org_cs_locked; CODE_STATE *cs; if (!((cs=code_state()))) { @@ -1108,7 +1136,6 @@ _stack_frame_->prev= 0; return; } - save_errno= errno; _stack_frame_->line= -1; _stack_frame_->func= cs->func; @@ -1129,20 +1156,14 @@ cs->stack->flags &= ~SANITY_CHECK_ON; if (TRACING) { - if (!(org_cs_locked= cs->locked)) - { - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked= 1; - } + int save_errno= errno; + LockMutex(cs); DoPrefix(cs, _line_); Indent(cs, cs->level); (void) fprintf(cs->stack->out_file->file, ">%s\n", cs->func); - DbugFlush(cs); /* This does a unlock */ - if (!org_cs_locked) - { - cs->locked= 0; - pthread_mutex_unlock(&THR_LOCK_dbug); - } + UnlockMutex(cs); + DbugFlush(cs); + errno=save_errno; } break; case DISABLE_TRACE: @@ -1151,7 +1172,6 @@ case DONT_TRACE: break; } - errno=save_errno; } /* @@ -1176,7 +1196,6 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_) { - int save_errno=errno; uint _slevel_= _stack_frame_->level & ~TRACE_ON; CODE_STATE *cs; get_code_state_or_return; @@ -1193,25 +1212,18 @@ if (DoTrace(cs) & DO_TRACE) { - int org_cs_locked; if ((cs->stack->flags & SANITY_CHECK_ON) && (*dbug_sanity)()) cs->stack->flags &= ~SANITY_CHECK_ON; if (TRACING) { - if (!(org_cs_locked= cs->locked)) - { - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked= 1; - } + int save_errno=errno; + LockMutex(cs); DoPrefix(cs, _stack_frame_->line); Indent(cs, cs->level); (void) fprintf(cs->stack->out_file->file, "<%s\n", cs->func); + UnlockMutex(cs); DbugFlush(cs); - if (!org_cs_locked) - { - cs->locked= 0; - pthread_mutex_unlock(&THR_LOCK_dbug); - } + errno=save_errno; } } /* @@ -1223,7 +1235,6 @@ cs->file= _stack_frame_->file; if (cs->framep != NULL) cs->framep= cs->framep->prev; - errno=save_errno; } @@ -1288,18 +1299,14 @@ { va_list args; CODE_STATE *cs; - int save_errno, org_cs_locked; + int save_errno; get_code_state_or_return; va_start(args,format); - if (!(org_cs_locked= cs->locked)) - { - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked= 1; - } save_errno=errno; + LockMutex(cs); DoPrefix(cs, cs->u_line); if (TRACING) Indent(cs, cs->level + 1); @@ -1307,12 +1314,8 @@ (void) fprintf(cs->stack->out_file->file, "%s: ", cs->func); (void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword); DbugVfprintf(cs->stack->out_file->file, format, args); + UnlockMutex(cs); DbugFlush(cs); - if (!org_cs_locked) - { - cs->locked= 0; - pthread_mutex_unlock(&THR_LOCK_dbug); - } errno=save_errno; va_end(args); @@ -1352,17 +1355,13 @@ void _db_dump_(uint _line_, const char *keyword, const unsigned char *memory, size_t length) { - int pos, org_cs_locked; + int pos; CODE_STATE *cs; get_code_state_or_return; - if (!(org_cs_locked= cs->locked)) - { - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked= 1; - } if (_db_keyword_(cs, keyword, 0)) { + LockMutex(cs); DoPrefix(cs, _line_); if (TRACING) { @@ -1390,13 +1389,9 @@ fputc(' ',cs->stack->out_file->file); } (void) fputc('\n',cs->stack->out_file->file); + UnlockMutex(cs); DbugFlush(cs); } - if (!org_cs_locked) - { - cs->locked= 0; - pthread_mutex_unlock(&THR_LOCK_dbug); - } } @@ -1624,8 +1619,13 @@ static void FreeState(CODE_STATE *cs, int free_state) { struct settings *state= cs->stack; + LockIfInitSettings(cs); if (!is_shared(state, keywords)) + { FreeList(state->keywords); + state->keywords= NULL; + } + UnlockIfInitSettings(cs); if (!is_shared(state, functions)) FreeList(state->functions); if (!is_shared(state, processes)) @@ -1704,8 +1704,6 @@ static int DoTrace(CODE_STATE *cs) { int res= DONT_TRACE; - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); if ((cs->stack->maxdepth == 0 || cs->level <= cs->stack->maxdepth) && InList(cs->stack->processes, cs->process, 0) & (MATCHED|INCLUDE)) { @@ -1730,8 +1728,6 @@ break; } } - if (!cs->locked) - pthread_mutex_unlock(&THR_LOCK_dbug); return res; } @@ -1771,11 +1767,9 @@ if (!(DEBUGGING && (DoTrace(cs) & DO_TRACE))) return 0; - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); + LockIfInitSettings(cs); res= (InList(cs->stack->keywords, keyword, strict) & match); - if (!cs->locked) - pthread_mutex_unlock(&THR_LOCK_dbug); + UnlockIfInitSettings(cs); return res != 0; } @@ -2002,16 +1996,16 @@ sFILE *fp; if (!cs || !cs->stack || !cs->stack->out_file) return; - if (!cs->locked) - pthread_mutex_lock(&THR_LOCK_dbug); fp= cs->stack->out_file; if (--fp->used == 0) { if (fclose(fp->file) == EOF) { + LockMutex(cs); (void) fprintf(stderr, ERR_CLOSE, cs->process); perror(""); + UnlockMutex(cs); } else { @@ -2019,8 +2013,6 @@ } } cs->stack->out_file= new_value; - if (!cs->locked) - pthread_mutex_unlock(&THR_LOCK_dbug); } @@ -2203,9 +2195,7 @@ get_code_state_or_return; if (DEBUGGING) { - pthread_mutex_lock(&THR_LOCK_dbug); (void) fflush(cs->stack->out_file->file); - pthread_mutex_unlock(&THR_LOCK_dbug); } } @@ -2233,16 +2223,14 @@ { CODE_STATE *cs; get_code_state_or_return; - pthread_mutex_lock(&THR_LOCK_dbug); - cs->locked=1; + LockMutex(cs); } void _db_unlock_file_() { CODE_STATE *cs; get_code_state_or_return; - cs->locked=0; - pthread_mutex_unlock(&THR_LOCK_dbug); + UnlockMutex(cs); } const char* _db_get_func_(void) @@ -2258,6 +2246,16 @@ return 0; } +extern my_bool my_assert; +ATTRIBUTE_COLD +my_bool _db_my_assert(const char *file, int line, const char *msg) +{ + my_bool a = my_assert; + _db_flush_(); + if (!a) + fprintf(stderr, "%s:%d: assert: %s\n", file, line, msg); + return a; +} #else /* diff -Nru mariadb-10.3-10.3.18/debian/changelog mariadb-10.3-10.3.22/debian/changelog --- mariadb-10.3-10.3.18/debian/changelog 2019-09-16 16:30:57.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/changelog 2020-01-30 08:18:37.000000000 +0000 @@ -1,3 +1,21 @@ +mariadb-10.3 (1:10.3.22-1+deb10u1) buster; urgency=high + + * SECURITY UPDATE: New upstream version 10.3.22. Includes fixes for the + following security vulnerabilities: + - CVE-2020-2574 + * Includes new upstream version 10.3.21 + - Drop systemd service patch applied upstream + - Update symbols to match latest libmariadb_3 + * Previous release 10.3.20 includes fix for the regression introduced + in the 10.3.19 release: + - MDEV-20987: InnoDB fails to start when FTS table has FK relation + * Previous release 10.3.19 includes fixes for the following security + vulnerabilities: + - CVE-2019-2938 + - CVE-2019-2974 + + -- Otto Kekäläinen Thu, 30 Jan 2020 10:18:37 +0200 + mariadb-10.3 (1:10.3.18-0+deb10u1) buster; urgency=high * New upstream version 10.3.18. Fixes regression introduced in 10.3.17 diff -Nru mariadb-10.3-10.3.18/debian/gitlab-ci.yml mariadb-10.3-10.3.22/debian/gitlab-ci.yml --- mariadb-10.3-10.3.18/debian/gitlab-ci.yml 2019-09-16 16:28:36.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,437 +0,0 @@ -# Inlude Salsa-CI as a base -include: - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml - - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml - -# Overridfe Salsa-CI with MariaDB specific variations -variables: - DEB_BUILD_OPTIONS: "nocheck noautodbgsym" - RELEASE: buster - SALSA_CI_DISABLE_REPROTEST: 1 - -stages: - - build - - test quality - - upgrade in Buster - - upgrade from Stretch/Jessie - - test extras - - test # Stage referenced by Salsa-CI template reprotest stanza, so must exist - - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used - -build: - extends: .build-package - script: - # salsa-ci-team/pipeline#104 - - rm -rf '$CI_PROJECT_DIR' - # salsa-ci-team/pipeline#107 - - rm -rf ${CI_PROJECT_DIR}/debian/output/.ccache - - mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR} - - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} - - gbp pull --ignore-branch --pristine-tar --track-missing - - | - mkdir -p ${WORKING_DIR} - # Check if we can obtain the orig from the git branches - if ! gbp export-orig --pristine-tar --tarball-dir=${WORKING_DIR}; then - # Fallback using origtargz - origtargz -dt - mv ../*.orig.* ${WORKING_DIR} - fi - - gbp buildpackage --git-ignore-branch --git-ignore-new --git-no-create-orig --git-overlay --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh ${SALSA_CI_IMAGES_DOCKERBUILDER}" | (head -n 5000 ; echo "==== Output supressed to avoid hitting Gitlab-CI 4 MB log limit ===="; tail -n 5000) - - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} - -# Backports build not here as we cannot build MariaDB 10.3 backport for Stretch -# due to unmet build dependencies. - -lintian: - extends: .test-lintian - stage: test quality - -autopkgtest: - extends: .test-autopkgtest - stage: test quality - dependencies: - - build - -piuparts: - extends: .test-piuparts - stage: test extras - -blhc: - extends: .test-blhc - stage: test extras - dependencies: - - build - -# In addition to Salsa-CI, also run these fully MariaDB specific build jobs - -fresh install: - stage: test quality - dependencies: - - build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - apt-get update - # Install MariaDB built in this commit - - apt-get install -y ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version - - service mysql status - - mkdir -p debug # Ensure dir exists before using it - - find /var/lib/mysql -ls > debug/var-lib-mysql.list - - cp -ra /etc/mysql debug/etc-mysql - - cp -ra /var/log/mysql debug/var-log-mysql - - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version - - echo 'SHOW DATABASES;' | mariadb # List databases - - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works - variables: - GIT_STRATEGY: none - -mariadb-10.3.x to mariadb-10.3.y upgrade: - stage: upgrade in Buster - dependencies: - - build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - apt-get update - # Install almost everything currently in Debian Buster - - apt-get install -y 'default-mysql*' 'mariadb-*' libmariadb3 'libmariadb-*' 'libmariadbd*' 'libmariadbclient-*' - # Verify installation of MariaDB currently in Debian Buster - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status - - mariadb --skip-column-names -e "select @@version, @@version_comment" - - echo 'SHOW DATABASES;' | mysql - # Install MariaDB built in this commit - - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version - - service mysql status - - mkdir -p debug # Ensure dir exists before using it - - find /var/lib/mysql -ls > debug/var-lib-mysql.list - - cp -ra /etc/mysql debug/etc-mysql - - cp -ra /var/log/mysql debug/var-log-mysql - - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version - - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there - - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works - variables: - GIT_STRATEGY: none - -mariadb-10.1 to mariadb-10.3 upgrade: - stage: upgrade from Stretch/Jessie - dependencies: - - build - image: debian:stretch - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - apt-get update - # Install almost everything currently in Debian Stretch - - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' - # Verify installation of MariaDB from Stretch - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status - - mysql --skip-column-names -e "select @@version, @@version_comment" - - echo 'SHOW DATABASES;' | mysql - # Install MariaDB built in this commit - - sed 's/stretch/buster/g' -i /etc/apt/sources.list # Enable next Debian release - - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version - - service mysql status - - mkdir -p debug # Ensure dir exists before using it - - find /var/lib/mysql -ls > debug/var-lib-mysql.list - - cp -ra /etc/mysql debug/etc-mysql - - cp -ra /var/log/mysql debug/var-log-mysql - - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version - - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there - - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works - variables: - GIT_STRATEGY: none - -test basic features: - stage: test quality - dependencies: - - build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - apt-get update - # Install MariaDB built in this commit - - apt-get install -y ./*.deb - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version - - service mysql status - - mkdir -p debug # Ensure dir exists before using it - - find /var/lib/mysql -ls > debug/var-lib-mysql.list - - cp -ra /etc/mysql debug/etc-mysql - - cp -ra /var/log/mysql debug/var-log-mysql - - echo 'SHOW DATABASES;' | mariadb # List databases - # Print info about server - - mariadb --skip-column-names -e "select @@version, @@version_comment" - - mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort - - mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library" - # Test various features - - mariadb -e "CREATE DATABASE db" - - mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" - - mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" - - mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" - - mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" - - mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" - - mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" - - mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge" - - mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1" - # Test that the features still work (this step can be done e.g. after an upgrade) - - mariadb -e "SHOW TABLES IN db" - - mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" - - mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" - - mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" - - mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" - - mariadb -e "SELECT COUNT(*) FROM db.v_merge" - - mariadb -e "SELECT COUNT(*) FROM db.v_temptable" - - mariadb -e "CALL db.p()" - - mariadb -e "SELECT db.f()" - variables: - GIT_STRATEGY: none - -# Build a piece of software that was designed for libmysqlclient-dev but using the -# libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time. -build mariadbclient consumer Python-MySQLdb: - stage: test quality - dependencies: - - build - image: debian:${RELEASE} - script: - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - mkdir -p debug # Ensure dir exists before using it - - apt-get update - - apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb - - pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with - - apt-get install -y python3-pip - - pip3 install mysqlclient # Compiles module against libmysqlclient - - apt-get purge -y libmariadb-dev # Not needed for run-time - - python3 -c "import MySQLdb; print(MySQLdb.get_client_info())" - variables: - GIT_STRATEGY: none - -libmysql* to libmariadb* upgrade: - stage: test extras - dependencies: - - build - image: debian:unstable - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - dpkg -l | grep -iE 'maria|mysql|galera' || true - - apt-get update - # Install all libmysql* available in Debian unstable - - apt-get install -y pkg-config libmysqld-dev libmysqlclient-dev - - pkg-config --list-all - - pkg-config --cflags mysqlclient # mysqlclient.pc from original package - - apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb - - pkg-config --list-all - - apt-get install -y ./libmariadb-dev_*.deb - - pkg-config --list-all - - apt-get install -y ./libmariadb-dev-compat_*.deb - - pkg-config --cflags mysqlclient # mysqlclient.pc from compat package - - pkg-config --list-all - - apt-get install -y ./libmariadbd19_*.deb - - pkg-config --list-all - - apt-get install -y ./libmariadbd-dev_*.deb - - pkg-config --list-all - - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev - - ldconfig -p # | grep -e mariadb -e mysql - - pkg-config --list-all - - pkg-config --cflags --libs mysqlclient - - pkg-config --cflags --libs libmariadb - - pkg-config --cflags --libs mariadb - -default-libmysqlclient-dev upgrade: - stage: upgrade in Buster - dependencies: - - build - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - dpkg -l | grep -iE 'maria|mysql|galera' || true - - apt-get update - - apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev - - pkg-config --list-all - - apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - - ldconfig -p # | grep -e mariadb -e mysql - - pkg-config --list-all - - pkg-config --cflags --libs mysqlclient - - pkg-config --cflags --libs libmariadb - - pkg-config --cflags --libs mariadb - -default-libmysqlclient-dev on stretch upgrade: - stage: upgrade from Stretch/Jessie - dependencies: - - build - image: debian:stretch - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - dpkg -l | grep -iE 'maria|mysql|galera' || true - - apt-get update - - apt-get install -y pkg-config default-libmysqlclient-dev - - pkg-config --list-all - - echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list - - apt-get update; apt-get install -y apt # Uprade minimal stack first - - apt-get install -y ./libmariadb3_*.deb ./libmariadbclient-dev_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - - ldconfig -p # | grep -e mariadb -e mysql - - pkg-config --list-all - - pkg-config --cflags --libs mysqlclient - - pkg-config --cflags --libs libmariadb - - pkg-config --cflags --libs mariadb - -mariadb-connector-c on stretch upgrade: - stage: upgrade from Stretch/Jessie - dependencies: - - build - image: debian:stretch - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - dpkg -l | grep -iE 'maria|mysql|galera' || true - - apt-get update - - apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat - - pkg-config --list-all - - echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list - - apt-get update; apt-get install -y apt # Uprade minimal stack first - - apt-get install -y ./libmariadb3_*.deb ./libmariadbclient-dev_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb - - ldconfig -p # | grep -e mariadb -e mysql - - pkg-config --list-all - - pkg-config --cflags --libs mysqlclient - - pkg-config --cflags --libs libmariadb - - pkg-config --cflags --libs mariadb - -mysql-5.5 to mariadb-10.3 upgrade: - stage: upgrade from Stretch/Jessie - dependencies: - - build - image: debian:jessie - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - apt-get update - - apt-get install -y mysql-server - # Verify installation of MySQL from Jessie - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status - - mysql --skip-column-names -e "select @@version, @@version_comment" - - echo 'SHOW DATABASES;' | mysql - # Install MariaDB built in this commit - - sed 's/jessie/buster/g' -i /etc/apt/sources.list # Enable next Debian release - - apt-get update; apt-get install -y apt || true # Install apt 1.4.9 so the wildcard command below works - - apt-get dist-upgrade -y || true # Upgrade all to avoid udev/systemd failures - - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version - - service mysql status - - mkdir -p debug # Ensure dir exists before using it - - find /var/lib/mysql -ls > debug/var-lib-mysql.list - - cp -ra /etc/mysql debug/etc-mysql - - cp -ra /var/log/mysql debug/var-log-mysql - - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version - - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there - - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works - variables: - GIT_STRATEGY: none - allow_failure: true -# Temporairly allow failure in the test above since there seems to be a bug in udev -# upgrades that are not related to MariaDB: -# Starting hotplug events dispatcher: systemd-udevdstart-stop-daemon: unrecognized option '--notify-await' - -# Upgrading from MySQL 5.7 involves automatic renaming of auth_socket plugin -# to unix_socket and automaticly re-adding Password column in user table. -mysql-5.7 to mariadb-10.3 upgrade: - stage: test extras - dependencies: - - build - image: debian:sid - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts - - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output - - apt-get update - - apt-get install -y mysql-server - # Verify installation of MySQL from Sid - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status - - mysql --skip-column-names -e "SELECT @@version, @@version_comment" - - mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql - - mysql -e "SELECT * FROM plugin;" mysql - - echo 'SHOW DATABASES;' | mysql - # Install MariaDB built in this commit - - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected - # Verify installation of MariaDB built in this commit - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - mariadb --version # Client version - - service mysql status - - mkdir -p debug # Ensure dir exists before using it - - find /var/lib/mysql -ls > debug/var-lib-mysql.list - - cp -ra /etc/mysql debug/etc-mysql - - cp -ra /var/log/mysql debug/var-log-mysql - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - - mysql --skip-column-names -e "SELECT @@version, @@version_comment" - - mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql - - mysql -e "SELECT * FROM plugin;" mysql - - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there - - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works - variables: - GIT_STRATEGY: none diff -Nru mariadb-10.3-10.3.18/debian/libmariadb3.symbols mariadb-10.3-10.3.22/debian/libmariadb3.symbols --- mariadb-10.3-10.3.18/debian/libmariadb3.symbols 2019-08-24 13:46:49.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/libmariadb3.symbols 2020-01-29 05:38:16.000000000 +0000 @@ -115,10 +115,8 @@ mysql_get_socket@libmysqlclient_18 3.0.0 mysql_get_ssl_cipher@libmariadbclient_18 3.0.0 mysql_get_ssl_cipher@libmysqlclient_18 3.0.0 - mysql_get_timeout_value@libmariadbclient_18 3.0.0 - mysql_get_timeout_value@libmysqlclient_18 3.0.0 - mysql_get_timeout_value_ms@libmariadbclient_18 3.0.0 - mysql_get_timeout_value_ms@libmysqlclient_18 3.0.0 + mysql_get_timeout_value@libmariadb_3 3.0.19 + mysql_get_timeout_value_ms@libmariadb_3 3.0.19 mysql_hex_string@libmariadbclient_18 3.0.0 mysql_hex_string@libmysqlclient_18 3.0.0 mysql_info@libmariadbclient_18 3.0.0 diff -Nru mariadb-10.3-10.3.18/debian/patches/Add_default_ExecStartPre_to_mariadb@.service.patch mariadb-10.3-10.3.22/debian/patches/Add_default_ExecStartPre_to_mariadb@.service.patch --- mariadb-10.3-10.3.18/debian/patches/Add_default_ExecStartPre_to_mariadb@.service.patch 2019-08-03 18:44:00.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/patches/Add_default_ExecStartPre_to_mariadb@.service.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -From: Debian MySQL Maintainers -Date: Thu, 10 Aug 2017 20:40:30 +0200 -Subject: Add_default_ExecStartPre_to_mariadb@.service - ---- - support-files/mariadb@.service.in | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/support-files/mariadb@.service.in -+++ b/support-files/mariadb@.service.in -@@ -67,6 +67,8 @@ ProtectHome=true - # Execute pre and post scripts as root, otherwise it does it as User= - PermissionsStartOnly=true - -+@SYSTEMD_EXECSTARTPRE@ -+ - # Perform automatic wsrep recovery. When server is started without wsrep, - # galera_recovery simply returns an empty string. In any case, however, - # the script is not expected to return with a non-zero status. diff -Nru mariadb-10.3-10.3.18/debian/patches/mips-connect-unaligned.patch mariadb-10.3-10.3.22/debian/patches/mips-connect-unaligned.patch --- mariadb-10.3-10.3.18/debian/patches/mips-connect-unaligned.patch 2019-08-24 13:46:49.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/patches/mips-connect-unaligned.patch 2020-01-29 05:38:16.000000000 +0000 @@ -9,7 +9,7 @@ --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp -@@ -266,14 +266,14 @@ bool TYPBLK::Init(PGLOBAL g, bool +@@ -268,14 +268,14 @@ bool TYPBLK::Init(PGLOBAL g, bool template char *TYPBLK::GetCharString(char *p, int n) { @@ -26,7 +26,7 @@ return p; } // end of GetCharString -@@ -289,7 +289,7 @@ void TYPBLK::SetValue(PVAL valp, i +@@ -291,7 +291,7 @@ void TYPBLK::SetValue(PVAL valp, i ChkTyp(valp); if (!(b = valp->IsNull())) @@ -35,7 +35,7 @@ else Reset(n); -@@ -351,9 +351,9 @@ void TYPBLK::SetValue(PCSZ p, int +@@ -353,9 +353,9 @@ void TYPBLK::SetValue(PCSZ p, int ulonglong val = CharToNumber(p, strlen(p), maxval, Unsigned, &minus); if (minus && val < maxval) @@ -47,7 +47,7 @@ SetNull(n, false); } // end of SetValue -@@ -396,7 +396,7 @@ void TYPBLK::SetValue(PCSZ p, in +@@ -398,7 +398,7 @@ void TYPBLK::SetValue(PCSZ p, in throw Type; } // endif Check @@ -56,7 +56,7 @@ SetNull(n, false); } // end of SetValue -@@ -428,7 +428,7 @@ void TYPBLK::SetValue(PVBLK pv, in +@@ -430,7 +430,7 @@ void TYPBLK::SetValue(PVBLK pv, in ChkTyp(pv); if (!(b = pv->IsNull(n2) && Nullable)) @@ -65,7 +65,7 @@ else Reset(n1); -@@ -479,10 +479,10 @@ void TYPBLK::SetMin(PVAL valp, int +@@ -481,10 +481,10 @@ void TYPBLK::SetMin(PVAL valp, int { CheckParms(valp, n) TYPE tval = GetTypedValue(valp); @@ -78,7 +78,7 @@ } // end of SetMin -@@ -494,10 +494,10 @@ void TYPBLK::SetMax(PVAL valp, int +@@ -496,10 +496,10 @@ void TYPBLK::SetMax(PVAL valp, int { CheckParms(valp, n) TYPE tval = GetTypedValue(valp); @@ -91,7 +91,7 @@ } // end of SetMax -@@ -511,8 +511,7 @@ void TYPBLK::SetValues(PVBLK pv, i +@@ -513,8 +513,7 @@ void TYPBLK::SetValues(PVBLK pv, i CheckType(pv) TYPE *lp = ((TYPBLK*)pv)->Typp; @@ -101,7 +101,7 @@ } // end of SetValues #endif // 0 -@@ -523,7 +522,7 @@ void TYPBLK::SetValues(PVBLK pv, i +@@ -525,7 +524,7 @@ void TYPBLK::SetValues(PVBLK pv, i template void TYPBLK::Move(int i, int j) { @@ -110,7 +110,7 @@ MoveNull(i, j); } // end of Move -@@ -537,7 +536,7 @@ int TYPBLK::CompVal(PVAL vp, int n +@@ -539,7 +538,7 @@ int TYPBLK::CompVal(PVAL vp, int n ChkIndx(n); ChkTyp(vp); #endif // _DEBUG @@ -119,7 +119,7 @@ TYPE vlv = GetTypedValue(vp); return (vlv > mlv) ? 1 : (vlv < mlv) ? (-1) : 0; -@@ -549,8 +548,8 @@ int TYPBLK::CompVal(PVAL vp, int n +@@ -551,8 +550,8 @@ int TYPBLK::CompVal(PVAL vp, int n template int TYPBLK::CompVal(int i1, int i2) { @@ -130,7 +130,7 @@ return (lv1 > lv2) ? 1 : (lv1 < lv2) ? (-1) : 0; } // end of CompVal -@@ -587,7 +586,7 @@ int TYPBLK::Find(PVAL vp) +@@ -589,7 +588,7 @@ int TYPBLK::Find(PVAL vp) TYPE n = GetTypedValue(vp); for (i = 0; i < Nval; i++) @@ -139,7 +139,7 @@ break; return (i < Nval) ? i : (-1); -@@ -603,7 +602,7 @@ int TYPBLK::GetMaxLength(void) +@@ -605,7 +604,7 @@ int TYPBLK::GetMaxLength(void) int i, n, m; for (i = n = 0; i < Nval; i++) { @@ -148,7 +148,7 @@ n = MY_MAX(n, m); } // endfor i -@@ -1333,7 +1332,7 @@ char *DATBLK::GetCharString(char *p, int +@@ -1335,7 +1334,7 @@ char *DATBLK::GetCharString(char *p, int char *vp; if (Dvalp) { @@ -157,7 +157,7 @@ vp = Dvalp->GetCharString(p); } else vp = TYPBLK::GetCharString(p, n); -@@ -1349,7 +1348,7 @@ void DATBLK::SetValue(PCSZ p, int n) +@@ -1351,7 +1350,7 @@ void DATBLK::SetValue(PCSZ p, int n) if (Dvalp) { // Decode the string according to format Dvalp->SetValue_psz(p); diff -Nru mariadb-10.3-10.3.18/debian/patches/series mariadb-10.3-10.3.22/debian/patches/series --- mariadb-10.3-10.3.18/debian/patches/series 2019-08-24 13:46:49.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/patches/series 2020-01-30 08:06:52.000000000 +0000 @@ -7,7 +7,6 @@ c11_atomics.patch kFreeBSD-gettid.patch mytop-merge_src:mytop_improvements.patch -Add_default_ExecStartPre_to_mariadb@.service.patch 0024-Revert-to-using-system-pcre-library.patch 0025-Change-the-default-optimization-from-O3-to-O2-in-mys.patch hurd.patch diff -Nru mariadb-10.3-10.3.18/debian/salsa-ci.yml mariadb-10.3-10.3.22/debian/salsa-ci.yml --- mariadb-10.3-10.3.18/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/debian/salsa-ci.yml 2020-01-30 08:06:52.000000000 +0000 @@ -0,0 +1,437 @@ +# Inlude Salsa-CI as a base +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +# Overridfe Salsa-CI with MariaDB specific variations +variables: + DEB_BUILD_OPTIONS: "nocheck noautodbgsym" + RELEASE: buster + SALSA_CI_DISABLE_REPROTEST: 1 + +stages: + - build + - test quality + - upgrade in Buster + - upgrade from Stretch/Jessie + - test extras + - test # Stage referenced by Salsa-CI template reprotest stanza, so must exist + - publish # Stage referenced by Salsa-CI template aptly stanza, so must exist even though not used + +build: + extends: .build-package + script: + # salsa-ci-team/pipeline#104 + - rm -rf '$CI_PROJECT_DIR' + # salsa-ci-team/pipeline#107 + - rm -rf ${CI_PROJECT_DIR}/debian/output/.ccache + - mkdir -p ${WORKING_DIR} ${CCACHE_WORK_DIR} + - mv ${CCACHE_WORK_DIR} ${CCACHE_TMP_DIR} + - gbp pull --ignore-branch --pristine-tar --track-missing + - | + mkdir -p ${WORKING_DIR} + # Check if we can obtain the orig from the git branches + if ! gbp export-orig --pristine-tar --tarball-dir=${WORKING_DIR}; then + # Fallback using origtargz + origtargz -dt + mv ../*.orig.* ${WORKING_DIR} + fi + - gbp buildpackage --git-ignore-branch --git-ignore-new --git-no-create-orig --git-overlay --git-export-dir=${WORKING_DIR} --git-builder="docker-build.sh ${SALSA_CI_IMAGES_DOCKERBUILDER}" | (head -n 5000 ; echo "==== Output supressed to avoid hitting Gitlab-CI 4 MB log limit ===="; tail -n 5000) + - mv ${CCACHE_TMP_DIR} ${CCACHE_WORK_DIR} + +# Backports build not here as we cannot build MariaDB 10.3 backport for Stretch +# due to unmet build dependencies. + +lintian: + extends: .test-lintian + stage: test quality + +autopkgtest: + extends: .test-autopkgtest + stage: test quality + dependencies: + - build + +piuparts: + extends: .test-piuparts + stage: test extras + +blhc: + extends: .test-blhc + stage: test extras + dependencies: + - build + +# In addition to Salsa-CI, also run these fully MariaDB specific build jobs + +fresh install: + stage: test quality + dependencies: + - build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - apt-get update + # Install MariaDB built in this commit + - apt-get install -y ./*.deb + # Verify installation of MariaDB built in this commit + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - mariadb --version # Client version + - service mysql status + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + +mariadb-10.3.x to mariadb-10.3.y upgrade: + stage: upgrade in Buster + dependencies: + - build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - apt-get update + # Install almost everything currently in Debian Buster + - apt-get install -y 'default-mysql*' 'mariadb-*' libmariadb3 'libmariadb-*' 'libmariadbd*' 'libmariadbclient-*' + # Verify installation of MariaDB currently in Debian Buster + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mariadb --skip-column-names -e "select @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # Verify installation of MariaDB built in this commit + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - mariadb --version # Client version + - service mysql status + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + +mariadb-10.1 to mariadb-10.3 upgrade: + stage: upgrade from Stretch/Jessie + dependencies: + - build + image: debian:stretch + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - apt-get update + # Install almost everything currently in Debian Stretch + - apt-get install -y 'default-mysql*' 'mariadb-*' 'libmariadbd*' 'libmariadbclient*' + # Verify installation of MariaDB from Stretch + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mysql --skip-column-names -e "select @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - sed 's/stretch/buster/g' -i /etc/apt/sources.list # Enable next Debian release + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # Verify installation of MariaDB built in this commit + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - mariadb --version # Client version + - service mysql status + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + +test basic features: + stage: test quality + dependencies: + - build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - apt-get update + # Install MariaDB built in this commit + - apt-get install -y ./*.deb + # Verify installation of MariaDB built in this commit + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - mariadb --version # Client version + - service mysql status + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - echo 'SHOW DATABASES;' | mariadb # List databases + # Print info about server + - mariadb --skip-column-names -e "select @@version, @@version_comment" + - mariadb --skip-column-names -e "select engine, support, transactions, savepoints from information_schema.engines order by engine" | sort + - mariadb --skip-column-names -e "select plugin_name, plugin_status, plugin_type, plugin_library, plugin_license from information_schema.all_plugins order by plugin_name, plugin_library" + # Test various features + - mariadb -e "CREATE DATABASE db" + - mariadb -e "CREATE TABLE db.t_innodb(a1 SERIAL, c1 CHAR(8)) ENGINE=InnoDB; INSERT INTO db.t_innodb VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE TABLE db.t_myisam(a2 SERIAL, c2 CHAR(8)) ENGINE=MyISAM; INSERT INTO db.t_myisam VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE TABLE db.t_aria(a3 SERIAL, c3 CHAR(8)) ENGINE=Aria; INSERT INTO db.t_aria VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE TABLE db.t_memory(a4 SERIAL, c4 CHAR(8)) ENGINE=MEMORY; INSERT INTO db.t_memory VALUES (1,'"'"'foo'"'"'),(2,'"'"'bar'"'"')" + - mariadb -e "CREATE ALGORITHM=MERGE VIEW db.v_merge AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" + - mariadb -e "CREATE ALGORITHM=TEMPTABLE VIEW db.v_temptable AS SELECT * FROM db.t_innodb, db.t_myisam, db.t_aria" + - mariadb -e "CREATE PROCEDURE db.p() SELECT * FROM db.v_merge" + - mariadb -e "CREATE FUNCTION db.f() RETURNS INT DETERMINISTIC RETURN 1" + # Test that the features still work (this step can be done e.g. after an upgrade) + - mariadb -e "SHOW TABLES IN db" + - mariadb -e "SELECT * FROM db.t_innodb; INSERT INTO db.t_innodb VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT * FROM db.t_myisam; INSERT INTO db.t_myisam VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT * FROM db.t_aria; INSERT INTO db.t_aria VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT * FROM db.t_memory; INSERT INTO db.t_memory VALUES (3,'"'"'foo'"'"'),(4,'"'"'bar'"'"')" + - mariadb -e "SELECT COUNT(*) FROM db.v_merge" + - mariadb -e "SELECT COUNT(*) FROM db.v_temptable" + - mariadb -e "CALL db.p()" + - mariadb -e "SELECT db.f()" + variables: + GIT_STRATEGY: none + +# Build a piece of software that was designed for libmysqlclient-dev but using the +# libmariadb-dev-compat layer. Should always end up using libmariadb.so.3 run-time. +build mariadbclient consumer Python-MySQLdb: + stage: test quality + dependencies: + - build + image: debian:${RELEASE} + script: + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - mkdir -p debug # Ensure dir exists before using it + - apt-get update + - apt-get install -y pkg-config ./libmariadb-dev*.deb ./libmariadb3_*.deb ./mariadb-common*.deb + - pkg-config --cflags --libs mysqlclient # See what MySQLdb builds with + - apt-get install -y python3-pip + - pip3 install mysqlclient # Compiles module against libmysqlclient + - apt-get purge -y libmariadb-dev # Not needed for run-time + - python3 -c "import MySQLdb; print(MySQLdb.get_client_info())" + variables: + GIT_STRATEGY: none + +libmysql* to libmariadb* upgrade: + stage: test extras + dependencies: + - build + image: debian:unstable + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - dpkg -l | grep -iE 'maria|mysql|galera' || true + - apt-get update + # Install all libmysql* available in Debian unstable + - apt-get install -y pkg-config libmysqld-dev libmysqlclient-dev + - pkg-config --list-all + - pkg-config --cflags mysqlclient # mysqlclient.pc from original package + - apt-get install -y ./libmariadb3_*.deb ./mariadb-common_*.deb + - pkg-config --list-all + - apt-get install -y ./libmariadb-dev_*.deb + - pkg-config --list-all + - apt-get install -y ./libmariadb-dev-compat_*.deb + - pkg-config --cflags mysqlclient # mysqlclient.pc from compat package + - pkg-config --list-all + - apt-get install -y ./libmariadbd19_*.deb + - pkg-config --list-all + - apt-get install -y ./libmariadbd-dev_*.deb + - pkg-config --list-all + - apt-get install -y default-libmysqlclient-dev default-libmysqld-dev + - ldconfig -p # | grep -e mariadb -e mysql + - pkg-config --list-all + - pkg-config --cflags --libs mysqlclient + - pkg-config --cflags --libs libmariadb + - pkg-config --cflags --libs mariadb + +default-libmysqlclient-dev upgrade: + stage: upgrade in Buster + dependencies: + - build + image: debian:${RELEASE} + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - dpkg -l | grep -iE 'maria|mysql|galera' || true + - apt-get update + - apt-get install -y pkg-config default-libmysqlclient-dev default-libmysqld-dev + - pkg-config --list-all + - apt-get install -y ./libmariadb3_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb + - ldconfig -p # | grep -e mariadb -e mysql + - pkg-config --list-all + - pkg-config --cflags --libs mysqlclient + - pkg-config --cflags --libs libmariadb + - pkg-config --cflags --libs mariadb + +default-libmysqlclient-dev on stretch upgrade: + stage: upgrade from Stretch/Jessie + dependencies: + - build + image: debian:stretch + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - dpkg -l | grep -iE 'maria|mysql|galera' || true + - apt-get update + - apt-get install -y pkg-config default-libmysqlclient-dev + - pkg-config --list-all + - echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list + - apt-get update; apt-get install -y apt # Uprade minimal stack first + - apt-get install -y ./libmariadb3_*.deb ./libmariadbclient-dev_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb + - ldconfig -p # | grep -e mariadb -e mysql + - pkg-config --list-all + - pkg-config --cflags --libs mysqlclient + - pkg-config --cflags --libs libmariadb + - pkg-config --cflags --libs mariadb + +mariadb-connector-c on stretch upgrade: + stage: upgrade from Stretch/Jessie + dependencies: + - build + image: debian:stretch + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - dpkg -l | grep -iE 'maria|mysql|galera' || true + - apt-get update + - apt-get install -y pkg-config libmariadb2 libmariadb-dev libmariadb-dev-compat + - pkg-config --list-all + - echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list + - apt-get update; apt-get install -y apt # Uprade minimal stack first + - apt-get install -y ./libmariadb3_*.deb ./libmariadbclient-dev_*.deb ./libmariadb-dev_*.deb ./libmariadb-dev-compat_*.deb ./libmariadbd19_*.deb ./libmariadbd-dev_*.deb ./mariadb-common_*.deb + - ldconfig -p # | grep -e mariadb -e mysql + - pkg-config --list-all + - pkg-config --cflags --libs mysqlclient + - pkg-config --cflags --libs libmariadb + - pkg-config --cflags --libs mariadb + +mysql-5.5 to mariadb-10.3 upgrade: + stage: upgrade from Stretch/Jessie + dependencies: + - build + image: debian:jessie + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - apt-get update + - apt-get install -y mysql-server + # Verify installation of MySQL from Jessie + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mysql --skip-column-names -e "select @@version, @@version_comment" + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - sed 's/jessie/buster/g' -i /etc/apt/sources.list # Enable next Debian release + - apt-get update; apt-get install -y apt || true # Install apt 1.4.9 so the wildcard command below works + - apt-get dist-upgrade -y || true # Upgrade all to avoid udev/systemd failures + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # Verify installation of MariaDB built in this commit + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - mariadb --version # Client version + - service mysql status + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - mariadb --skip-column-names -e "select @@version, @@version_comment" # Show version + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none + allow_failure: true +# Temporairly allow failure in the test above since there seems to be a bug in udev +# upgrades that are not related to MariaDB: +# Starting hotplug events dispatcher: systemd-udevdstart-stop-daemon: unrecognized option '--notify-await' + +# Upgrading from MySQL 5.7 involves automatic renaming of auth_socket plugin +# to unix_socket and automaticly re-adding Password column in user table. +mysql-5.7 to mariadb-10.3 upgrade: + stage: test extras + dependencies: + - build + image: debian:sid + artifacts: + when: always + name: "$CI_BUILD_NAME" + paths: + - ${WORKING_DIR}/debug + script: + - sed -i "s/101/0/g" -i /usr/sbin/policy-rc.d # Enable automatic restarts from maint scripts + - cd ${WORKING_DIR} # Don't repeat this step, it's just cd ./debian/output + - apt-get update + - apt-get install -y mysql-server + # Verify installation of MySQL from Sid + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - service mysql status + - mysql --skip-column-names -e "SELECT @@version, @@version_comment" + - mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql + - mysql -e "SELECT * FROM plugin;" mysql + - echo 'SHOW DATABASES;' | mysql + # Install MariaDB built in this commit + - apt-get install -y ./*.deb || true # Allow to proceed so debug artifacts get collected + # Verify installation of MariaDB built in this commit + - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed + - mariadb --version # Client version + - service mysql status + - mkdir -p debug # Ensure dir exists before using it + - find /var/lib/mysql -ls > debug/var-lib-mysql.list + - cp -ra /etc/mysql debug/etc-mysql + - cp -ra /var/log/mysql debug/var-log-mysql + - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server + - mysql --skip-column-names -e "SELECT @@version, @@version_comment" + - mysql -e "SELECT Host,User,plugin,authentication_string FROM user;" mysql + - mysql -e "SELECT * FROM plugin;" mysql + - echo 'SHOW DATABASES;' | mariadb # List databases before upgrade are still there + - mariadb -e "create database test; use test; create table t(a int primary key) engine=innodb; insert into t values (1); select * from t; drop table t; drop database test;" # Test InnoDB works + variables: + GIT_STRATEGY: none diff -Nru mariadb-10.3-10.3.18/extra/crc32-vpmsum/CMakeLists.txt mariadb-10.3-10.3.22/extra/crc32-vpmsum/CMakeLists.txt --- mariadb-10.3-10.3.18/extra/crc32-vpmsum/CMakeLists.txt 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/crc32-vpmsum/CMakeLists.txt 2020-01-26 18:37:27.000000000 +0000 @@ -2,7 +2,7 @@ ADD_LIBRARY(crc32c OBJECT vec_crc32.c) ADD_LIBRARY(crc32ieee OBJECT vec_crc32.c) -GET_TARGET_PROPERTY(CFLAGS_CRC32_VPMSUM ${CRC32_LIBRARY} COMPILE_FLAGS) +GET_PROPERTY(CFLAGS_CRC32_VPMSUM TARGET ${CRC32_LIBRARY} PROPERTY COMPILE_FLAGS) SET_TARGET_PROPERTIES(crc32c crc32ieee PROPERTIES COMPILE_FLAGS "${CFLAGS_CRC32_VPMSUM} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector") SET_TARGET_PROPERTIES(crc32ieee PROPERTIES COMPILE_DEFINITIONS "CRC32_FUNCTION=crc32ieee_vpmsum;CRC32_CONSTANTS_HEADER=\"crc32ieee_constants.h\"") SET_TARGET_PROPERTIES(crc32c PROPERTIES COMPILE_DEFINITIONS "CRC32_FUNCTION=crc32c_vpmsum;CRC32_CONSTANTS_HEADER=\"crc32c_constants.h\"") diff -Nru mariadb-10.3-10.3.18/extra/innochecksum.cc mariadb-10.3-10.3.22/extra/innochecksum.cc --- mariadb-10.3-10.3.18/extra/innochecksum.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/innochecksum.cc 2020-01-26 18:37:27.000000000 +0000 @@ -349,7 +349,7 @@ /***********************************************//* @param>>_______[in] name>_____name of file. - @retval file pointer; file pointer is NULL when error occured. + @retval file pointer; file pointer is NULL when error occurred. */ FILE* @@ -1136,7 +1136,7 @@ /** @param [in/out] file_name name of the filename -@retval FILE pointer if successfully created else NULL when error occured. +@retval FILE pointer if successfully created else NULL when error occurred. */ FILE* create_file( diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/CMakeLists.txt mariadb-10.3-10.3.22/extra/mariabackup/CMakeLists.txt --- mariadb-10.3-10.3.18/extra/mariabackup/CMakeLists.txt 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/CMakeLists.txt 2020-01-26 18:37:27.000000000 +0000 @@ -97,7 +97,7 @@ ######################################################################## -# xbstream binary +# mbstream binary ######################################################################## MYSQL_ADD_EXECUTABLE(mbstream ds_buffer.cc diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/backup_copy.cc mariadb-10.3-10.3.22/extra/mariabackup/backup_copy.cc --- mariadb-10.3-10.3.18/extra/mariabackup/backup_copy.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/backup_copy.cc 2020-01-26 18:37:27.000000000 +0000 @@ -478,7 +478,7 @@ { memset(rel_path, 0, sizeof rel_path); if (filename) { - strncpy(abs_path, filename, sizeof abs_path); + strncpy(abs_path, filename, sizeof abs_path - 1); abs_path[(sizeof abs_path) - 1] = 0; } else { abs_path[0] = '\0'; @@ -1607,7 +1607,8 @@ return(false); } - if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, opt_history != 0)) { + if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, + opt_history != 0, true)) { return(false); } @@ -1665,6 +1666,9 @@ } } + if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir))) + goto cleanup; + /* copy buffer pool dump */ if (innobase_buffer_pool_filename) { const char *src_name; @@ -2176,20 +2180,26 @@ if (info.type != OS_FILE_TYPE_FILE) continue; - const char *pname = strrchr(info.name, IF_WIN('\\', '/')); + const char *pname = strrchr(info.name, OS_PATH_SEPARATOR); if (!pname) pname = info.name; - /* Copy aria log files, and aws keys for encryption plugins.*/ - const char *prefixes[] = { "aria_log", "aws-kms-key" }; - for (size_t i = 0; i < array_elements(prefixes); i++) { - if (starts_with(pname, prefixes[i])) { - ret = copy_file(ds_data, info.name, info.name, 1); - if (!ret) { - break; - } - } - } + if (!starts_with(pname, "aws-kms-key") && + !starts_with(pname, "aria_log")) + /* For ES exchange the above line with the following code: + (!xtrabackup_prepare || !xtrabackup_incremental_dir || + !starts_with(pname, "aria_log"))) + */ + continue; + + if (xtrabackup_prepare && xtrabackup_incremental_dir && + file_exists(info.name)) + unlink(info.name); + + std::string full_path(dir_path); + full_path.append(1, OS_PATH_SEPARATOR).append(info.name); + if (!(ret = copy_file(ds_data, full_path.c_str() , info.name, 1))) + break; } os_file_closedir(dir); return ret; diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/backup_mysql.cc mariadb-10.3-10.3.22/extra/mariabackup/backup_mysql.cc --- mariadb-10.3-10.3.18/extra/mariabackup/backup_mysql.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/backup_mysql.cc 2020-01-26 18:37:27.000000000 +0000 @@ -1473,9 +1473,12 @@ table containing all the history info particular to the just completed backup. */ bool -write_xtrabackup_info(MYSQL *connection, const char * filename, bool history) +write_xtrabackup_info(MYSQL *connection, const char * filename, bool history, + bool stream) { + bool result = true; + FILE *fp = NULL; char *uuid = NULL; char *server_version = NULL; char buf_start_time[100]; @@ -1501,7 +1504,8 @@ || xtrabackup_databases_exclude ); - backup_file_printf(filename, + char *buf = NULL; + int buf_len = asprintf(&buf, "uuid = %s\n" "name = %s\n" "tool_name = %s\n" @@ -1513,8 +1517,8 @@ "end_time = %s\n" "lock_time = %d\n" "binlog_pos = %s\n" - "innodb_from_lsn = %llu\n" - "innodb_to_lsn = %llu\n" + "innodb_from_lsn = " LSN_PF "\n" + "innodb_to_lsn = " LSN_PF "\n" "partial = %s\n" "incremental = %s\n" "format = %s\n" @@ -1531,12 +1535,34 @@ (int)history_lock_time, /* lock_time */ mysql_binlog_position ? mysql_binlog_position : "", /* binlog_pos */ - incremental_lsn, /* innodb_from_lsn */ - metadata_to_lsn, /* innodb_to_lsn */ + incremental_lsn, + /* innodb_from_lsn */ + metadata_to_lsn, + /* innodb_to_lsn */ is_partial? "Y" : "N", xtrabackup_incremental ? "Y" : "N", /* incremental */ xb_stream_name[xtrabackup_stream_fmt], /* format */ xtrabackup_compress ? "compressed" : "N"); /* compressed */ + if (buf_len < 0) { + msg("Error: cannot generate xtrabackup_info"); + result = false; + goto cleanup; + } + + if (stream) { + backup_file_printf(filename, "%s", buf); + } else { + fp = fopen(filename, "w"); + if (!fp) { + msg("Error: cannot open %s", filename); + result = false; + goto cleanup; + } + if (fwrite(buf, buf_len, 1, fp) < 1) { + result = false; + goto cleanup; + } + } if (!history) { goto cleanup; @@ -1598,8 +1624,11 @@ free(uuid); free(server_version); + free(buf); + if (fp) + fclose(fp); - return(true); + return(result); } extern const char *innodb_checksum_algorithm_names[]; diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/backup_mysql.h mariadb-10.3-10.3.22/extra/mariabackup/backup_mysql.h --- mariadb-10.3-10.3.18/extra/mariabackup/backup_mysql.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/backup_mysql.h 2020-01-26 18:37:27.000000000 +0000 @@ -68,7 +68,8 @@ write_binlog_info(MYSQL *connection); bool -write_xtrabackup_info(MYSQL *connection, const char * filename, bool history); +write_xtrabackup_info(MYSQL *connection, const char * filename, bool history, + bool stream); bool write_backup_config_file(); diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/changed_page_bitmap.cc mariadb-10.3-10.3.22/extra/mariabackup/changed_page_bitmap.cc --- mariadb-10.3-10.3.18/extra/mariabackup/changed_page_bitmap.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/changed_page_bitmap.cc 2020-01-26 18:37:27.000000000 +0000 @@ -390,7 +390,7 @@ bitmap_files->files[array_pos].seq_num = file_seq_num; strncpy(bitmap_files->files[array_pos].name, - bitmap_dir_file_info.name, FN_REFLEN); + bitmap_dir_file_info.name, FN_REFLEN - 1); bitmap_files->files[array_pos].name[FN_REFLEN - 1] = '\0'; bitmap_files->files[array_pos].start_lsn diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/fil_cur.cc mariadb-10.3-10.3.22/extra/mariabackup/fil_cur.cc --- mariadb-10.3-10.3.18/extra/mariabackup/fil_cur.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/fil_cur.cc 2020-01-26 18:37:27.000000000 +0000 @@ -338,11 +338,9 @@ memcpy(tmp_page, page, page_size); - bool decrypted = false; if (!space->crypt_data || space->crypt_data->type == CRYPT_SCHEME_UNENCRYPTED - || !fil_space_decrypt(space, tmp_frame, tmp_page, - &decrypted)) { + || !fil_space_decrypt(space, tmp_frame, tmp_page)) { return true; } diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/innobackupex.cc mariadb-10.3-10.3.22/extra/mariabackup/innobackupex.cc --- mariadb-10.3-10.3.18/extra/mariabackup/innobackupex.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/innobackupex.cc 2020-01-26 18:37:27.000000000 +0000 @@ -586,8 +586,8 @@ {"stream", OPT_STREAM, "This option specifies the format in which to " "do the streamed backup. The option accepts a string argument. The " "backup will be done to STDOUT in the specified format. Currently, " - "the only supported formats are tar and xbstream. This option is " - "passed directly to xtrabackup's --stream option.", + "the only supported formats are tar and mbstream/xbstream. This " + "option is passed directly to xtrabackup's --stream option.", (uchar*) &ibx_xtrabackup_stream_str, (uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -655,7 +655,7 @@ [--include=REGEXP] [--user=NAME]\n\ [--password=WORD] [--port=PORT] [--socket=SOCKET]\n\ [--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\ - [--slave-info] [--galera-info] [--stream=tar|xbstream]\n\ + [--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\ [--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\ [--databases=LIST] [--no-lock] \n\ [--tmpdir=DIRECTORY] [--tables-file=FILE]\n\ @@ -716,7 +716,7 @@ with the --compress option. The\n\ --parallel option will allow multiple files to be decompressed\n\ simultaneously. In order to decompress, the qpress utility MUST be installed\n\ -and accessable within the path. This process will remove the original\n\ +and accessible within the path. This process will remove the original\n\ compressed files and leave the results in the same location.\n\ \n\ On success the exit code innobackupex is 0. A non-zero exit code \n\ @@ -751,7 +751,8 @@ } break; case OPT_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { ibx_msg("Invalid --stream argument: %s\n", argument); diff -Nru mariadb-10.3-10.3.18/extra/mariabackup/xtrabackup.cc mariadb-10.3-10.3.22/extra/mariabackup/xtrabackup.cc --- mariadb-10.3-10.3.18/extra/mariabackup/xtrabackup.cc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/mariabackup/xtrabackup.cc 2020-01-26 18:37:27.000000000 +0000 @@ -102,6 +102,7 @@ #include #include #include +#include int sys_var_init(); @@ -904,7 +905,7 @@ {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " "in the specified format." - "Supported format is 'xbstream'." + "Supported format is 'mbstream' or 'xbstream'." , (G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, @@ -1528,7 +1529,8 @@ " --defaults-extra-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=." " --innodb --innodb-fast-shutdown=0 --loose-partition" " --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu" - " --console --skip-log-error --bootstrap < " BOOTSTRAP_FILENAME IF_WIN("\"",""), + " --console --skip-log-error --skip-log-bin --bootstrap < " + BOOTSTRAP_FILENAME IF_WIN("\"",""), mariabackup_exe, orig_argv1, (my_defaults_group_suffix?my_defaults_group_suffix:""), xtrabackup_use_memory); @@ -1540,7 +1542,8 @@ " --defaults-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=." " --innodb --innodb-fast-shutdown=0 --loose-partition" " --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu" - " --console --log-error= --bootstrap < " BOOTSTRAP_FILENAME IF_WIN("\"",""), + " --console --log-error= --skip-log-bin --bootstrap < " + BOOTSTRAP_FILENAME IF_WIN("\"",""), mariabackup_exe, (my_defaults_group_suffix?my_defaults_group_suffix:""), xtrabackup_use_memory); @@ -1709,7 +1712,8 @@ xtrabackup_target_dir= xtrabackup_real_target_dir; break; case OPT_XTRA_STREAM: - if (!strcasecmp(argument, "xbstream")) + if (!strcasecmp(argument, "mbstream") || + !strcasecmp(argument, "xbstream")) xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; else { @@ -1967,7 +1971,7 @@ return false; error: - msg("mariabackup: innodb_init_param(): Error occured.\n"); + msg("mariabackup: innodb_init_param(): Error occurred.\n"); return true; } @@ -2680,7 +2684,9 @@ } } - if (more_data && recv_parse_log_recs(0, STORE_NO, false)) { + store_t store = STORE_NO; + + if (more_data && recv_parse_log_recs(0, &store, 0, false)) { msg("Error: copying the log failed"); @@ -2752,7 +2758,7 @@ log_mutex_exit(); if (!start_lsn) { - msg(recv_sys->found_corrupt_log + die(recv_sys->found_corrupt_log ? "xtrabackup_copy_logfile() failed: corrupt log." : "xtrabackup_copy_logfile() failed."); return true; @@ -3966,7 +3972,7 @@ } sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_INFO); - if (!write_xtrabackup_info(mysql_connection, filename, false)) { + if (!write_xtrabackup_info(mysql_connection, filename, false, false)) { msg("Error: failed to write info " "to '%s'.", filename); return false; @@ -4224,6 +4230,8 @@ if (xtrabackup_copy_logfile()) goto fail_before_log_copying_thread_start; + DBUG_MARIABACKUP_EVENT("before_innodb_log_copy_thread_started",0); + log_copying_stop = os_event_create(0); os_thread_create(log_copying_thread, NULL, &log_copying_thread_id); @@ -5849,41 +5857,12 @@ #include -/* Messages . Avoid loading errmsg.sys file */ + void setup_error_messages() { - static const char *my_msgs[ERRORS_PER_RANGE]; - static const char **all_msgs[] = { my_msgs, my_msgs, my_msgs, my_msgs }; my_default_lc_messages = &my_locale_en_US; - my_default_lc_messages->errmsgs->errmsgs = all_msgs; - - /* Populate the necessary error messages */ - struct { - int id; - const char *fmt; - } - xb_msgs[] = - { - { ER_DATABASE_NAME,"Database" }, - { ER_TABLE_NAME,"Table"}, - { ER_PARTITION_NAME, "Partition" }, - { ER_SUBPARTITION_NAME, "Subpartition" }, - { ER_TEMPORARY_NAME, "Temporary"}, - { ER_RENAMED_NAME, "Renamed"}, - { ER_CANT_FIND_DL_ENTRY, "Can't find symbol '%-.128s' in library"}, - { ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" }, - { ER_OUTOFMEMORY, "Out of memory; restart server and try again (needed %d bytes)" }, - { ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" }, - { ER_UDF_NO_PATHS, "No paths allowed for shared library" }, - { ER_CANT_INITIALIZE_UDF,"Can't initialize function '%-.192s'; %-.80s"}, - { ER_PLUGIN_IS_NOT_LOADED,"Plugin '%-.192s' is not loaded" } - }; - - for (int i = 0; i < (int)array_elements(all_msgs); i++) - all_msgs[0][i] = "Unknown error"; - - for (int i = 0; i < (int)array_elements(xb_msgs); i++) - all_msgs[0][xb_msgs[i].id - ER_ERROR_FIRST] = xb_msgs[i].fmt; + if (init_errmessage()) + die("could not initialize error messages"); } void @@ -6155,6 +6134,8 @@ (void) pthread_key_delete(THR_THD); logger.cleanup_base(); + cleanup_errmsgs(); + free_error_messages(); mysql_mutex_destroy(&LOCK_error_log); if (status == EXIT_SUCCESS) { diff -Nru mariadb-10.3-10.3.18/extra/yassl/src/yassl_error.cpp mariadb-10.3-10.3.22/extra/yassl/src/yassl_error.cpp --- mariadb-10.3-10.3.18/extra/yassl/src/yassl_error.cpp 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/yassl/src/yassl_error.cpp 2020-01-26 18:37:27.000000000 +0000 @@ -242,11 +242,11 @@ strncpy(buffer, "ASN: bad Signature Length", max); break; - case UNKOWN_SIG_E : + case UNKNOWN_SIG_E : strncpy(buffer, "ASN: unknown signature OID", max); break; - case UNKOWN_HASH_E : + case UNKNOWN_HASH_E : strncpy(buffer, "ASN: unknown hash OID", max); break; diff -Nru mariadb-10.3-10.3.18/extra/yassl/taocrypt/include/error.hpp mariadb-10.3-10.3.22/extra/yassl/taocrypt/include/error.hpp --- mariadb-10.3-10.3.18/extra/yassl/taocrypt/include/error.hpp 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/yassl/taocrypt/include/error.hpp 2020-01-26 18:37:27.000000000 +0000 @@ -58,8 +58,8 @@ DATE_SZ_E = 1031, // "bad Date Size" SIG_LEN_E = 1032, // "bad Signature Length" -UNKOWN_SIG_E = 1033, // "unknown signature OID" -UNKOWN_HASH_E = 1034, // "unknown hash OID" +UNKNOWN_SIG_E = 1033, // "unknown signature OID" +UNKNOWN_HASH_E = 1034, // "unknown hash OID" DSA_SZ_E = 1035, // "bad DSA r or s size" BEFORE_DATE_E = 1036, // "before date in the future" AFTER_DATE_E = 1037, // "after date in the past" diff -Nru mariadb-10.3-10.3.18/extra/yassl/taocrypt/src/asn.cpp mariadb-10.3-10.3.22/extra/yassl/taocrypt/src/asn.cpp --- mariadb-10.3-10.3.18/extra/yassl/taocrypt/src/asn.cpp 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/extra/yassl/taocrypt/src/asn.cpp 2020-01-26 18:37:27.000000000 +0000 @@ -1007,7 +1007,7 @@ } #endif else { - source_.SetError(UNKOWN_SIG_E); + source_.SetError(UNKNOWN_SIG_E); return false; } @@ -1132,7 +1132,7 @@ break; default: - error_.SetError(UNKOWN_HASH_E); + error_.SetError(UNKNOWN_HASH_E); return 0; } diff -Nru mariadb-10.3-10.3.18/include/heap.h mariadb-10.3-10.3.22/include/heap.h --- mariadb-10.3-10.3.18/include/heap.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/heap.h 2020-01-26 18:37:27.000000000 +0000 @@ -246,7 +246,7 @@ int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag); extern uchar * heap_find(HP_INFO *info,int inx,const uchar *key); -extern int heap_check_heap(HP_INFO *info, my_bool print_status); +extern int heap_check_heap(const HP_INFO *info, my_bool print_status); extern uchar *heap_position(HP_INFO *info); /* The following is for programs that uses the old HEAP interface where diff -Nru mariadb-10.3-10.3.18/include/intrusive_list.h mariadb-10.3-10.3.22/include/intrusive_list.h --- mariadb-10.3-10.3.18/include/intrusive_list.h 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/include/intrusive_list.h 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,190 @@ +/* + Copyright (c) 2019, 2020, 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 the Free Software Foundation; version 2 of + the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA +*/ + +#pragma once + +#include +#include + +namespace intrusive +{ + +// Derive your class from this struct to insert to a linked list. +template struct list_node +{ + list_node(list_node *next= NULL, list_node *prev= NULL) + : next(next), prev(prev) + { + } + + list_node *next; + list_node *prev; +}; + +// Modelled after std::list +template class list +{ +public: + typedef list_node ListNode; + class Iterator; + + // All containers in C++ should define these types to implement generic + // container interface. + typedef T value_type; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef T *pointer; + typedef const T *const_pointer; + typedef Iterator iterator; + typedef Iterator const_iterator; /* FIXME */ + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + class Iterator + { + public: + // All iterators in C++ should define these types to implement generic + // iterator interface. + typedef std::bidirectional_iterator_tag iterator_category; + typedef T value_type; + typedef std::ptrdiff_t difference_type; + typedef T *pointer; + typedef T &reference; + + Iterator(ListNode *node) : node_(node) {} + + Iterator &operator++() + { + node_= node_->next; + return *this; + } + Iterator operator++(int) + { + Iterator tmp(*this); + operator++(); + return tmp; + } + + Iterator &operator--() + { + node_= node_->prev; + return *this; + } + Iterator operator--(int) + { + Iterator tmp(*this); + operator--(); + return tmp; + } + + reference operator*() { return *static_cast(node_); } + pointer operator->() { return static_cast(node_); } + + bool operator==(const Iterator &rhs) { return node_ == rhs.node_; } + bool operator!=(const Iterator &rhs) { return !(*this == rhs); } + + private: + ListNode *node_; + + friend class list; + }; + + list() : sentinel_(&sentinel_, &sentinel_), size_(0) {} + + reference front() { return *begin(); } + reference back() { return *--end(); } + const_reference front() const { return *begin(); } + const_reference back() const { return *--end(); } + + iterator begin() { return iterator(sentinel_.next); } + const_iterator begin() const + { + return iterator(const_cast(sentinel_.next)); + } + iterator end() { return iterator(&sentinel_); } + const_iterator end() const + { + return iterator(const_cast(&sentinel_)); + } + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { return reverse_iterator(end()); } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { return reverse_iterator(begin()); } + + bool empty() const { return size_ == 0; } + size_type size() const { return size_; } + + void clear() + { + sentinel_.next= &sentinel_; + sentinel_.prev= &sentinel_; + size_= 0; + } + + iterator insert(iterator pos, reference value) + { + ListNode *curr= pos.node_; + ListNode *prev= pos.node_->prev; + + prev->next= &value; + curr->prev= &value; + + static_cast(value).prev= prev; + static_cast(value).next= curr; + + ++size_; + return iterator(&value); + } + + iterator erase(iterator pos) + { + ListNode *prev= pos.node_->prev; + ListNode *next= pos.node_->next; + + prev->next= next; + next->prev= prev; + + // This is not required for list functioning. But maybe it'll prevent bugs + // and ease debugging. + ListNode *curr= pos.node_; + curr->prev= NULL; + curr->next= NULL; + + --size_; + return next; + } + + void push_back(reference value) { insert(end(), value); } + void pop_back() { erase(end()); } + + void push_front(reference value) { insert(begin(), value); } + void pop_front() { erase(begin()); } + + // STL version is O(n) but this is O(1) because an element can't be inserted + // several times in the same intrusive list. + void remove(reference value) { erase(iterator(&value)); } + +private: + ListNode sentinel_; + size_type size_; +}; + +} // namespace intrusive diff -Nru mariadb-10.3-10.3.18/include/lf.h mariadb-10.3-10.3.22/include/lf.h --- mariadb-10.3-10.3.18/include/lf.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/lf.h 2020-01-26 18:37:27.000000000 +0000 @@ -65,7 +65,6 @@ typedef struct { void * volatile pin[LF_PINBOX_PINS]; LF_PINBOX *pinbox; - void **stack_ends_here; void *purgatory; uint32 purgatory_count; uint32 volatile link; diff -Nru mariadb-10.3-10.3.18/include/my_dbug.h mariadb-10.3-10.3.22/include/my_dbug.h --- mariadb-10.3-10.3.18/include/my_dbug.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/my_dbug.h 2020-01-26 18:37:27.000000000 +0000 @@ -35,7 +35,6 @@ }; struct _db_code_state_; -extern MYSQL_PLUGIN_IMPORT my_bool my_assert; extern my_bool _dbug_on_; extern my_bool _db_keyword_(struct _db_code_state_ *, const char *, int); extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len); @@ -59,6 +58,8 @@ extern void _db_end_(void); extern void _db_lock_file_(void); extern void _db_unlock_file_(void); +ATTRIBUTE_COLD +extern my_bool _db_my_assert(const char *file, int line, const char *msg); extern FILE *_db_fp_(void); extern void _db_flush_(void); extern void dbug_swap_code_state(void **code_state_store); @@ -104,10 +105,9 @@ #define DBUG_END() _db_end_ () #define DBUG_LOCK_FILE _db_lock_file_() #define DBUG_UNLOCK_FILE _db_unlock_file_() -#define DBUG_ASSERT(A) do { if (!(A)) { _db_flush_(); \ - if (my_assert) assert(A); \ - else fprintf(stderr, "%s:%d: assert: %s\n", __FILE__, __LINE__, #A); \ -}} while (0) +#define DBUG_ASSERT(A) do { \ + if (unlikely(!(A)) && _db_my_assert(__FILE__, __LINE__, #A)) assert(A); \ +} while (0) #define DBUG_SLOW_ASSERT(A) DBUG_ASSERT(A) #define DBUG_ASSERT_EXISTS #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) diff -Nru mariadb-10.3-10.3.18/include/my_global.h mariadb-10.3-10.3.22/include/my_global.h --- mariadb-10.3-10.3.18/include/my_global.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/my_global.h 2020-01-26 18:37:27.000000000 +0000 @@ -445,6 +445,20 @@ #if HAVE_MADVISE && !HAVE_DECL_MADVISE && defined(__cplusplus) extern "C" int madvise(void *addr, size_t len, int behav); #endif +#ifdef HAVE_SYS_MMAN_H +#include +#endif +/** FreeBSD equivalent */ +#if defined(MADV_CORE) && !defined(MADV_DODUMP) +#define MADV_DODUMP MADV_CORE +#define MADV_DONTDUMP MADV_NOCORE +#define DODUMP_STR "MADV_CORE" +#define DONTDUMP_STR "MADV_NOCORE" +#else +#define DODUMP_STR "MADV_DODUMP" +#define DONTDUMP_STR "MADV_DONTDUMP" +#endif + #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ diff -Nru mariadb-10.3-10.3.18/include/my_sys.h mariadb-10.3-10.3.22/include/my_sys.h --- mariadb-10.3-10.3.18/include/my_sys.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/my_sys.h 2020-01-26 18:37:27.000000000 +0000 @@ -267,7 +267,7 @@ extern uint mysys_usage_id; extern int32 my_file_opened; extern my_bool my_init_done, my_thr_key_mysys_exists; -extern MYSQL_PLUGIN_IMPORT my_bool my_assert; +extern my_bool my_assert; extern my_bool my_assert_on_error; extern myf my_global_flags; /* Set to MY_WME for more error messages */ /* Point to current my_message() */ @@ -964,8 +964,6 @@ #endif #ifdef HAVE_SYS_MMAN_H -#include - #ifndef MAP_NOSYNC #define MAP_NOSYNC 0 #endif diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_file.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_file.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_file.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_file.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_idle.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_idle.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_idle.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_idle.h 2020-01-26 18:37:27.000000000 +0000 @@ -2,13 +2,20 @@ 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_socket.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_socket.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_socket.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_socket.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,15 +1,21 @@ /* Copyright (c) 2010, 2012, 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 Foundation; version 2 of the -License. +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License, version 2.0, +as published by the Free Software Foundation. + +This program is also distributed with certain software (including +but not limited to OpenSSL) that is licensed under separate terms, +as designated in a particular file or component or in included license +documentation. The authors of MySQL hereby grant you an additional +permission to link the program and your derivative works with the +separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_stage.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_stage.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_stage.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_stage.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_statement.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_statement.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_statement.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_statement.h 2020-01-26 18:37:27.000000000 +0000 @@ -2,13 +2,20 @@ 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_table.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_table.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_table.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_table.h 2020-01-26 18:37:27.000000000 +0000 @@ -2,13 +2,20 @@ 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/mysql_thread.h mariadb-10.3-10.3.22/include/mysql/psi/mysql_thread.h --- mariadb-10.3-10.3.18/include/mysql/psi/mysql_thread.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/mysql_thread.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2013, 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 - the Free Software Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/psi.h mariadb-10.3-10.3.22/include/mysql/psi/psi.h --- mariadb-10.3-10.3.18/include/mysql/psi/psi.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/psi.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/psi_abi_v0.h mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v0.h --- mariadb-10.3-10.3.18/include/mysql/psi/psi_abi_v0.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v0.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/psi_abi_v1.h mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v1.h --- mariadb-10.3-10.3.18/include/mysql/psi/psi_abi_v1.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v1.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/psi/psi_abi_v2.h mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v2.h --- mariadb-10.3-10.3.18/include/mysql/psi/psi_abi_v2.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/psi/psi_abi_v2.h 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,20 @@ /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 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 Foundation; version 2 of the License. + it under the terms of the GNU General Public License, version 2.0, + as published by the Free Software Foundation. + + This program is also distributed with certain software (including + but not limited to OpenSSL) that is licensed under separate terms, + as designated in a particular file or component or in included license + documentation. The authors of MySQL hereby grant you an additional + permission to link the program and your derivative works with the + separately licensed software that they have included with MySQL. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU General Public License, version 2.0, for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/include/mysql/service_wsrep.h mariadb-10.3-10.3.22/include/mysql/service_wsrep.h --- mariadb-10.3-10.3.18/include/mysql/service_wsrep.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/mysql/service_wsrep.h 2020-01-26 18:37:27.000000000 +0000 @@ -101,7 +101,7 @@ enum wsrep_conflict_state (*wsrep_thd_get_conflict_state_func)(MYSQL_THD); my_bool (*wsrep_thd_is_BF_func)(MYSQL_THD , my_bool); my_bool (*wsrep_thd_is_wsrep_func)(MYSQL_THD thd); - char * (*wsrep_thd_query_func)(THD *thd); + const char * (*wsrep_thd_query_func)(THD *thd); enum wsrep_query_state (*wsrep_thd_query_state_func)(THD *thd); const char * (*wsrep_thd_query_state_str_func)(THD *thd); int (*wsrep_thd_retry_counter_func)(THD *thd); @@ -186,7 +186,7 @@ bool wsrep_consistency_check(THD *thd); bool wsrep_prepare_key(const unsigned char* cache_key, size_t cache_key_len, const unsigned char* row_id, size_t row_id_len, struct wsrep_buf* key, size_t* key_len); -char *wsrep_thd_query(THD *thd); +const char *wsrep_thd_query(THD *thd); const char *wsrep_thd_conflict_state_str(THD *thd); const char *wsrep_thd_exec_mode_str(THD *thd); const char *wsrep_thd_query_state_str(THD *thd); diff -Nru mariadb-10.3-10.3.18/include/source_revision.h mariadb-10.3-10.3.22/include/source_revision.h --- mariadb-10.3-10.3.18/include/source_revision.h 2019-09-08 16:53:01.000000000 +0000 +++ mariadb-10.3-10.3.22/include/source_revision.h 2020-01-26 18:37:30.000000000 +0000 @@ -1 +1 @@ -#define SOURCE_REVISION "604f80e77c054758aa449064cdc29dfa13a71922" +#define SOURCE_REVISION "0152704ae3f857668dbc05803950adcf131b8685" diff -Nru mariadb-10.3-10.3.18/include/sslopt-case.h mariadb-10.3-10.3.22/include/sslopt-case.h --- mariadb-10.3-10.3.18/include/sslopt-case.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/include/sslopt-case.h 2020-01-26 18:37:27.000000000 +0000 @@ -30,7 +30,7 @@ */ opt_use_ssl= 1; /* crl has no effect in yaSSL */ -#ifdef HAVE_YASSL +#if defined (HAVE_YASSL) && (!defined (_WIN32) || defined (MYSQL_SERVER)) opt_ssl_crl= NULL; opt_ssl_crlpath= NULL; #endif diff -Nru mariadb-10.3-10.3.18/libmariadb/CMakeLists.txt mariadb-10.3-10.3.22/libmariadb/CMakeLists.txt --- mariadb-10.3-10.3.18/libmariadb/CMakeLists.txt 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/CMakeLists.txt 2020-01-26 18:37:27.000000000 +0000 @@ -36,7 +36,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR 3) SET(CPACK_PACKAGE_VERSION_MINOR 1) -SET(CPACK_PACKAGE_VERSION_PATCH 4) +SET(CPACK_PACKAGE_VERSION_PATCH 7) SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") MATH(EXPR MARIADB_PACKAGE_VERSION_ID "${CPACK_PACKAGE_VERSION_MAJOR} * 10000 + ${CPACK_PACKAGE_VERSION_MINOR} * 100 + @@ -107,6 +107,7 @@ IF(MSVC) # Speedup system tests INCLUDE(${CC_SOURCE_DIR}/cmake/WindowsCache.cmake) + ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) IF (MSVC) SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") FOREACH(BUILD_TYPE ${CONFIG_TYPES}) @@ -330,7 +331,8 @@ IF(WITH_SSL STREQUAL "SCHANNEL") ADD_DEFINITIONS(-DHAVE_SCHANNEL -DHAVE_TLS) SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/schannel.c" - "${CC_SOURCE_DIR}/libmariadb/secure/ma_schannel.c") + "${CC_SOURCE_DIR}/libmariadb/secure/ma_schannel.c" + "${CC_SOURCE_DIR}/libmariadb/secure/schannel_certs.c") INCLUDE_DIRECTORIES("${CC_SOURCE_DIR}/plugins/pvio/") SET(SSL_LIBRARIES secur32) SET(TLS_LIBRARY_VERSION "Schannel ${CMAKE_SYSTEM_VERSION}") diff -Nru mariadb-10.3-10.3.18/libmariadb/cmake/CheckFunctions.cmake mariadb-10.3-10.3.22/libmariadb/cmake/CheckFunctions.cmake --- mariadb-10.3-10.3.18/libmariadb/cmake/CheckFunctions.cmake 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/cmake/CheckFunctions.cmake 2020-01-26 18:37:27.000000000 +0000 @@ -21,3 +21,4 @@ CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO) CHECK_FUNCTION_EXISTS (setlocale HAVE_SETLOCALE) CHECK_FUNCTION_EXISTS (poll HAVE_POLL) +CHECK_FUNCTION_EXISTS (getpwuid HAVE_GETPWUID) diff -Nru mariadb-10.3-10.3.18/libmariadb/include/ma_common.h mariadb-10.3-10.3.22/libmariadb/include/ma_common.h --- mariadb-10.3-10.3.18/libmariadb/include/ma_common.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/include/ma_common.h 2020-01-26 18:37:27.000000000 +0000 @@ -91,6 +91,7 @@ struct st_mariadb_net_extension { enum enum_multi_status multi_status; + int extended_errno; }; struct st_mariadb_session_state diff -Nru mariadb-10.3-10.3.18/libmariadb/include/ma_priv.h mariadb-10.3-10.3.22/libmariadb/include/ma_priv.h --- mariadb-10.3-10.3.18/libmariadb/include/ma_priv.h 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/include/ma_priv.h 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,31 @@ +/**************************************************************************** + Copyright (C) 2020 MariaDB Corporation + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not see + or write to the Free Software Foundation, Inc., + 51 Franklin St., Fifth Floor, Boston, MA 02110, USA + + Part of this code includes code from the PHP project which + is freely available from http://www.php.net + *****************************************************************************/ +#ifndef MA_PRIV_H +#define MA_PRIV_H + +void free_rows(MYSQL_DATA *cur); +int ma_multi_command(MYSQL *mysql, enum enum_multi_status status); +MYSQL_FIELD * unpack_fields(MYSQL_DATA *data, + MA_MEM_ROOT *alloc,uint fields, + my_bool default_value); + +#endif diff -Nru mariadb-10.3-10.3.18/libmariadb/include/mariadb_stmt.h mariadb-10.3-10.3.22/libmariadb/include/mariadb_stmt.h --- mariadb-10.3-10.3.18/libmariadb/include/mariadb_stmt.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/include/mariadb_stmt.h 2020-01-26 18:37:27.000000000 +0000 @@ -38,7 +38,9 @@ { \ (a)->last_errno= (b);\ strncpy((a)->sqlstate, (c), SQLSTATE_LENGTH);\ - strncpy((a)->last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE - 1);\ + (a)->sqlstate[SQLSTATE_LENGTH]= 0;\ + strncpy((a)->last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE);\ + (a)->last_error[MYSQL_ERRMSG_SIZE - 1]= 0;\ } #define CLEAR_CLIENT_STMT_ERROR(a) \ diff -Nru mariadb-10.3-10.3.18/libmariadb/include/mariadb_version.h.in mariadb-10.3-10.3.22/libmariadb/include/mariadb_version.h.in --- mariadb-10.3-10.3.18/libmariadb/include/mariadb_version.h.in 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/include/mariadb_version.h.in 2020-01-26 18:37:27.000000000 +0000 @@ -24,7 +24,7 @@ #define MARIADB_PACKAGE_VERSION_ID @MARIADB_PACKAGE_VERSION_ID@ #define MARIADB_SYSTEM_TYPE "@CMAKE_SYSTEM_NAME@" #define MARIADB_MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@" -#define MARIADB_PLUGINDIR "@CMAKE_INSTALL_PREFIX@/@PLUGINDIR@" +#define MARIADB_PLUGINDIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@" /* mysqld compile time options */ #ifndef MYSQL_CHARSET diff -Nru mariadb-10.3-10.3.18/libmariadb/include/mysql.h mariadb-10.3-10.3.22/libmariadb/include/mysql.h --- mariadb-10.3-10.3.18/libmariadb/include/mysql.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/include/mysql.h 2020-01-26 18:37:27.000000000 +0000 @@ -125,7 +125,9 @@ { \ (a)->net.last_errno= (b);\ strncpy((a)->net.sqlstate, (c), SQLSTATE_LENGTH);\ + (a)->net.sqlstate[SQLSTATE_LENGTH]= 0;\ strncpy((a)->net.last_error, (d) ? (d) : ER((b)), MYSQL_ERRMSG_SIZE - 1);\ + (a)->net.last_error[MYSQL_ERRMSG_SIZE - 1]= 0;\ } /* For mysql_async.c */ @@ -138,6 +140,7 @@ (a)->net.last_errno= 0;\ strcpy((a)->net.sqlstate, "00000");\ (a)->net.last_error[0]= '\0';\ + (a)->net.extension->extended_errno= 0;\ } #define MYSQL_COUNT_ERROR (~(unsigned long long) 0) diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/CMakeLists.txt mariadb-10.3-10.3.22/libmariadb/libmariadb/CMakeLists.txt --- mariadb-10.3-10.3.18/libmariadb/libmariadb/CMakeLists.txt 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/CMakeLists.txt 2020-01-26 18:37:27.000000000 +0000 @@ -75,8 +75,6 @@ mysql_get_server_version mysql_get_socket mysql_get_ssl_cipher - mysql_get_timeout_value - mysql_get_timeout_value_ms mysql_hex_string mysql_info mysql_init @@ -201,8 +199,6 @@ mysql_fetch_row_start mysql_free_result_cont mysql_free_result_start - mysql_get_timeout_value - mysql_get_timeout_value_ms mysql_kill_cont mysql_kill_start mysql_list_fields_cont @@ -304,8 +300,11 @@ IF(WIN32) ADD_DEFINITIONS(-DSIZEOF_CHARP=${CMAKE_SIZEOF_VOID_P}) INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/win-iconv) - SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} - ${CC_SOURCE_DIR}/win-iconv/win_iconv.c) + SET(LIBMARIADB_SOURCES + ${LIBMARIADB_SOURCES} + ${CC_SOURCE_DIR}/win-iconv/win_iconv.c + win32_errmsg.c + win32_errmsg.h) ELSE() IF(ICONV_INCLUDE_DIR) INCLUDE_DIRECTORIES(BEFORE ${ICONV_INCLUDE_DIR}) diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/ma_client_plugin.c.in mariadb-10.3-10.3.22/libmariadb/libmariadb/ma_client_plugin.c.in --- mariadb-10.3-10.3.18/libmariadb/libmariadb/ma_client_plugin.c.in 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/ma_client_plugin.c.in 2020-01-26 18:37:27.000000000 +0000 @@ -30,10 +30,8 @@ There is no reference counting and no unloading either. */ -#if _MSC_VER /* Silence warnings about variable 'unused' being used. */ #define FORCE_INIT_OF_VARS 1 -#endif #include #include diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/ma_pvio.c mariadb-10.3-10.3.22/libmariadb/libmariadb/ma_pvio.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/ma_pvio.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/ma_pvio.c 2020-01-26 18:37:27.000000000 +0000 @@ -540,8 +540,7 @@ 2. verify CN (requires option ssl_verify_check) 3. verrify finger print */ - if ((pvio->mysql->options.ssl_ca || pvio->mysql->options.ssl_capath) && - (pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && + if ((pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && ma_pvio_tls_verify_server_cert(pvio->ctls)) return 1; diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/mariadb_lib.c mariadb-10.3-10.3.22/libmariadb/libmariadb/mariadb_lib.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/mariadb_lib.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/mariadb_lib.c 2020-01-26 18:37:27.000000000 +0000 @@ -27,6 +27,7 @@ #include #include #include +#include "ma_priv.h" #include "ma_context.h" #include "mysql.h" #include "mariadb_version.h" @@ -771,7 +772,7 @@ MYSQL_FIELD * unpack_fields(MYSQL_DATA *data,MA_MEM_ROOT *alloc,uint fields, - my_bool default_value, my_bool long_flag_protocol __attribute__((unused))) + my_bool default_value) { MYSQL_ROWS *row; MYSQL_FIELD *field,*result; @@ -1020,7 +1021,7 @@ mysql->charset= mysql_find_charset_name(MARIADB_DEFAULT_CHARSET); mysql->methods= &MARIADB_DEFAULT_METHODS; strcpy(mysql->net.sqlstate, "00000"); - mysql->net.last_error[0]= mysql->net.last_errno= 0; + mysql->net.last_error[0]= mysql->net.last_errno= mysql->net.extension->extended_errno= 0; if (ENABLED_LOCAL_INFILE != LOCAL_INFILE_MODE_OFF) mysql->options.client_flag|= CLIENT_LOCAL_FILES; @@ -1199,9 +1200,42 @@ return my; } } - +#ifndef HAVE_SCHANNEL return mysql->methods->db_connect(mysql, host, user, passwd, db, port, unix_socket, client_flag); +#else +/* + With older windows versions (prior Win 10) TLS connections periodically + fail with SEC_E_INVALID_TOKEN, SEC_E_BUFFER_TOO_SMALL or SEC_E_MESSAGE_ALTERED + error (see MDEV-13492). If the connect attempt returns on of these error codes + in mysql->net.extended_errno we will try to connect again (max. 3 times) +*/ +#define MAX_SCHANNEL_CONNECT_ATTEMPTS 3 + { + int ssl_retry= (mysql->options.use_ssl) ? MAX_SCHANNEL_CONNECT_ATTEMPTS : 1; + MYSQL *my= NULL; + while (ssl_retry) + { + if ((my= mysql->methods->db_connect(mysql, host, user, passwd, + db, port, unix_socket, client_flag | CLIENT_REMEMBER_OPTIONS))) + return my; + + switch (mysql->net.extension->extended_errno) { + case SEC_E_INVALID_TOKEN: + case SEC_E_BUFFER_TOO_SMALL: + case SEC_E_MESSAGE_ALTERED: + ssl_retry--; + break; + default: + ssl_retry= 0; + break; + } + } + if (!my && !(client_flag & CLIENT_REMEMBER_OPTIONS)) + mysql_close_options(mysql); + return my; + } +#endif } MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user, @@ -1481,7 +1515,10 @@ scramble_len= pkt_scramble_len; scramble_plugin= scramble_data + scramble_len; if (scramble_data + scramble_len > end_pkt) - scramble_len= (uint)(end_pkt - scramble_data); + { + SET_CLIENT_ERROR(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0); + goto error; + } } else { scramble_len= (uint)(end_pkt - scramble_data); @@ -2159,9 +2196,7 @@ if (!(fields=mysql->methods->db_read_rows(mysql,(MYSQL_FIELD*) 0,8))) return(-1); if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc, - (uint) field_count,1, - (my_bool) test(mysql->server_capabilities & - CLIENT_LONG_FLAG)))) + (uint) field_count, 1))) return(-1); mysql->status=MYSQL_STATUS_GET_RESULT; mysql->field_count=field_count; @@ -2492,9 +2527,7 @@ result->eof=1; result->field_count = (uint) query->rows; result->fields= unpack_fields(query,&result->field_alloc, - result->field_count,1, - (my_bool) test(mysql->server_capabilities & - CLIENT_LONG_FLAG)); + result->field_count, 1); if (result->fields) return(result); @@ -2519,9 +2552,8 @@ field_count=(uint) net_field_length(&pos); if (!(fields = mysql->methods->db_read_rows(mysql,(MYSQL_FIELD*) 0,5))) return(NULL); - if (!(mysql->fields=unpack_fields(fields,&mysql->field_alloc,field_count,0, - (my_bool) test(mysql->server_capabilities & - CLIENT_LONG_FLAG)))) + if (!(mysql->fields=unpack_fields(fields, &mysql->field_alloc, + field_count, 0))) return(NULL); mysql->status=MYSQL_STATUS_GET_RESULT; mysql->field_count=field_count; @@ -3757,7 +3789,7 @@ #ifdef HAVE_TLS *((const char **)arg)= tls_library_version; #else - *((char **)arg)= "Off"; + *((const char **)arg)= "Off"; #endif break; case MARIADB_CLIENT_VERSION: diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/mariadb_stmt.c mariadb-10.3-10.3.22/libmariadb/libmariadb/mariadb_stmt.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/mariadb_stmt.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/mariadb_stmt.c 2020-01-26 18:37:27.000000000 +0000 @@ -55,6 +55,8 @@ #include #include #include +#include "ma_priv.h" + #define UPDATE_STMT_ERROR(stmt)\ SET_CLIENT_STMT_ERROR((stmt), (stmt)->mysql->net.last_errno, (stmt)->mysql->net.sqlstate, (stmt)->mysql->net.last_error) @@ -75,10 +77,6 @@ MA_MEM_ROOT fields_ma_alloc_root; } MADB_STMT_EXTENSION; -MYSQL_DATA *read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, uint fields); -void free_rows(MYSQL_DATA *cur); -int ma_multi_command(MYSQL *mysql, enum enum_multi_status status); -MYSQL_FIELD * unpack_fields(MYSQL_DATA *data,MA_MEM_ROOT *alloc,uint fields, my_bool default_value, my_bool long_flag_protocol); static my_bool net_stmt_close(MYSQL_STMT *stmt, my_bool remove); static my_bool is_not_null= 0; @@ -1598,8 +1596,7 @@ if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7))) return(1); if (!(stmt->fields= unpack_fields(result,fields_ma_alloc_root, - stmt->field_count, 0, - stmt->mysql->server_capabilities & CLIENT_LONG_FLAG))) + stmt->field_count, 0))) return(1); return(0); } diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/gnutls.c mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/gnutls.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/gnutls.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/gnutls.c 2020-01-26 18:37:27.000000000 +0000 @@ -1080,6 +1080,23 @@ if (ssl_error < 0) goto error; } + + if (mysql->options.ssl_capath) + { + ssl_error= gnutls_certificate_set_x509_trust_dir(ctx, + mysql->options.ssl_capath, + GNUTLS_X509_FMT_PEM); + if (ssl_error < 0) + goto error; + } + + if (!mysql->options.ssl_ca && !mysql->options.ssl_capath) + { + ssl_error= gnutls_certificate_set_x509_system_trust(ctx); + if (ssl_error < 0) + goto error; + } + gnutls_certificate_set_verify_function(ctx, my_verify_callback); @@ -1211,7 +1228,11 @@ if (ret < 0) { - ma_tls_set_error(mysql, ssl, ret); + /* If error message was not set while calling certification callback function, + use default error message (which is not very descriptive */ + if (!mysql_errno(mysql)) + ma_tls_set_error(mysql, ssl, ret); + /* restore blocking mode */ gnutls_deinit((gnutls_session_t )ctls->ssl); free_gnutls_data(data); @@ -1330,7 +1351,7 @@ int ma_tls_verify_server_cert(MARIADB_TLS *ctls __attribute__((unused))) { - /* server verification is already handled before */ + /* server verification is already handled before during handshake */ return 0; } @@ -1352,77 +1373,44 @@ static int my_verify_callback(gnutls_session_t ssl) { unsigned int status= 0; - const gnutls_datum_t *cert_list; - unsigned int cert_list_size; struct st_gnutls_data *data= (struct st_gnutls_data *)gnutls_session_get_ptr(ssl); MYSQL *mysql; - MARIADB_PVIO *pvio; - - gnutls_x509_crt_t cert; - const char *hostname; mysql= data->mysql; - pvio= mysql->net.pvio; - /* read hostname */ - hostname = mysql->host; + CLEAR_CLIENT_ERROR(mysql); - /* This verification function uses the trusted CAs in the credentials - * structure. So you must have installed one or more CA certificates. - */ - if ((mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && - gnutls_certificate_verify_peers2 (ssl, &status) < 0) + if ((mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT)) { - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "CA verification failed"); - return GNUTLS_E_CERTIFICATE_ERROR; - } + const char *hostname= mysql->host; - if (status & GNUTLS_CERT_INVALID) - { - char errbuf[100]; - snprintf(errbuf, 99, "CA Verification failed (Status: %d)", status); - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, errbuf); - return GNUTLS_E_CERTIFICATE_ERROR; - } - /* Up to here the process is the same for X.509 certificates and - * OpenPGP keys. From now on X.509 certificates are assumed. This can - * be easily extended to work with openpgp keys as well. - */ - if (gnutls_certificate_type_get (ssl) != GNUTLS_CRT_X509) - { - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Expected X509 certificate"); - return GNUTLS_E_CERTIFICATE_ERROR; + if (gnutls_certificate_verify_peers3 (ssl, hostname, &status) < 0) + return GNUTLS_E_CERTIFICATE_ERROR; + } else { + if (gnutls_certificate_verify_peers2 (ssl, &status) < 0) + return GNUTLS_E_CERTIFICATE_ERROR; } - if (gnutls_x509_crt_init (&cert) < 0) - { - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Error during certificate initialization"); - return GNUTLS_E_CERTIFICATE_ERROR; - } - cert_list = gnutls_certificate_get_peers (ssl, &cert_list_size); - if (cert_list == NULL) - { - gnutls_x509_crt_deinit (cert); - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "No certificate found"); - return GNUTLS_E_CERTIFICATE_ERROR; - } - if (gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER) < 0) - { - gnutls_x509_crt_deinit (cert); - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Unknown SSL error"); - return GNUTLS_E_CERTIFICATE_ERROR; - } - - if ((mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && - !gnutls_x509_crt_check_hostname (cert, hostname)) + if (status & GNUTLS_CERT_INVALID) { - gnutls_x509_crt_deinit (cert); - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Hostname in certificate doesn't match"); + gnutls_datum_t out; + int type; + /* accept self signed certificates if we don't have to verify server cert */ + if (!(mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) && + (status & GNUTLS_CERT_SIGNER_NOT_FOUND)) + return 0; + + /* gnutls default error mesage "certificate validation failed" isn't very + descriptive, so we provide more information about the error here */ + type= gnutls_certificate_type_get(ssl); + gnutls_certificate_verification_status_print(status, type, &out, 0); + my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, + ER(CR_SSL_CONNECTION_ERROR), out.data); + gnutls_free(out.data); + return GNUTLS_E_CERTIFICATE_ERROR; } - gnutls_x509_crt_deinit (cert); - /* notify gnutls to continue handshake normally */ + - CLEAR_CLIENT_ERROR(mysql); return 0; } diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/ma_schannel.c mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/ma_schannel.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/ma_schannel.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/ma_schannel.c 2020-01-26 18:37:27.000000000 +0000 @@ -20,566 +20,45 @@ *************************************************************************************/ #include "ma_schannel.h" +#include "schannel_certs.h" #include #define SC_IO_BUFFER_SIZE 0x4000 #define MAX_SSL_ERR_LEN 100 #define SCHANNEL_PAYLOAD(A) (A).cbMaximumMessage + (A).cbHeader + (A).cbTrailer -void ma_schannel_set_win_error(MARIADB_PVIO *pvio); +void ma_schannel_set_win_error(MARIADB_PVIO *pvio, DWORD ErrorNo); + + + /* {{{ void ma_schannel_set_sec_error */ -void ma_schannel_set_sec_error(MARIADB_PVIO *pvio, DWORD ErrorNo) +void ma_schannel_set_sec_error(MARIADB_PVIO* pvio, DWORD ErrorNo) { - MYSQL *mysql= pvio->mysql; - switch(ErrorNo) { - case SEC_E_ILLEGAL_MESSAGE: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: The message received was unexpected or badly formatted"); - break; - case SEC_E_UNTRUSTED_ROOT: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Untrusted root certificate"); - break; - case SEC_E_BUFFER_TOO_SMALL: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Buffer too small"); - break; - case SEC_E_CRYPTO_SYSTEM_INVALID: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Cipher is not supported"); - break; - case SEC_E_INSUFFICIENT_MEMORY: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Out of memory"); - break; - case SEC_E_OUT_OF_SEQUENCE: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Invalid message sequence"); - break; - case SEC_E_DECRYPT_FAILURE: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: An error occurred during decrypting data"); - break; - case SEC_I_INCOMPLETE_CREDENTIALS: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Incomplete credentials"); - break; - case SEC_E_ENCRYPT_FAILURE: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: An error occurred during encrypting data"); - break; - case SEC_I_CONTEXT_EXPIRED: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Context expired "); - break; - case SEC_E_ALGORITHM_MISMATCH: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: no cipher match"); - break; - case SEC_E_NO_CREDENTIALS: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: no credentials"); - break; - case SEC_E_OK: - break; - case SEC_E_INTERNAL_ERROR: - if (GetLastError()) - ma_schannel_set_win_error(pvio); - else - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "The Local Security Authority cannot be contacted"); - break; - default: - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Unknown SSL error (0x%x)", ErrorNo); + MYSQL* mysql = pvio->mysql; + if (ErrorNo != SEC_E_OK) + mysql->net.extension->extended_errno = ErrorNo; + if (ErrorNo == SEC_E_INTERNAL_ERROR && GetLastError()) + { + ma_schannel_set_win_error(pvio, GetLastError()); + return; } + ma_schannel_set_win_error(pvio, ErrorNo); } /* }}} */ +#include "win32_errmsg.h" /* {{{ void ma_schnnel_set_win_error */ -void ma_schannel_set_win_error(MARIADB_PVIO *pvio) +void ma_schannel_set_win_error(MARIADB_PVIO *pvio, DWORD ErrorNo) { - ulong ssl_errno= GetLastError(); - char *ssl_error_reason= NULL; - char *p; char buffer[256]; - if (!ssl_errno) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "Unknown SSL error"); - return; - } - /* todo: obtain error message */ - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, ssl_errno, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &ssl_error_reason, 0, NULL ); - for (p = ssl_error_reason; *p; p++) - if (*p == '\n' || *p == '\r') - *p = 0; - snprintf(buffer, sizeof(buffer), "SSL connection error: %s",ssl_error_reason); + ma_format_win32_error(buffer, sizeof(buffer), ErrorNo, "SSL connection error: "); pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, buffer); - if (ssl_error_reason) - LocalFree(ssl_error_reason); return; } /* }}} */ -/* {{{ LPBYTE ma_schannel_load_pem(const char *PemFileName, DWORD *buffer_len) */ -/* - Load a pem or clr file and convert it to a binary DER object - - SYNOPSIS - ma_schannel_load_pem() - PemFileName name of the pem file (in) - buffer_len length of the converted DER binary - - DESCRIPTION - Loads a X509 file (ca, certification, key or clr) into memory and converts - it to a DER binary object. This object can be decoded and loaded into - a schannel crypto context. - If the function failed, error can be retrieved by GetLastError() - The returned binary object must be freed by caller. - - RETURN VALUE - NULL if the conversion failed or file was not found - LPBYTE * a pointer to a binary der object - buffer_len will contain the length of binary der object -*/ -static LPBYTE ma_schannel_load_pem(MARIADB_PVIO *pvio, const char *PemFileName, DWORD *buffer_len) -{ - HANDLE hfile= 0; - char *buffer= NULL; - DWORD dwBytesRead= 0; - LPBYTE der_buffer= NULL; - DWORD der_buffer_length= 0; - - if (buffer_len == NULL) - return NULL; - - - if ((hfile= CreateFile(PemFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL )) == INVALID_HANDLE_VALUE) - { - ma_schannel_set_win_error(pvio); - return NULL; - } - - if (!(*buffer_len = GetFileSize(hfile, NULL))) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Invalid pem format"); - goto end; - } - - if (!(buffer= malloc((size_t)(*buffer_len + 1)))) - { - pvio->set_error(pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, NULL); - goto end; - } - - if (!ReadFile(hfile, buffer, *buffer_len, &dwBytesRead, NULL)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - CloseHandle(hfile); - - /* calculate the length of DER binary */ - if (!CryptStringToBinaryA(buffer, *buffer_len, CRYPT_STRING_BASE64HEADER, - NULL, &der_buffer_length, NULL, NULL)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - /* allocate DER binary buffer */ - if (!(der_buffer= (LPBYTE)LocalAlloc(0, der_buffer_length))) - { - pvio->set_error(pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, NULL); - goto end; - } - /* convert to DER binary */ - if (!CryptStringToBinaryA(buffer, *buffer_len, CRYPT_STRING_BASE64HEADER, - der_buffer, &der_buffer_length, NULL, NULL)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - *buffer_len= der_buffer_length; - free(buffer); - - return der_buffer; - -end: - if (hfile != INVALID_HANDLE_VALUE) - CloseHandle(hfile); - if (buffer) - LocalFree(buffer); - if (der_buffer) - LocalFree(der_buffer); - *buffer_len= 0; - return NULL; -} -/* }}} */ - -static LPBYTE ma_schannel_read(MARIADB_PVIO* pvio, const char* PemFile, DWORD* buffer_len) -{ - HANDLE hfile = NULL; - char* buffer = NULL; - DWORD dwBytesRead = 0; - - if ((hfile = CreateFile(PemFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE) - { - ma_schannel_set_win_error(pvio); - return NULL; - } - - if (!(*buffer_len = GetFileSize(hfile, NULL))) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Invalid pem format"); - goto end; - } - - if (!(buffer = malloc((size_t)* buffer_len + 1))) - { - pvio->set_error(pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, NULL); - goto end; - } - - if (!ReadFile(hfile, buffer, *buffer_len, &dwBytesRead, NULL)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - buffer[*buffer_len] = 0; - - CloseHandle(hfile); - return buffer; -end: - if (hfile != INVALID_HANDLE_VALUE) - CloseHandle(hfile); - if (buffer) - free(buffer); - *buffer_len = 0; - return NULL; -} - -LPBYTE ma_schannel_convert_base64(MARIADB_PVIO* pvio, char* buffer, DWORD buffer_len, DWORD* der_len) -{ - LPBYTE der_buffer = NULL; - - *der_len = 0; - - /* calculate the length of DER binary */ - if (!CryptStringToBinaryA(buffer, buffer_len, CRYPT_STRING_BASE64HEADER, - NULL, der_len, NULL, NULL)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - /* allocate DER binary buffer */ - if (!(der_buffer = (LPBYTE)malloc(*der_len))) - { - pvio->set_error(pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, NULL); - goto end; - } - /* convert to DER binary */ - if (!CryptStringToBinaryA(buffer, buffer_len, CRYPT_STRING_BASE64HEADER, - der_buffer, der_len, NULL, NULL)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - return der_buffer; -end: - if (der_buffer) - free(der_buffer); - return NULL; -} - - -DWORD ma_schannel_load_certs_and_keys(MARIADB_PVIO* pvio, const char* PemFileName, SC_CTX* ctx) -{ - char* buffer = NULL; - char* p, * type; - DWORD buffer_len = 0; - LPBYTE der_buffer = NULL; - DWORD der_buffer_length = 0; - - /* check if cert and key was already loaded */ - if (ctx->client_cert_ctx && ctx->der_key) - return 0; - - if (!(buffer = ma_schannel_read(pvio, PemFileName, &buffer_len))) - return 0; - - p = buffer; - - while ((p = strstr(p, "-----BEGIN"))) - { - my_bool is_cert = 0; - char* cert_end = strstr(p, "-----END"); - - if (!cert_end) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Unknown or unsupported X509 PEM type"); goto error; - goto error; - } - - if (!(cert_end = strchr(cert_end, '\n'))) - goto error; - - if ((type = strstr(p, "CERTIFICATE")) && type < cert_end) - { - is_cert = 1; - /* We only read first certificate, further certificates will be ignored */ - if (ctx->client_cert_ctx) - { - p = cert_end; - continue; - } - } - else if ((type = strstr(p, "PRIVATE KEY")) && type < cert_end) - { - /* We only read the first key, further keys will be ignored */ - if (ctx->der_key) - { - p = cert_end; - continue; - } - } - else - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Unknown or unsupported X509 PEM type"); - goto error; - } - - if (!(der_buffer = ma_schannel_convert_base64(pvio, p, (DWORD)(cert_end - p), &der_buffer_length))) - goto error; - - if (is_cert) - { - if (!(ctx->client_cert_ctx = (CERT_CONTEXT*)CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - der_buffer, der_buffer_length))) - { - ma_schannel_set_win_error(pvio); - goto error; - } - } - else - { - if (!(ctx->der_key= (struct st_DER *)malloc(sizeof(struct st_DER)))) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Not enough memory"); - goto error; - } - - ctx->der_key->der_buffer = der_buffer; - ctx->der_key->der_length = der_buffer_length; - - der_buffer = 0; - der_buffer_length = 0; - p = cert_end; - } - - free(der_buffer); - der_buffer = 0; - der_buffer_length = 0; - p = cert_end; - - if (ctx->client_cert_ctx && ctx->der_key) - break; - } - free(buffer); - return 0; -error: - if (buffer) - free(buffer); - if (der_buffer) - free(der_buffer); - return 1; -} - -void ma_delete_key_buffer(SC_CTX* ctx) -{ - if (!ctx->der_key) - return; - free(ctx->der_key->der_buffer); - free(ctx->der_key); - ctx->der_key = 0; -} - - -/* {{{ CERT_CONTEXT *ma_schannel_create_cert_context(MARIADB_PVIO *pvio, const char *pem_file) */ -/* - Create a certification context from ca or cert file - - SYNOPSIS - ma_schannel_create_cert_context() - pvio pvio object - pem_file name of certificate or ca file - - DESCRIPTION - Loads a PEM file (certificate authority or certificate) creates a certification - context and loads the binary representation into context. - The returned context must be freed by caller. - If the function failed, error can be retrieved by GetLastError(). - - RETURNS - NULL If loading of the file or creating context failed - CERT_CONTEXT * A pointer to a certification context structure -*/ -CERT_CONTEXT *ma_schannel_create_cert_context(MARIADB_PVIO *pvio, const char *pem_file) -{ - DWORD der_buffer_length; - LPBYTE der_buffer= NULL; - - CERT_CONTEXT *ctx= NULL; - - /* create DER binary object from ca/certification file */ - if (!(der_buffer= ma_schannel_load_pem(pvio, pem_file, (DWORD *)&der_buffer_length))) - goto end; - if (!(ctx= (CERT_CONTEXT *)CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - der_buffer, der_buffer_length))) - ma_schannel_set_win_error(pvio); - -end: - if (der_buffer) - LocalFree(der_buffer); - return ctx; -} -/* }}} */ - -/* {{{ PCCRL_CONTEXT ma_schannel_create_crl_context(MARIADB_PVIO *pvio, const char *pem_file) */ -/* - Create a crl context from crlfile - - SYNOPSIS - ma_schannel_create_crl_context() - pem_file name of certificate or ca file - - DESCRIPTION - Loads a certification revocation list file, creates a certification - context and loads the binary representation into crl context. - The returned context must be freed by caller. - If the function failed, error can be retrieved by GetLastError(). - - RETURNS - NULL If loading of the file or creating context failed - PCCRL_CONTEXT A pointer to a certification context structure -*/ -PCCRL_CONTEXT ma_schannel_create_crl_context(MARIADB_PVIO *pvio, const char *pem_file) -{ - DWORD der_buffer_length; - LPBYTE der_buffer= NULL; - PCCRL_CONTEXT ctx= NULL; - - /* load ca pem file into memory */ - if (!(der_buffer= ma_schannel_load_pem(pvio, pem_file, (DWORD *)&der_buffer_length))) - goto end; - if (!(ctx= CertCreateCRLContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - der_buffer, der_buffer_length))) - ma_schannel_set_win_error(pvio); -end: - if (der_buffer) - free(der_buffer); - return ctx; -} -/* }}} */ - -/* {{{ my_bool ma_schannel_load_private_key(MARIADB_PVIO *pvio, CERT_CONTEXT *ctx, char *key_file) */ -/* - Load private key into context - - SYNOPSIS - ma_schannel_load_private_key() - ctx pointer to a certification context - pem_file name of certificate or ca file - - DESCRIPTION - Loads a certification revocation list file, creates a certification - context and loads the binary representation into crl context. - The returned context must be freed by caller. - If the function failed, error can be retrieved by GetLastError(). - - RETURNS - NULL If loading of the file or creating context failed - PCCRL_CONTEXT A pointer to a certification context structure -*/ - -my_bool ma_schannel_load_private_key(MARIADB_PVIO *pvio, SC_CTX *ctx) -{ - DWORD priv_key_len= 0; - LPBYTE priv_key= NULL; - HCRYPTPROV crypt_prov= 0; - HCRYPTKEY crypt_key= 0; - CERT_KEY_CONTEXT kpi={ 0 }; - my_bool rc= 0; - - if (!ctx->der_key || !ctx->client_cert_ctx) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Invalid certificate or key"); - goto end; - } - - /* determine required buffer size for decoded private key */ - if (!CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - PKCS_RSA_PRIVATE_KEY, - ctx->der_key->der_buffer, ctx->der_key->der_length, - 0, NULL, - NULL, &priv_key_len)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - /* allocate buffer for decoded private key */ - if (!(priv_key= malloc(priv_key_len))) - { - pvio->set_error(pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, NULL); - goto end; - } - - if (!CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, - PKCS_RSA_PRIVATE_KEY, - ctx->der_key->der_buffer, ctx->der_key->der_length, - 0, NULL, - priv_key, &priv_key_len)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - /* Acquire context */ - if (!CryptAcquireContext(&crypt_prov, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - /* ... and import the private key */ - if (!CryptImportKey(crypt_prov, priv_key, priv_key_len, 0, 0, (HCRYPTKEY *)&crypt_key)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - kpi.hCryptProv= crypt_prov; - kpi.dwKeySpec = AT_KEYEXCHANGE; - kpi.cbSize= sizeof(kpi); - - /* assign private key to certificate context */ - if (CertSetCertificateContextProperty(ctx->client_cert_ctx, CERT_KEY_CONTEXT_PROP_ID, 0, &kpi)) - rc= 1; - else - ma_schannel_set_win_error(pvio); - -end: - if (ctx->der_key) - { - free(ctx->der_key->der_buffer); - free(ctx->der_key); - ctx->der_key = 0; - } - if (priv_key) - { - if (crypt_key) - CryptDestroyKey(crypt_key); - free(priv_key); - if (!rc) - if (crypt_prov) - CryptReleaseContext(crypt_prov, 0); - } - return rc; -} /* }}} */ /* {{{ SECURITY_STATUS ma_schannel_handshake_loop(MARIADB_PVIO *pvio, my_bool InitialRead, SecBuffer *pExtraData) */ @@ -679,7 +158,7 @@ rc = InitializeSecurityContextA(&sctx->CredHdl, - &sctx->ctxt, + &sctx->hCtxt, NULL, dwSSPIFlags, 0, @@ -702,7 +181,7 @@ if(nbytes <= 0) { FreeContextBuffer(OutBuffers.pvBuffer); - DeleteSecurityContext(&sctx->ctxt); + DeleteSecurityContext(&sctx->hCtxt); return SEC_E_INTERNAL_ERROR; } cbData= (DWORD)nbytes; @@ -724,7 +203,7 @@ { if (!(pExtraData->pvBuffer= LocalAlloc(0, InBuffers[1].cbBuffer))) return SEC_E_INSUFFICIENT_MEMORY; - + MoveMemory(pExtraData->pvBuffer, IoBuffer + (cbIoBuffer - InBuffers[1].cbBuffer), InBuffers[1].cbBuffer ); pExtraData->BufferType = SECBUFFER_TOKEN; pExtraData->cbBuffer = InBuffers[1].cbBuffer; @@ -736,7 +215,7 @@ pExtraData->cbBuffer= 0; } break; - + case SEC_I_INCOMPLETE_CREDENTIALS: /* Provided credentials didn't contain a valid client certificate. We will try to connect anonymously, using current credentials */ @@ -757,14 +236,14 @@ MoveMemory( IoBuffer, IoBuffer + (cbIoBuffer - InBuffers[1].cbBuffer), InBuffers[1].cbBuffer ); cbIoBuffer = InBuffers[1].cbBuffer; } - - cbIoBuffer = 0; + else + cbIoBuffer = 0; } loopend: if (FAILED(rc)) { ma_schannel_set_sec_error(pvio, rc); - DeleteSecurityContext(&sctx->ctxt); + DeleteSecurityContext(&sctx->hCtxt); } LocalFree(IoBuffer); @@ -797,10 +276,10 @@ SC_CTX *sctx; SecBuffer ExtraData; DWORD SFlags= ISC_REQ_SEQUENCE_DETECT | ISC_REQ_REPLAY_DETECT | - ISC_REQ_CONFIDENTIALITY | ISC_RET_EXTENDED_ERROR | + ISC_REQ_CONFIDENTIALITY | ISC_RET_EXTENDED_ERROR | ISC_REQ_USE_SUPPLIED_CREDS | ISC_REQ_ALLOCATE_MEMORY | ISC_REQ_STREAM; - + SecBufferDesc BufferOut; SecBuffer BuffersOut; @@ -828,7 +307,7 @@ SECURITY_NATIVE_DREP, NULL, 0, - &sctx->ctxt, + &sctx->hCtxt, &BufferOut, &OutFlags, NULL); @@ -841,7 +320,7 @@ /* send client hello packaet */ if(BuffersOut.cbBuffer != 0 && BuffersOut.pvBuffer != NULL) - { + { ssize_t nbytes = (DWORD)pvio->methods->write(pvio, (uchar *)BuffersOut.pvBuffer, (size_t)BuffersOut.cbBuffer); if (nbytes <= 0) @@ -855,7 +334,7 @@ /* allocate IO-Buffer for write operations: After handshake was successful, we are able now to calculate payload */ - if ((sRet = QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_STREAM_SIZES, &sctx->Sizes ))) + if ((sRet = QueryContextAttributes(&sctx->hCtxt, SECPKG_ATTR_STREAM_SIZES, &sctx->Sizes ))) goto end; sctx->IoBufferSize= SCHANNEL_PAYLOAD(sctx->Sizes); @@ -867,10 +346,8 @@ return sRet; end: - LocalFree(sctx->IoBuffer); - sctx->IoBufferSize= 0; - FreeContextBuffer(BuffersOut.pvBuffer); - DeleteSecurityContext(&sctx->ctxt); + if (BuffersOut.pvBuffer) + FreeContextBuffer(BuffersOut.pvBuffer); return sRet; } /* }}} */ @@ -898,7 +375,6 @@ */ SECURITY_STATUS ma_schannel_read_decrypt(MARIADB_PVIO *pvio, - PCredHandle phCreds, CtxtHandle * phContext, DWORD *DecryptLength, uchar *ReadBuffer, @@ -1007,85 +483,58 @@ } } /* }}} */ - -my_bool ma_schannel_verify_certs(MARIADB_TLS *ctls) +#include "win32_errmsg.h" +my_bool ma_schannel_verify_certs(MARIADB_TLS *ctls, BOOL verify_server_name) { - SECURITY_STATUS sRet; - + SECURITY_STATUS status; + MARIADB_PVIO *pvio= ctls->pvio; MYSQL *mysql= pvio->mysql; SC_CTX *sctx = (SC_CTX *)ctls->ssl; - const char *ca_file= mysql->options.ssl_ca; + const char* ca_path = mysql->options.ssl_capath; const char *crl_file= mysql->options.extension ? mysql->options.extension->ssl_crl : NULL; + const char* crl_path = mysql->options.extension ? mysql->options.extension->ssl_crlpath : NULL; PCCERT_CONTEXT pServerCert= NULL; - CRL_CONTEXT *crl_ctx= NULL; - CERT_CONTEXT *ca_ctx= NULL; + char errmsg[256]; + HCERTSTORE store= NULL; int ret= 0; - if (!ca_file && !crl_file) - return 1; - - if (ca_file && !(ca_ctx = ma_schannel_create_cert_context(pvio, ca_file))) - goto end; - - if (crl_file && !(crl_ctx= (CRL_CONTEXT *)ma_schannel_create_crl_context(pvio, mysql->options.extension->ssl_crl))) + status = schannel_create_store(ca_file, ca_path, crl_file, crl_path, &store, errmsg, sizeof(errmsg)); + if(status) goto end; - if ((sRet= QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (PVOID)&pServerCert)) != SEC_E_OK) + status = QueryContextAttributesA(&sctx->hCtxt, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (PVOID)&pServerCert); + if (status) { - ma_schannel_set_sec_error(pvio, sRet); + ma_format_win32_error(errmsg, sizeof(errmsg), GetLastError(), + "QueryContextAttributes(SECPKG_ATTR_REMOTE_CERT_CONTEXT) failed."); goto end; } - if (ca_ctx) - { - DWORD flags = CERT_STORE_SIGNATURE_FLAG | CERT_STORE_TIME_VALIDITY_FLAG; - if (!CertVerifySubjectCertificateContext(pServerCert, ca_ctx, &flags)) - { - ma_schannel_set_win_error(pvio); - goto end; - } - - if (flags) - { - if ((flags & CERT_STORE_SIGNATURE_FLAG) != 0) - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Certificate signature check failed"); - else if ((flags & CERT_STORE_REVOCATION_FLAG) != 0) - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: certificate was revoked"); - else if ((flags & CERT_STORE_TIME_VALIDITY_FLAG) != 0) - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: certificate has expired"); - else - pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Unknown error during certificate validation"); - goto end; - } - } + status = schannel_verify_server_certificate( + pServerCert, + store, + crl_file != 0 || crl_path != 0, + mysql->host, + verify_server_name, + errmsg, sizeof(errmsg)); + if (status) + goto end; - /* Check certificates in the certificate chain have been revoked. */ - if (crl_ctx) - { - if (!CertVerifyCRLRevocation(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, pServerCert->pCertInfo, 1, &crl_ctx->pCrlInfo)) - { - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: CRL Revocation test failed"); - goto end; - } - } ret= 1; end: - if (crl_ctx) + if (!ret) { - CertFreeCRLContext(crl_ctx); - } - if (ca_ctx) - { - CertFreeCertificateContext(ca_ctx); + pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, + "SSL connection error: %s", errmsg); } if (pServerCert) - { CertFreeCertificateContext(pServerCert); - } + if(store) + schannel_free_store(store); return ret; } @@ -1148,7 +597,7 @@ Message.ulVersion = SECBUFFER_VERSION; Message.cBuffers = 4; Message.pBuffers = Buffers; - if ((scRet = EncryptMessage(&sctx->ctxt, 0, &Message, 0))!= SEC_E_OK) + if ((scRet = EncryptMessage(&sctx->hCtxt, 0, &Message, 0))!= SEC_E_OK) return -1; write_size = Buffers[0].cbBuffer + Buffers[1].cbBuffer + Buffers[2].cbBuffer; nbytes = pvio->methods->write(pvio, sctx->IoBuffer, write_size); @@ -1168,7 +617,7 @@ sctx= (SC_CTX *)ctls->ssl; - if (QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_CONNECTION_INFO, &ConnectionInfo) != SEC_E_OK) + if (QueryContextAttributes(&sctx->hCtxt, SECPKG_ATTR_CONNECTION_INFO, &ConnectionInfo) != SEC_E_OK) return -1; switch(ConnectionInfo.dwProtocol) diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/ma_schannel.h mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/ma_schannel.h --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/ma_schannel.h 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/ma_schannel.h 2020-01-26 18:37:27.000000000 +0000 @@ -52,15 +52,11 @@ }; struct st_schannel { - HCERTSTORE cert_store; - const CERT_CONTEXT *client_cert_ctx; - struct st_DER *der_key; CredHandle CredHdl; - my_bool FreeCredHdl; PUCHAR IoBuffer; DWORD IoBufferSize; SecPkgContext_StreamSizes Sizes; - CtxtHandle ctxt; + CtxtHandle hCtxt; /* Cached data from the last read/decrypt call.*/ SecBuffer extraBuf; /* encrypted data read from server. */ @@ -73,20 +69,16 @@ extern HCERTSTORE ca_CertStore, crl_CertStore; extern my_bool ca_Check, crl_Check; -DWORD ma_schannel_load_certs_and_keys(MARIADB_PVIO* pvio, const char* PemFileName, SC_CTX* ctx); -CERT_CONTEXT *ma_schannel_create_cert_context(MARIADB_PVIO *pvio, const char *pem_file); +; SECURITY_STATUS ma_schannel_client_handshake(MARIADB_TLS *ctls); SECURITY_STATUS ma_schannel_handshake_loop(MARIADB_PVIO *pvio, my_bool InitialRead, SecBuffer *pExtraData); -my_bool ma_schannel_load_private_key(MARIADB_PVIO *pvio, SC_CTX *ctx); -PCCRL_CONTEXT ma_schannel_create_crl_context(MARIADB_PVIO *pvio, const char *pem_file); -void ma_delete_key_buffer(SC_CTX* ctx); -my_bool ma_schannel_verify_certs(MARIADB_TLS *ctls); + +my_bool ma_schannel_verify_certs(MARIADB_TLS *ctls, BOOL verify_server_name); ssize_t ma_schannel_write_encrypt(MARIADB_PVIO *pvio, uchar *WriteBuffer, size_t WriteBufferSize); - SECURITY_STATUS ma_schannel_read_decrypt(MARIADB_PVIO *pvio, - PCredHandle phCreds, - CtxtHandle * phContext, +SECURITY_STATUS ma_schannel_read_decrypt(MARIADB_PVIO *pvio, + CtxtHandle* phContext, DWORD *DecryptLength, uchar *ReadBuffer, DWORD ReadBufferSize); diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/openssl.c mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/openssl.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/openssl.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/openssl.c 2020-01-26 18:37:27.000000000 +0000 @@ -530,8 +530,7 @@ X509_STORE_set_flags(certstore, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); } } - SSL_CTX_set_verify(ctx, (mysql->options.ssl_ca || mysql->options.ssl_capath)? - SSL_VERIFY_PEER : SSL_VERIFY_NONE, NULL); + SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL); return 0; error: @@ -647,7 +646,8 @@ pvio->methods->blocking(pvio, FALSE, 0); return 1; } - if ((mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT)) + if ((mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) || + (mysql->options.ssl_ca || mysql->options.ssl_capath)) { rc= SSL_get_verify_result(ssl); if (rc != X509_V_OK) diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/schannel.c mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/schannel.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel.c 2020-01-26 18:37:27.000000000 +0000 @@ -18,6 +18,8 @@ *************************************************************************************/ #include "ma_schannel.h" +#include "schannel_certs.h" +#include #pragma comment (lib, "crypt32.lib") #pragma comment (lib, "secur32.lib") @@ -158,8 +160,7 @@ #define MAX_ALG_ID 50 -void ma_schannel_set_sec_error(MARIADB_PVIO *pvio, DWORD ErrorNo); -void ma_schannel_set_win_error(MYSQL *mysql); +extern void ma_schannel_set_sec_error(MARIADB_PVIO *pvio, DWORD ErrorNo); /* Initializes SSL and allocate global @@ -196,16 +197,13 @@ } /* {{{ static int ma_tls_set_client_certs(MARIADB_TLS *ctls) */ -static int ma_tls_set_client_certs(MARIADB_TLS *ctls) +static int ma_tls_set_client_certs(MARIADB_TLS *ctls,const CERT_CONTEXT **cert_ctx) { MYSQL *mysql= ctls->pvio->mysql; char *certfile= mysql->options.ssl_cert, *keyfile= mysql->options.ssl_key; - SC_CTX *sctx= (SC_CTX *)ctls->ssl; MARIADB_PVIO *pvio= ctls->pvio; - - sctx->client_cert_ctx= NULL; - sctx->der_key = NULL; + char errmsg[256]; if (!certfile && keyfile) certfile= keyfile; @@ -215,23 +213,10 @@ if (!certfile) return 0; - if (certfile && ma_schannel_load_certs_and_keys(pvio, certfile, sctx)) - return 1; - - if (keyfile && ma_schannel_load_certs_and_keys(pvio, keyfile, sctx)) - return 1; - - if (sctx->client_cert_ctx) - { - if (!ma_schannel_load_private_key(pvio, sctx)) - return 1; - } - else if (sctx->der_key) + *cert_ctx = schannel_create_cert_context(certfile, keyfile, errmsg, sizeof(errmsg)); + if (!*cert_ctx) { - free(sctx->der_key->der_buffer); - free(sctx->der_key); - sctx->der_key = 0; - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Cert not found"); + pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: %s", errmsg); return 1; } @@ -242,9 +227,12 @@ /* {{{ void *ma_tls_init(MARIADB_TLS *ctls, MYSQL *mysql) */ void *ma_tls_init(MYSQL *mysql) { - SC_CTX *sctx= NULL; - if ((sctx= (SC_CTX *)LocalAlloc(0, sizeof(SC_CTX)))) - ZeroMemory(sctx, sizeof(SC_CTX)); + SC_CTX *sctx = (SC_CTX *)LocalAlloc(LMEM_ZEROINIT, sizeof(SC_CTX)); + if (sctx) + { + SecInvalidateHandle(&sctx->CredHdl); + SecInvalidateHandle(&sctx->hCtxt); + } return sctx; } /* }}} */ @@ -298,7 +286,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls) { MYSQL *mysql; - SCHANNEL_CRED Cred; + SCHANNEL_CRED Cred = {0}; MARIADB_PVIO *pvio; my_bool rc= 1; SC_CTX *sctx; @@ -306,20 +294,20 @@ ALG_ID AlgId[MAX_ALG_ID]; size_t i; DWORD protocol = 0; + int verify_certs; + const CERT_CONTEXT* cert_context = NULL; + + if (!ctls) + return 1; - - if (!ctls || !ctls->pvio) - return 1;; - pvio= ctls->pvio; sctx= (SC_CTX *)ctls->ssl; + if (!pvio || !sctx) + return 1; mysql= pvio->mysql; - - if (ma_tls_set_client_certs(ctls)) - goto end; - - ZeroMemory(&Cred, sizeof(SCHANNEL_CRED)); + if (!mysql) + return 1; /* Set cipher */ if (mysql->options.ssl_cipher) @@ -331,10 +319,10 @@ */ for (i = 0; i < sizeof(tls_version) / sizeof(tls_version[0]); i++) { - if (!stricmp(mysql->options.ssl_cipher, tls_version[i].tls_version)) + if (!_stricmp(mysql->options.ssl_cipher, tls_version[i].tls_version)) protocol |= tls_version[i].protocol; } - memset(AlgId, 0, MAX_ALG_ID * sizeof(ALG_ID)); + memset(AlgId, 0, sizeof(AlgId)); Cred.cSupportedAlgs = (DWORD)set_cipher(mysql->options.ssl_cipher, protocol, AlgId, MAX_ALG_ID); if (Cred.cSupportedAlgs) { @@ -351,11 +339,6 @@ Cred.dwFlags = SCH_CRED_NO_SERVERNAME_CHECK | SCH_CRED_NO_DEFAULT_CREDS | SCH_CRED_MANUAL_CRED_VALIDATION; - if (sctx->client_cert_ctx) - { - Cred.cCreds = 1; - Cred.paCred = &sctx->client_cert_ctx; - } if (mysql->options.extension && mysql->options.extension->tls_version) { if (strstr(mysql->options.extension->tls_version, "TLSv1.0")) @@ -368,30 +351,40 @@ if (!Cred.grbitEnabledProtocols) Cred.grbitEnabledProtocols = SP_PROT_TLS1_0_CLIENT | SP_PROT_TLS1_1_CLIENT | SP_PROT_TLS1_2_CLIENT; - if ((sRet= AcquireCredentialsHandleA(NULL, UNISP_NAME_A, SECPKG_CRED_OUTBOUND, - NULL, &Cred, NULL, NULL, &sctx->CredHdl, NULL)) != SEC_E_OK) + + if (ma_tls_set_client_certs(ctls, &cert_context)) + goto end; + + if (cert_context) + { + Cred.cCreds = 1; + Cred.paCred = &cert_context; + } + sRet= AcquireCredentialsHandleA(NULL, UNISP_NAME_A, SECPKG_CRED_OUTBOUND, + NULL, &Cred, NULL, NULL, &sctx->CredHdl, NULL); + if (sRet) { ma_schannel_set_sec_error(pvio, sRet); goto end; } - sctx->FreeCredHdl= 1; - if (ma_schannel_client_handshake(ctls) != SEC_E_OK) goto end; - - if (!ma_schannel_verify_certs(ctls)) - goto end; - - return 0; + + verify_certs = mysql->options.ssl_ca || mysql->options.ssl_capath || + (mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT); + + if (verify_certs) + { + if (!ma_schannel_verify_certs(ctls, (mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT))) + goto end; + } + + rc = 0; end: - if (rc && sctx->IoBufferSize) - LocalFree(sctx->IoBuffer); - sctx->IoBufferSize= 0; - if (sctx->client_cert_ctx) - CertFreeCertificateContext(sctx->client_cert_ctx); - sctx->client_cert_ctx= 0; - return 1; + if (cert_context) + schannel_free_cert_context(cert_context); + return rc; } ssize_t ma_tls_read(MARIADB_TLS *ctls, const uchar* buffer, size_t length) @@ -399,7 +392,7 @@ SC_CTX *sctx= (SC_CTX *)ctls->ssl; MARIADB_PVIO *pvio= ctls->pvio; DWORD dlength= 0; - SECURITY_STATUS status = ma_schannel_read_decrypt(pvio, &sctx->CredHdl, &sctx->ctxt, &dlength, (uchar *)buffer, (DWORD)length); + SECURITY_STATUS status = ma_schannel_read_decrypt(pvio, &sctx->hCtxt, &dlength, (uchar *)buffer, (DWORD)length); if (status == SEC_I_CONTEXT_EXPIRED) return 0; /* other side shut down the connection. */ if (status == SEC_I_RENEGOTIATE) @@ -431,12 +424,13 @@ if (sctx) { - if (sctx->IoBufferSize) - LocalFree(sctx->IoBuffer); - if (sctx->client_cert_ctx) - CertFreeCertificateContext(sctx->client_cert_ctx); - FreeCredentialHandle(&sctx->CredHdl); - DeleteSecurityContext(&sctx->ctxt); + LocalFree(sctx->IoBuffer); + + if (SecIsValidHandle(&sctx->CredHdl)) + FreeCredentialHandle(&sctx->CredHdl); + + if (SecIsValidHandle(&sctx->hCtxt)) + DeleteSecurityContext(&sctx->hCtxt); } LocalFree(sctx); return 0; @@ -445,87 +439,8 @@ int ma_tls_verify_server_cert(MARIADB_TLS *ctls) { - SC_CTX *sctx= (SC_CTX *)ctls->ssl; - MARIADB_PVIO *pvio= ctls->pvio; - int rc= 1; - char *szName= NULL; - char *pszServerName= pvio->mysql->host; - PCCERT_CONTEXT pServerCert= NULL; - - /* check server name */ - if (pszServerName && (ctls->pvio->mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT)) - { - DWORD NameSize= 0; - char *p1; - SECURITY_STATUS sRet; - - if ((sRet= QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (PVOID)&pServerCert)) != SEC_E_OK) - { - ma_schannel_set_sec_error(pvio, sRet); - goto end; - } - - if (!(NameSize= CertGetNameString(pServerCert, - CERT_NAME_DNS_TYPE, - CERT_NAME_SEARCH_ALL_NAMES_FLAG, - NULL, NULL, 0))) - { - pvio->set_error(ctls->pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Can't retrieve name of server certificate"); - goto end; - } - - if (!(szName= (char *)LocalAlloc(0, NameSize + 1))) - { - pvio->set_error(ctls->pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, NULL); - goto end; - } - - if (!CertGetNameString(pServerCert, - CERT_NAME_DNS_TYPE, - CERT_NAME_SEARCH_ALL_NAMES_FLAG, - NULL, szName, NameSize)) - - { - pvio->set_error(ctls->pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "SSL connection error: Can't retrieve name of server certificate"); - goto end; - } - - /* szName may contain multiple names: Each name is zero terminated, the last name is - double zero terminated */ - - - p1 = szName; - while (p1 && *p1 != 0) - { - size_t len = strlen(p1); - /* check if given name contains wildcard */ - if (len && *p1 == '*') - { - size_t hostlen = strlen(pszServerName); - if (hostlen < len) - break; - if (!stricmp(pszServerName + hostlen - len + 1, p1 + 1)) - { - rc = 0; - goto end; - } - } - else if (!stricmp(pszServerName, p1)) - { - rc = 0; - goto end; - } - p1 += (len + 1); - } - pvio->set_error(pvio->mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, - "SSL connection error: Name of server certificate didn't match"); - } -end: - if (szName) - LocalFree(szName); - if (pServerCert) - CertFreeCertificateContext(pServerCert); - return rc; + /* Done elsewhere */ + return 0; } static const char *cipher_name(const SecPkgContext_CipherInfo *CipherInfo) @@ -550,7 +465,7 @@ return NULL; sctx= (SC_CTX *)ctls->ssl; - sRet= QueryContextAttributesA(&sctx->ctxt, SECPKG_ATTR_CIPHER_INFO, (PVOID)&CipherInfo); + sRet= QueryContextAttributesA(&sctx->hCtxt, SECPKG_ATTR_CIPHER_INFO, (PVOID)&CipherInfo); if (sRet != SEC_E_OK) return NULL; @@ -562,7 +477,7 @@ { SC_CTX *sctx= (SC_CTX *)ctls->ssl; PCCERT_CONTEXT pRemoteCertContext = NULL; - if (QueryContextAttributes(&sctx->ctxt, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (PVOID)&pRemoteCertContext) != SEC_E_OK) + if (QueryContextAttributes(&sctx->hCtxt, SECPKG_ATTR_REMOTE_CERT_CONTEXT, (PVOID)&pRemoteCertContext) != SEC_E_OK) return 0; CertGetCertificateContextProperty(pRemoteCertContext, CERT_HASH_PROP_ID, fp, (DWORD *)&len); CertFreeCertificateContext(pRemoteCertContext); diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/schannel_certs.c mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel_certs.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/schannel_certs.c 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel_certs.c 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,855 @@ +/************************************************************************************ + Copyright (C) 2019 MariaDB + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not see + or write to the Free Software Foundation, Inc., + 51 Franklin St., Fifth Floor, Boston, MA 02110, USA + + *************************************************************************************/ + + /* + This module contain X509 certificate handling on Windows. + PEM parsing, loading client certificate and key, server certificate validation + */ + + /* + CERT_CHAIN_ENGINE_CONFIG has additional members in Windows 8.1 + To allow client to be work on pre-8.1 Windows, compile + with corresponding _WIN32_WINNT + */ +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0601 +#endif + +#include "schannel_certs.h" +#include +#include +#include +#include +#include +#include +#include +#include "win32_errmsg.h" + + /* + Return GetLastError(), or, if this unexpectedly gives success, + return ERROR_INTERNAL_ERROR. + + Background - in several cases in this module we return GetLastError() + after an Windows function fails. However, we do not want the function to + return success, even if GetLastError() was suddenly 0. + */ +static DWORD get_last_error() +{ + DWORD ret = GetLastError(); + if (ret) + return ret; + + // We generally expect last error to be set API fails. + // thus the debug assertion- + assert(0); + return ERROR_INTERNAL_ERROR; +} + +#define FAIL(fmt,...) \ + {\ + status = get_last_error();\ + ma_format_win32_error(errmsg, errmsg_len, status, fmt, __VA_ARGS__);\ + goto cleanup;\ + } + +/* + Load file into memory. Add null terminator at the end, so it will be a valid C string. +*/ +static char* pem_file_to_string(const char* file, char* errmsg, size_t errmsg_len) +{ + LARGE_INTEGER file_size; + size_t file_bufsize = 0; + size_t total_bytes_read = 0; + char* file_buffer = NULL; + SECURITY_STATUS status = SEC_E_OK; + + HANDLE file_handle = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (file_handle == INVALID_HANDLE_VALUE) + { + FAIL("failed to open file '%s'", file); + } + + if (!GetFileSizeEx(file_handle, &file_size)) + { + FAIL("GetFileSizeEx failed on '%s'", file); + } + + if (file_size.QuadPart > ULONG_MAX - 1) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("file '%s' too large", file); + } + + file_bufsize = (size_t)file_size.QuadPart; + file_buffer = (char*)LocalAlloc(0,file_bufsize + 1); + if (!file_buffer) + { + FAIL("LocalAlloc(0,%zu) failed", file_bufsize + 1); + } + + while (total_bytes_read < file_bufsize) + { + DWORD bytes_to_read = (DWORD)(file_bufsize - total_bytes_read); + DWORD bytes_read = 0; + + if (!ReadFile(file_handle, file_buffer + total_bytes_read, + bytes_to_read, &bytes_read, NULL)) + { + FAIL("ReadFile() failed to read file '%s'", file); + } + if (bytes_read == 0) + { + /* Premature EOF -- adjust the bufsize to the new value */ + file_bufsize = total_bytes_read; + } + else + { + total_bytes_read += bytes_read; + } + } + + /* Null terminate the buffer */ + file_buffer[file_bufsize] = '\0'; + +cleanup: + if (file_handle != INVALID_HANDLE_VALUE) + { + CloseHandle(file_handle); + } + if (status) + { + /* Some error happened. */ + LocalFree(file_buffer); + file_buffer = NULL; + } + return file_buffer; +} + + +// Structure for parsing BEGIN/END sections inside pem. +typedef struct _pem_type_desc +{ + const char* begin_tag; + size_t begin_tag_len; + const char* end_tag; + size_t end_tag_len; +} pem_type_desc; + +#define BEGIN_TAG(x) "-----BEGIN " x "-----" +#define END_TAG(x) "\n-----END " x "-----" +#define PEM_SECTION(tag) {BEGIN_TAG(tag), sizeof(BEGIN_TAG(tag))-1, END_TAG(tag), sizeof(END_TAG(tag))-1} + +typedef enum { + PEM_TYPE_CERTIFICATE = 0, + PEM_TYPE_X509_CRL, + PEM_TYPE_RSA_PRIVATE_KEY, + PEM_TYPE_PRIVATE_KEY +} PEM_TYPE; + +static const pem_type_desc pem_sections[] = { + PEM_SECTION("CERTIFICATE"), + PEM_SECTION("X509 CRL"), + PEM_SECTION("RSA PRIVATE KEY"), + PEM_SECTION("PRIVATE KEY") +}; + +/* + Locate a substring in pem for given type, + e.g section between BEGIN CERTIFICATE and END CERTIFICATE + in PEMs base64 format, with header and footer. + + output parameters 'begin' and 'end' are set upon return. + it is possible that functions returns 'begin' != NULL but + 'end' = NULL. This is generally a format error, meaning that + the end tag was not found +*/ +void pem_locate(char* pem_str, + PEM_TYPE type, + char** begin, + char** end) +{ + *begin = NULL; + *end = NULL; + char c; + + const pem_type_desc* desc = &pem_sections[type]; + *begin = strstr(pem_str, desc->begin_tag); + if (!(*begin)) + return; + + // We expect newline after the + // begin tag, LF or CRLF + c = (*begin)[desc->begin_tag_len]; + + if (c != '\r' && c != '\n') + { + *begin = NULL; + return; + } + + *end = strstr(*begin + desc->begin_tag_len + 1, desc->end_tag); + if (!*end) + return; // error, end marker not found + + (*end) += desc->end_tag_len; + return; +} + + +/* + Add certificates, or CRLs from a PEM file to Wincrypt store +*/ +static SECURITY_STATUS add_certs_to_store( + HCERTSTORE trust_store, + const char* file, + PEM_TYPE type, + char* errmsg, + size_t errmsg_len) +{ + char* file_buffer = NULL; + char* cur = NULL; + SECURITY_STATUS status = SEC_E_OK; + CRL_CONTEXT* crl_context = NULL; + CERT_CONTEXT* cert_context = NULL; + char* begin; + char* end; + + file_buffer = pem_file_to_string(file, errmsg, errmsg_len); + if (!file_buffer) + goto cleanup; + + for (cur = file_buffer; ; cur = end) + { + pem_locate(cur, type, &begin, &end); + + if (!begin) + break; + + if (!end) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("Invalid PEM file '%s', missing end marker corresponding to begin marker '%s' at offset %zu", + file, pem_sections[type].begin_tag, (size_t)(begin - file_buffer)); + } + CERT_BLOB cert_blob; + void* context = NULL; + DWORD actual_content_type = 0; + + cert_blob.pbData = (BYTE*)begin; + cert_blob.cbData = (DWORD)(end - begin); + if (!CryptQueryObject( + CERT_QUERY_OBJECT_BLOB, &cert_blob, + CERT_QUERY_CONTENT_FLAG_CERT | CERT_QUERY_CONTENT_FLAG_CRL, + CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, &actual_content_type, + NULL, NULL, NULL, (const void**)&context)) + { + FAIL("failed to extract certificate from PEM file '%s'",file); + } + + if (!context) + { + SetLastError(SEC_E_INTERNAL_ERROR); + FAIL("unexpected result from CryptQueryObject(),cert_context is NULL" + " after successful completion, file '%s'", + file); + } + + if (actual_content_type == CERT_QUERY_CONTENT_CERT) + { + CERT_CONTEXT* cert_context = (CERT_CONTEXT*)context; + if (!CertAddCertificateContextToStore( + trust_store, cert_context, + CERT_STORE_ADD_ALWAYS, NULL)) + { + FAIL("CertAddCertificateContextToStore failed"); + } + } + else if (actual_content_type == CERT_QUERY_CONTENT_CRL) + { + CRL_CONTEXT* crl_context = (CRL_CONTEXT*)context; + if (!CertAddCRLContextToStore( + trust_store, crl_context, + CERT_STORE_ADD_ALWAYS, NULL)) + { + FAIL("CertAddCRLContextToStore() failed"); + } + } + } +cleanup: + LocalFree(file_buffer); + if (cert_context) + CertFreeCertificateContext(cert_context); + if (crl_context) + CertFreeCRLContext(crl_context); + return status; +} + +/* +Add a directory to store, i.e try to load all files. +(extract certificates and add them to store) + +@return 0 on success, error only if directory is invalid. +*/ +SECURITY_STATUS add_dir_to_store(HCERTSTORE trust_store, const char* dir, + PEM_TYPE type, char* errmsg, size_t errmsg_len) +{ + WIN32_FIND_DATAA ffd; + char path[MAX_PATH]; + char pattern[MAX_PATH]; + DWORD dwAttr; + HANDLE hFind = INVALID_HANDLE_VALUE; + SECURITY_STATUS status = SEC_E_OK; + + if ((dwAttr = GetFileAttributes(dir)) == INVALID_FILE_ATTRIBUTES) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("directory '%s' does not exist", dir); + } + if (!(dwAttr & FILE_ATTRIBUTE_DIRECTORY)) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("'%s' is not a directory", dir); + } + sprintf_s(pattern, sizeof(pattern), "%s\\*", dir); + hFind = FindFirstFile(pattern, &ffd); + if (hFind == INVALID_HANDLE_VALUE) + { + FAIL("FindFirstFile(%s) failed",pattern); + } + do + { + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + continue; + sprintf_s(path, sizeof(path), "%s\\%s", dir, ffd.cFileName); + + // ignore error from add_certs_to_store(), not all file + // maybe PEM. + add_certs_to_store(trust_store, path, type, errmsg, + errmsg_len); + } while (FindNextFile(hFind, &ffd) != 0); + +cleanup: + if (hFind != INVALID_HANDLE_VALUE) + FindClose(hFind); + + return status; +} + +/* Count certificates in store. */ +static int count_certificates(HCERTSTORE store) +{ + int num_certs = 0; + PCCERT_CONTEXT c = NULL; + + while ((c = CertEnumCertificatesInStore(store, c))) + num_certs++; + + return num_certs; +} + +/** + Creates certificate store with user defined CA chain and/or CRL. + Loads PEM certificate from files or directories. + + If only CRLFile/CRLPath is defined, the "system" store is duplicated, + and new CRLs are added to it. + + If CAFile/CAPAth is defined, then new empty store is created, and CAs + (and CRLs, if defined), are added to it. + + The function throws an error, if none of the files in CAFile/CAPath have a valid certificate. + It is also an error if CRLFile does not exist. +*/ +SECURITY_STATUS schannel_create_store( + const char* CAFile, + const char* CAPath, + const char* CRLFile, + const char* CRLPath, + HCERTSTORE* out_store, + char* errmsg, + size_t errmsg_len) +{ + + HCERTSTORE store = NULL; + HCERTSTORE system_store = NULL; + int status = SEC_E_OK; + + *out_store = NULL; + if (!CAFile && !CAPath && !CRLFile && !CRLPath) + { + /* Nothing to do, caller will use default store*/ + *out_store = NULL; + return SEC_E_OK; + } + if (CAFile || CAPath) + { + /* Open the certificate store */ + store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, (HCRYPTPROV)NULL, + CERT_STORE_CREATE_NEW_FLAG, NULL); + if (!store) + { + FAIL("CertOpenStore failed for memory store"); + } + } + else if (CRLFile || CRLPath) + { + /* Only CRL was provided, copy system store, add revocation list to + * it. */ + system_store = + CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, (HCRYPTPROV_LEGACY)NULL, + CERT_SYSTEM_STORE_CURRENT_USER, L"MY"); + if (!system_store) + { + FAIL("CertOpenStore failed for system store"); + } + + store = CertDuplicateStore(system_store); + if (!store) + { + FAIL("CertDuplicateStore failed"); + } + } + + if (CAFile) + { + status = add_certs_to_store(store, CAFile, + PEM_TYPE_CERTIFICATE, errmsg, errmsg_len); + if (status) + goto cleanup; + } + if (CAPath) + { + status = add_dir_to_store(store, CAPath, + PEM_TYPE_CERTIFICATE, errmsg, errmsg_len); + if (status) + goto cleanup; + } + + if ((CAFile || CAPath) && store && !count_certificates(store)) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("no valid certificates were found, CAFile='%s', CAPath='%s'", + CAFile ? CAFile : "", CAPath ? CAPath : ""); + } + + if (CRLFile) + { + status = add_certs_to_store(store, CRLFile, PEM_TYPE_X509_CRL, + errmsg, errmsg_len); + } + if (CRLPath) + { + status = add_dir_to_store(store, CRLPath, PEM_TYPE_X509_CRL, + errmsg, errmsg_len); + } + +cleanup: + if (system_store) + CertCloseStore(system_store, 0); + if (status && store) + { + CertCloseStore(store, 0); + store = NULL; + } + *out_store = store; + return status; +} + +/* + The main verification logic. + Taken almost completely from Windows 2003 Platform SDK 2003 + (Samples\Security\SSPI\SSL\WebClient.c) + + The only difference here is is usage of custom store + and chain engine. +*/ +static SECURITY_STATUS VerifyServerCertificate( + PCCERT_CONTEXT pServerCert, + HCERTSTORE hStore, + LPWSTR pwszServerName, + DWORD dwRevocationCheckFlags, + DWORD dwVerifyFlags, + LPSTR errmsg, + size_t errmsg_len) +{ + SSL_EXTRA_CERT_CHAIN_POLICY_PARA polExtra; + CERT_CHAIN_POLICY_PARA PolicyPara; + CERT_CHAIN_POLICY_STATUS PolicyStatus; + CERT_CHAIN_PARA ChainPara; + HCERTCHAINENGINE hChainEngine = NULL; + PCCERT_CHAIN_CONTEXT pChainContext = NULL; + LPSTR rgszUsages[] = { szOID_PKIX_KP_SERVER_AUTH, + szOID_SERVER_GATED_CRYPTO, + szOID_SGC_NETSCAPE }; + DWORD cUsages = sizeof(rgszUsages) / sizeof(LPSTR); + SECURITY_STATUS status = SEC_E_OK; + + if (pServerCert == NULL) + { + SetLastError(SEC_E_WRONG_PRINCIPAL); + FAIL("Invalid parameter pServerCert passed to VerifyServerCertificate"); + } + + ZeroMemory(&ChainPara, sizeof(ChainPara)); + ChainPara.cbSize = sizeof(ChainPara); + ChainPara.RequestedUsage.dwType = USAGE_MATCH_TYPE_OR; + ChainPara.RequestedUsage.Usage.cUsageIdentifier = cUsages; + ChainPara.RequestedUsage.Usage.rgpszUsageIdentifier = rgszUsages; + + if (hStore) + { + CERT_CHAIN_ENGINE_CONFIG EngineConfig = { 0 }; + EngineConfig.cbSize = sizeof(EngineConfig); + EngineConfig.hExclusiveRoot = hStore; + if (!CertCreateCertificateChainEngine(&EngineConfig, &hChainEngine)) + { + FAIL("CertCreateCertificateChainEngine failed"); + } + } + + if (!CertGetCertificateChain( + hChainEngine, + pServerCert, + NULL, + pServerCert->hCertStore, + &ChainPara, + dwRevocationCheckFlags, + NULL, + &pChainContext)) + { + FAIL("CertGetCertificateChain failed"); + goto cleanup; + } + + // Validate certificate chain. + ZeroMemory(&polExtra, sizeof(SSL_EXTRA_CERT_CHAIN_POLICY_PARA)); + polExtra.cbStruct = sizeof(SSL_EXTRA_CERT_CHAIN_POLICY_PARA); + polExtra.dwAuthType = AUTHTYPE_SERVER; + polExtra.fdwChecks = dwVerifyFlags; + polExtra.pwszServerName = pwszServerName; + + memset(&PolicyPara, 0, sizeof(PolicyPara)); + PolicyPara.cbSize = sizeof(PolicyPara); + PolicyPara.pvExtraPolicyPara = &polExtra; + + memset(&PolicyStatus, 0, sizeof(PolicyStatus)); + PolicyStatus.cbSize = sizeof(PolicyStatus); + + if (!CertVerifyCertificateChainPolicy( + CERT_CHAIN_POLICY_SSL, + pChainContext, + &PolicyPara, + &PolicyStatus)) + { + FAIL("CertVerifyCertificateChainPolicy failed"); + } + + if (PolicyStatus.dwError) + { + SetLastError(PolicyStatus.dwError); + FAIL("Server certificate validation failed"); + } + +cleanup: + if (hChainEngine) + { + CertFreeCertificateChainEngine(hChainEngine); + } + if (pChainContext) + { + CertFreeCertificateChain(pChainContext); + } + return status; +} + + +void schannel_free_store(HCERTSTORE store) +{ + if (store) + CertCloseStore(store, 0); +} + + +/* +Verify server certificate against a wincrypt store +@return 0 - success, otherwise error occured. +*/ +SECURITY_STATUS schannel_verify_server_certificate( + const CERT_CONTEXT* cert, + HCERTSTORE store, + BOOL check_revocation, + const char* server_name, + BOOL check_server_name, + char* errmsg, + size_t errmsg_len) +{ + SECURITY_STATUS status = SEC_E_OK; + wchar_t* wserver_name = NULL; + DWORD dwVerifyFlags; + DWORD dwRevocationFlags; + + if (check_server_name) + { + int cchServerName = (int)strlen(server_name) + 1; + wserver_name = (wchar_t*)LocalAlloc(0,sizeof(wchar_t) * cchServerName); + if (!wserver_name) + { + FAIL("LocalAlloc() failed"); + } + if (MultiByteToWideChar(CP_UTF8, 0, server_name, cchServerName, wserver_name, cchServerName) < 0) + { + FAIL("MultiByteToWideChar() failed"); + } + } + + dwVerifyFlags = 0; + dwRevocationFlags = 0; + if (check_revocation) + dwRevocationFlags |= CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT | CERT_CHAIN_REVOCATION_CHECK_CACHE_ONLY; + if (!check_server_name) + dwVerifyFlags |= SECURITY_FLAG_IGNORE_CERT_CN_INVALID; + + status = VerifyServerCertificate(cert, store, wserver_name ? wserver_name : L"SERVER_NAME", + dwRevocationFlags, dwVerifyFlags, errmsg, errmsg_len); + +cleanup: + LocalFree(wserver_name); + return status; +} + + +/* Attach private key (in PEM format) to client certificate */ +static SECURITY_STATUS load_private_key(CERT_CONTEXT* cert, char* private_key_str, size_t len, char* errmsg, size_t errmsg_len) +{ + DWORD derlen = (DWORD)len; + BYTE* derbuf = NULL; + DWORD keyblob_len = 0; + BYTE* keyblob = NULL; + HCRYPTPROV hProv = 0; + HCRYPTKEY hKey = 0; + CERT_KEY_CONTEXT cert_key_context = { 0 }; + PCRYPT_PRIVATE_KEY_INFO pki = NULL; + DWORD pki_len = 0; + SECURITY_STATUS status = SEC_E_OK; + + derbuf = LocalAlloc(0, derlen); + if (!derbuf) + { + FAIL("LocalAlloc failed") + } + + if (!CryptStringToBinaryA(private_key_str, (DWORD)len, CRYPT_STRING_BASE64HEADER, derbuf, &derlen, NULL, NULL)) + { + FAIL("Failed to convert BASE64 private key"); + } + + /* + To accomodate for both "BEGIN PRIVATE KEY" vs "BEGIN RSA PRIVATE KEY" + sections in PEM, we try to decode with PKCS_PRIVATE_KEY_INFO first, + and, if it fails, with PKCS_RSA_PRIVATE_KEY flag. + */ + if (CryptDecodeObjectEx( + X509_ASN_ENCODING, + PKCS_PRIVATE_KEY_INFO, + derbuf, derlen, + CRYPT_DECODE_ALLOC_FLAG, + NULL, &pki, &pki_len)) + { + // convert private key info to RSA private key blob + if (!CryptDecodeObjectEx( + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + PKCS_RSA_PRIVATE_KEY, + pki->PrivateKey.pbData, + pki->PrivateKey.cbData, + CRYPT_DECODE_ALLOC_FLAG, + NULL, &keyblob, &keyblob_len)) + { + FAIL("Failed to parse private key"); + } + } + else if (!CryptDecodeObjectEx( + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + PKCS_RSA_PRIVATE_KEY, + derbuf, derlen, + CRYPT_DECODE_ALLOC_FLAG, NULL, + &keyblob, &keyblob_len)) + { + FAIL("Failed to parse private key"); + } + + if (!CryptAcquireContext(&hProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) + { + FAIL("CryptAcquireContext failed"); + } + + if (!CryptImportKey(hProv, keyblob, keyblob_len, 0, 0, (HCRYPTKEY*)&hKey)) + { + FAIL("CryptImportKey failed"); + } + cert_key_context.hCryptProv = hProv; + cert_key_context.dwKeySpec = AT_KEYEXCHANGE; + cert_key_context.cbSize = sizeof(cert_key_context); + + /* assign private key to certificate context */ + if (!CertSetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, 0, &cert_key_context)) + { + FAIL("CertSetCertificateContextProperty failed"); + } + +cleanup: + LocalFree(derbuf); + LocalFree(keyblob); + LocalFree(pki); + if (hKey) + CryptDestroyKey(hKey); + if (status) + { + if (hProv) + CryptReleaseContext(hProv, 0); + } + return status; +} + +/* + Given PEM strings for certificate and private key, + create a client certificate* +*/ +static CERT_CONTEXT* create_client_certificate_mem( + char* cert_file_content, + char* key_file_content, + char* errmsg, + size_t errmsg_len) +{ + CERT_CONTEXT* ctx = NULL; + char* begin; + char* end; + CERT_BLOB cert_blob; + DWORD actual_content_type = 0; + SECURITY_STATUS status = SEC_E_OK; + + /* Parse certificate */ + pem_locate(cert_file_content, PEM_TYPE_CERTIFICATE, + &begin, &end); + + if (!begin || !end) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("Client certificate not found in PEM file"); + } + + cert_blob.pbData = (BYTE*)begin; + cert_blob.cbData = (DWORD)(end - begin); + if (!CryptQueryObject( + CERT_QUERY_OBJECT_BLOB, &cert_blob, + CERT_QUERY_CONTENT_FLAG_CERT, + CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, &actual_content_type, + NULL, NULL, NULL, (const void**)&ctx)) + { + FAIL("Can't parse client certficate"); + } + + /* Parse key */ + PEM_TYPE types[] = { PEM_TYPE_RSA_PRIVATE_KEY, PEM_TYPE_PRIVATE_KEY }; + for (int i = 0; i < sizeof(types) / sizeof(types[0]); i++) + { + pem_locate(key_file_content, types[i], &begin, &end); + if (begin && end) + { + /* Assign key to certificate.*/ + status = load_private_key(ctx, begin, (end - begin), errmsg, errmsg_len); + goto cleanup; + } + } + + if (!begin || !end) + { + SetLastError(SEC_E_INVALID_PARAMETER); + FAIL("Client private key not found in PEM"); + } + +cleanup: + if (status && ctx) + { + CertFreeCertificateContext(ctx); + ctx = NULL; + } + return ctx; +} + + +/* Given cert and key, as PEM file names, create a client certificate */ +CERT_CONTEXT* schannel_create_cert_context(char* cert_file, char* key_file, char* errmsg, size_t errmsg_len) +{ + CERT_CONTEXT* ctx = NULL; + char* key_file_content = NULL; + char* cert_file_content = NULL; + + cert_file_content = pem_file_to_string(cert_file, errmsg, errmsg_len); + + if (!cert_file_content) + goto cleanup; + + if (cert_file == key_file) + { + key_file_content = cert_file_content; + } + else + { + key_file_content = pem_file_to_string(key_file, errmsg, errmsg_len); + if (!key_file_content) + goto cleanup; + } + + ctx = create_client_certificate_mem(cert_file_content, key_file_content, errmsg, errmsg_len); + +cleanup: + LocalFree(cert_file_content); + if (cert_file != key_file) + LocalFree(key_file_content); + + return ctx; +} + +/* + Free certificate, and all resources, created by schannel_create_cert_context() +*/ +void schannel_free_cert_context(const CERT_CONTEXT* cert) +{ + /* release provider handle which was acquires in load_private_key() */ + CERT_KEY_CONTEXT cert_key_context = { 0 }; + cert_key_context.cbSize = sizeof(cert_key_context); + DWORD cbData = sizeof(CERT_KEY_CONTEXT); + + if (CertGetCertificateContextProperty(cert, CERT_KEY_CONTEXT_PROP_ID, &cert_key_context, &cbData)) + { + CryptReleaseContext(cert_key_context.hCryptProv, 0); + } + else + { + /* + At this point, there are serious doubts the context was created by + channel_create_cert_context(). + */ + assert(0); + } + CertFreeCertificateContext(cert); +} diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/schannel_certs.h mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel_certs.h --- mariadb-10.3-10.3.18/libmariadb/libmariadb/secure/schannel_certs.h 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/secure/schannel_certs.h 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,53 @@ +/************************************************************************************ + Copyright (C) 2019 MariaDB Corporation Ab + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not see + or write to the Free Software Foundation, Inc., + 51 Franklin St., Fifth Floor, Boston, MA 02110, USA + + *************************************************************************************/ + +#pragma once +#include +#include + +extern SECURITY_STATUS schannel_create_store( + const char* CAFile, + const char* CAPath, + const char* CRLFile, + const char* CRLPath, + HCERTSTORE* store, + char* errmsg, + size_t errmsg_len +); + +extern SECURITY_STATUS schannel_verify_server_certificate( + const CERT_CONTEXT* cert, + HCERTSTORE store, + BOOL check_revocation, + const char* server_name, + BOOL check_server_name, + char* errmsg, + size_t errmsg_len); + +extern void schannel_free_store(HCERTSTORE store); + +extern CERT_CONTEXT* schannel_create_cert_context( + char* cert_file, + char* key_file, + char* errmsg, + size_t errmsg_len); + +extern void schannel_free_cert_context(const CERT_CONTEXT* cert); + diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/win32_errmsg.c mariadb-10.3-10.3.22/libmariadb/libmariadb/win32_errmsg.c --- mariadb-10.3-10.3.18/libmariadb/libmariadb/win32_errmsg.c 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/win32_errmsg.c 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,132 @@ +/************************************************************************************ + Copyright (C) 2019 MariaDB + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not see + or write to the Free Software Foundation, Inc., + 51 Franklin St., Fifth Floor, Boston, MA 02110, USA + + *************************************************************************************/ + +#include +#include +#include +#include + +/* + Format Windows error, with optional text. + + For "known" errors we also output their symbolic error constant, e.g + CERT_E_CN_NO_MATCH in addition to numeric value. + + We also try to output English text for all error messages, as not to mess up + with encodings. +*/ +void ma_format_win32_error(char* buf, size_t buflen, DWORD code, _Printf_format_string_ const char* fmt, ...) +{ + char* cur = buf; + char* end = cur + buflen; + *cur = 0; + if (fmt) + { + va_list vargs; + va_start(vargs, fmt); + cur += vsnprintf_s(cur, end - cur, _TRUNCATE, fmt, vargs); + va_end(vargs); + } + + if (code == 0) + return; + + static struct map_entry + { + DWORD code; + const char* sym; + const char* msg; + } + map[] = + { +#define ENTRY(x, y) {x,#x, y} + ENTRY(SEC_E_WRONG_PRINCIPAL, "The target principal name is incorrect"), + ENTRY(CERT_E_CN_NO_MATCH,"The certificate's CN name does not match the passed value"), + ENTRY(SEC_E_UNTRUSTED_ROOT,"The certificate chain was issued by an authority that is not trusted"), + ENTRY(TRUST_E_CERT_SIGNATURE,"The signature of the certificate cannot be verified"), + ENTRY(SEC_E_CERT_EXPIRED,"The received certificate has expired"), + ENTRY(CERT_E_EXPIRED,"A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file"), + ENTRY(CRYPT_E_NO_REVOCATION_CHECK, "The revocation function was unable to check revocation for the certificate"), + ENTRY(CRYPT_E_REVOCATION_OFFLINE,"The revocation function was unable to check revocation because the revocation server was offline"), + ENTRY(CRYPT_E_REVOKED,"The certificate is revoked"), + ENTRY(SEC_E_CERT_UNKNOWN,"An unknown error occurred while processing the certificate"), + ENTRY(CERT_E_ROLE," A certificate that can only be used as an end-entity is being used as a CA or vice versa"), + ENTRY(CERT_E_WRONG_USAGE,"The certificate is not valid for the requested usage"), + ENTRY(SEC_E_ILLEGAL_MESSAGE, "The message received was unexpected or badly formatted"), + ENTRY(CERT_E_VALIDITYPERIODNESTING,"The validity periods of the certification chain do not nest correctly"), + ENTRY(CERT_E_PATHLENCONST,"A path length constraint in the certification chain has been violated"), + ENTRY(CERT_E_CRITICAL,"A certificate contains an unknown extension that is marked 'critical'"), + ENTRY(CERT_E_PURPOSE,"A certificate being used for a purpose other than the ones specified by its CA"), + ENTRY(CERT_E_ISSUERCHAINING,"A parent of a given certificate in fact did not issue that child certificate"), + ENTRY(CERT_E_MALFORMED, "A certificate is missing or has an empty value for an important field, such as a subject or issuer name"), + ENTRY(CERT_E_CHAINING,"A certificate chain could not be built to a trusted root authority"), + ENTRY(TRUST_E_FAIL," Generic trust failure"), + ENTRY(CERT_E_UNTRUSTEDTESTROOT,"The certification path terminates with the test root which is not trusted with the current policy settings"), + ENTRY(CERT_E_UNTRUSTEDROOT,"A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider"), + ENTRY(CERT_E_REVOCATION_FAILURE,"The revocation process could not continue - the certificate(s) could not be checked"), + ENTRY(SEC_E_ILLEGAL_MESSAGE, "The message received was unexpected or badly formatted"), + ENTRY(SEC_E_UNTRUSTED_ROOT, "Untrusted root certificate"), + ENTRY(SEC_E_BUFFER_TOO_SMALL, "Buffer too small"), + ENTRY(SEC_E_CRYPTO_SYSTEM_INVALID, "Cipher is not supported"), + ENTRY(SEC_E_INSUFFICIENT_MEMORY, "Out of memory"), + ENTRY(SEC_E_OUT_OF_SEQUENCE, "Invalid message sequence"), + ENTRY(SEC_E_DECRYPT_FAILURE, "The specified data could not be decrypted"), + ENTRY(SEC_I_INCOMPLETE_CREDENTIALS, "Incomplete credentials"), + ENTRY(SEC_E_ENCRYPT_FAILURE, "The specified data could not be encrypted"), + ENTRY(SEC_I_CONTEXT_EXPIRED, "The context has expired and can no longer be used"), + ENTRY(SEC_E_ALGORITHM_MISMATCH, "no cipher match"), + ENTRY(SEC_E_NO_CREDENTIALS, "no credentials"), + ENTRY(SEC_E_INVALID_TOKEN, "The token supplied to function is invalid") + }; + + struct map_entry* entry = NULL; + strncpy_s(cur,end-cur, ". ", _TRUNCATE); + cur += 2; + + for (size_t i = 0; i < sizeof(map) / sizeof(map[0]); i++) + { + if (code == map[i].code) + { + entry = &map[i]; + break; + } + } + if (cur > end - 20) + return; + if (entry) + { + sprintf_s(cur, end - cur, "%s. Error 0x%08lX(%s)", entry->msg, code, entry->sym); + } + else + { + cur += FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, code, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), + cur, (DWORD)(end - cur), NULL); + while (cur > buf && (*cur == '\0' || *cur == '\n' || *cur == '\r' || *cur == '.')) + cur--; + if (*cur) + { + cur++; + *cur = 0; + } + sprintf_s(cur, end - cur, ". Error %lu/0x%08lX", code, code); + } +} + diff -Nru mariadb-10.3-10.3.18/libmariadb/libmariadb/win32_errmsg.h mariadb-10.3-10.3.22/libmariadb/libmariadb/win32_errmsg.h --- mariadb-10.3-10.3.18/libmariadb/libmariadb/win32_errmsg.h 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/libmariadb/win32_errmsg.h 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,2 @@ +#include +void ma_format_win32_error(char* buf, size_t buflen, DWORD code, _Printf_format_string_ const char* fmt, ...); diff -Nru mariadb-10.3-10.3.18/libmariadb/plugins/auth/CMakeLists.txt mariadb-10.3-10.3.22/libmariadb/plugins/auth/CMakeLists.txt --- mariadb-10.3-10.3.18/libmariadb/plugins/auth/CMakeLists.txt 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/plugins/auth/CMakeLists.txt 2020-01-26 18:37:27.000000000 +0000 @@ -83,7 +83,7 @@ CONFIGURATIONS DYNAMIC STATIC OFF DEFAULT DYNAMIC SOURCES ${AUTH_DIR}/sha256_pw.c - LIBRARIES ${CRYT_LIBS}) + LIBRARIES ${CRYPT_LIBS}) ENDIF() ENDIF() diff -Nru mariadb-10.3-10.3.18/libmariadb/plugins/auth/caching_sha2_pw.c mariadb-10.3-10.3.22/libmariadb/plugins/auth/caching_sha2_pw.c --- mariadb-10.3-10.3.18/libmariadb/plugins/auth/caching_sha2_pw.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/plugins/auth/caching_sha2_pw.c 2020-01-26 18:37:27.000000000 +0000 @@ -275,14 +275,6 @@ memmove(mysql->scramble_buff, packet, SCRAMBLE_LENGTH); mysql->scramble_buff[SCRAMBLE_LENGTH]= 0; - /* if a tls session is active we need to send plain password */ - if (mysql->client_flag & CLIENT_SSL) - { - if (vio->write_packet(vio, (unsigned char *)mysql->passwd, (int)strlen(mysql->passwd) + 1)) - return CR_ERROR; - return CR_OK; - } - /* send empty packet if no password was provided */ if (!mysql->passwd || !mysql->passwd[0]) { diff -Nru mariadb-10.3-10.3.18/libmariadb/plugins/auth/gssapi_errmsg.c mariadb-10.3-10.3.22/libmariadb/plugins/auth/gssapi_errmsg.c --- mariadb-10.3-10.3.18/libmariadb/plugins/auth/gssapi_errmsg.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/plugins/auth/gssapi_errmsg.c 2020-01-26 18:37:27.000000000 +0000 @@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. */ -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(SOLARIS) || defined(__sun) #include #else #include diff -Nru mariadb-10.3-10.3.18/libmariadb/unittest/libmariadb/connection.c mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/connection.c --- mariadb-10.3-10.3.18/libmariadb/unittest/libmariadb/connection.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/connection.c 2020-01-26 18:37:27.000000000 +0000 @@ -1684,8 +1684,54 @@ return OK; } +static int test_conc443(MYSQL *my __attribute__((unused))) +{ + my_bool x= 1; + unsigned long thread_id= 0; + char query[128]; + MYSQL_RES *result; + MYSQL_ROW row; + int rc; + + MYSQL *mysql= mysql_init(NULL); + mysql_options(mysql, MYSQL_INIT_COMMAND, "set @a:=3"); + mysql_options(mysql, MYSQL_OPT_RECONNECT, &x); + + if (!mysql_real_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_REMEMBER_OPTIONS)) + { + diag("Connection failed. Error: %s", mysql_error(mysql)); + mysql_close(mysql); + } + + thread_id= mysql_thread_id(mysql); + + sprintf(query, "KILL %lu", thread_id); + rc= mysql_query(mysql, query); + + sleep(3); + + rc= mysql_ping(mysql); + check_mysql_rc(rc, mysql); + + rc= mysql_query(mysql, "SELECT @a"); + check_mysql_rc(rc, mysql); + + FAIL_IF(mysql_thread_id(mysql) == thread_id, "Expected different thread id"); + + result= mysql_store_result(mysql); + if (!result) + return FAIL; + row= mysql_fetch_row(result); + FAIL_IF(strcmp(row[0],"3"), "Wrong result"); + + mysql_free_result(result); + mysql_close(mysql); + + return OK; +} struct my_tests_st my_tests[] = { + {"test_conc443", test_conc443, TEST_CONNECTION_NONE, 0, NULL, NULL}, {"test_conc366", test_conc366, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_conc392", test_conc392, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_conc312", test_conc312, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, diff -Nru mariadb-10.3-10.3.18/libmariadb/unittest/libmariadb/ps_bugs.c mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/ps_bugs.c --- mariadb-10.3-10.3.18/libmariadb/unittest/libmariadb/ps_bugs.c 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/ps_bugs.c 2020-01-26 18:37:27.000000000 +0000 @@ -5112,7 +5112,57 @@ return OK; } +static int test_maxparam(MYSQL *mysql) +{ + const char *query= "INSERT INTO t1 VALUES (?)"; + int rc; + char *buffer; + int i; + int val= 1; + size_t mem= strlen(query) + 1 + 4 * 65535 + 1; + MYSQL_STMT *stmt= mysql_stmt_init(mysql); + MYSQL_BIND bind[65535]; + + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); + check_mysql_rc(rc, mysql); + + rc= mysql_query(mysql, "CREATE TABLE t1 (a int)"); + check_mysql_rc(rc, mysql); + + buffer= calloc(1, mem); + strcpy(buffer, query); + for (i=0; i < 65534.; i++) + strcat(buffer, ",(?)"); + rc= mysql_stmt_prepare(stmt, SL(buffer)); + check_stmt_rc(rc, stmt); + + memset(bind, 0, sizeof(MYSQL_BIND) * 65535); + for (i=0; i < 65534; i++) + { + bind[i].buffer_type= MYSQL_TYPE_LONG; + bind[i].buffer= &val; + } + + rc= mysql_stmt_bind_param(stmt, bind); + check_stmt_rc(rc, stmt); + + rc= mysql_stmt_execute(stmt); + check_stmt_rc(rc, stmt); + + FAIL_IF(mysql_stmt_affected_rows(stmt) != 65535, "Expected affected_rows=65535"); + + strcat(buffer, ",(?)"); + rc= mysql_stmt_prepare(stmt, SL(buffer)); + free(buffer); + FAIL_IF(!rc, "Error expected"); + FAIL_IF(mysql_stmt_errno(stmt) != ER_PS_MANY_PARAM, "Expected ER_PS_MANY_PARAM error"); + + mysql_stmt_close(stmt); + return OK; +} + struct my_tests_st my_tests[] = { + {"test_maxparam", test_maxparam, TEST_CONNECTION_NEW, 0, NULL, NULL}, {"test_conc424", test_conc424, TEST_CONNECTION_NEW, 0, NULL, NULL}, {"test_conc344", test_conc344, TEST_CONNECTION_NEW, 0, NULL, NULL}, {"test_conc334", test_conc334, TEST_CONNECTION_NEW, 0, NULL, NULL}, diff -Nru mariadb-10.3-10.3.18/libmariadb/unittest/libmariadb/ssl.c.in mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/ssl.c.in --- mariadb-10.3-10.3.18/libmariadb/unittest/libmariadb/ssl.c.in 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/libmariadb/unittest/libmariadb/ssl.c.in 2020-01-26 18:37:27.000000000 +0000 @@ -1329,8 +1329,48 @@ return OK; } +#ifndef HAVE_SCHANNEL +static int test_ssl_verify(MYSQL *my __attribute__((unused))) +{ + MYSQL *mysql; + my_bool verify= 1, enforce= 1; + + if (check_skip_ssl()) + return SKIP; + + /* verify, using system ca should fail with self signed certificate */ + mysql= mysql_init(NULL); + mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &enforce); + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &verify); + FAIL_IF(mysql_real_connect(mysql, hostname, username, password, schema, + port, socketname, 0), "Error expected"); + diag("error expected: %s\n", mysql_error(mysql)); + mysql_close(mysql); + + /* verify against local ca, this should pass */ + mysql= mysql_init(NULL); + mysql_ssl_set(mysql,0, 0, sslca, 0, 0); + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &verify); + FAIL_IF(!mysql_real_connect(mysql, hostname, username, password, schema, + port, socketname, 0), mysql_error(mysql)); + mysql_close(mysql); + + mysql= mysql_init(NULL); + mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &enforce); + FAIL_IF(!mysql_real_connect(mysql, hostname, username, password, schema, + port, socketname, 0), mysql_error(mysql)); + + diag("cipher: %s", mysql_get_ssl_cipher(mysql)); + mysql_close(mysql); + return OK; +} +#endif + struct my_tests_st my_tests[] = { {"test_ssl", test_ssl, TEST_CONNECTION_NEW, 0, NULL, NULL}, +#ifndef HAVE_SCHANNEL + {"test_ssl_verify", test_ssl_verify, TEST_CONNECTION_NEW, 0, NULL, NULL}, +#endif {"test_mdev14101", test_mdev14101, TEST_CONNECTION_NEW, 0, NULL, NULL}, {"test_mdev14027", test_mdev14027, TEST_CONNECTION_NEW, 0, NULL, NULL}, {"test_conc286", test_conc286, TEST_CONNECTION_NEW, 0, NULL, NULL}, diff -Nru mariadb-10.3-10.3.18/man/mysql-test-run.pl.1 mariadb-10.3-10.3.22/man/mysql-test-run.pl.1 --- mariadb-10.3-10.3.18/man/mysql-test-run.pl.1 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/man/mysql-test-run.pl.1 2020-01-26 18:37:27.000000000 +0000 @@ -1937,8 +1937,10 @@ .\" suite option: mysql-test-run.pl \fB\-\-suite[s]=\fR\fB\fIsuite_name...\fR\fR .sp -Comma separated list of suite names to run. The default is: "main-,archive-,binlog-,csv-,federated-,funcs_1-,funcs_2-,handler-,heap-,innodb-,innodb_fts-, -innodb_zip-,maria-,multi_source-,optimizer_unfixed_bugs-,parts-,perfschema-, +Comma separated list of suite names to run. The default is: +"main-,archive-,binlog-,csv-,federated-,funcs_1-,funcs_2-, +handler-,heap-,innodb-,innodb_fts-,innodb_zip-,maria-, +multi_source-,optimizer_unfixed_bugs-,parts-,perfschema-, plugins-,roles-,rpl-,sys_vars-,unit-,vcol-"\&. .RE .sp diff -Nru mariadb-10.3-10.3.18/mysql-test/collections/10.0-compatible.list mariadb-10.3-10.3.22/mysql-test/collections/10.0-compatible.list --- mariadb-10.3-10.3.18/mysql-test/collections/10.0-compatible.list 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/collections/10.0-compatible.list 2020-01-26 18:37:27.000000000 +0000 @@ -202,7 +202,6 @@ main.gcc296 main.get_diagnostics main.gis -main.gis2 main.gis-alter_table_online main.gis-precise main.gis-rt-precise diff -Nru mariadb-10.3-10.3.18/mysql-test/include/binlog_inject_error.inc mariadb-10.3-10.3.22/mysql-test/include/binlog_inject_error.inc --- mariadb-10.3-10.3.18/mysql-test/include/binlog_inject_error.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/binlog_inject_error.inc 2020-01-26 18:37:27.000000000 +0000 @@ -13,10 +13,10 @@ # let query= 'CREATE TABLE t1 (a INT)'; # source include/binlog_inject_error.inc; # - +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; --echo $query; --replace_regex /(errno: .*)/(errno: #)/ --error ER_ERROR_ON_WRITE --eval $query -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/include/binlog_parallel_replication_marks.test mariadb-10.3-10.3.22/mysql-test/include/binlog_parallel_replication_marks.test --- mariadb-10.3-10.3.18/mysql-test/include/binlog_parallel_replication_marks.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/binlog_parallel_replication_marks.test 2020-01-26 18:37:27.000000000 +0000 @@ -80,7 +80,7 @@ s/table id \d+/table id #/; s/mapped to number \d+/mapped to number #/; s/CRC32 0x[0-9a-f]+/CRC32 0x########/; - print if /GTID|BEGIN|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY/; + print if /\b(GTID|BEGIN|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY)\b/; } close F; EOF diff -Nru mariadb-10.3-10.3.18/mysql-test/include/ctype_utf8_ilseq.inc mariadb-10.3-10.3.22/mysql-test/include/ctype_utf8_ilseq.inc --- mariadb-10.3-10.3.18/mysql-test/include/ctype_utf8_ilseq.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/ctype_utf8_ilseq.inc 2020-01-26 18:37:27.000000000 +0000 @@ -14,6 +14,7 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; DELETE FROM t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/include/index_merge1.inc mariadb-10.3-10.3.22/mysql-test/include/index_merge1.inc --- mariadb-10.3-10.3.18/mysql-test/include/index_merge1.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/index_merge1.inc 2020-01-26 18:37:27.000000000 +0000 @@ -2,11 +2,10 @@ # # Index merge tests # -# The variables -# $engine_type -- storage engine to be tested +# The variable # $merge_table_support -- 1 storage engine supports merge tables # -- 0 storage engine does not support merge tables -# have to be set before sourcing this script. +# has to be set before sourcing this script. # # Note: The comments/expectations refer to MyISAM. # They might be not valid for other storage engines. @@ -16,15 +15,10 @@ # old name was t/index_merge.test # main code went into include/index_merge1.inc # +--source include/have_sequence.inc --echo #---------------- Index merge test 1 ------------------------------------------- -eval SET SESSION STORAGE_ENGINE = $engine_type; - ---disable_warnings -drop table if exists t0, t1, t2, t3, t4; ---enable_warnings - # Create and fill a table with simple keys create table t0 ( @@ -32,20 +26,7 @@ INDEX i1(key1) ); ---disable_query_log -insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); - -let $1=7; -set @d=8; -begin; -while ($1) -{ - eval insert into t0 select key1+@d from t0; - eval set @d=@d*2; - dec $1; -} -commit; ---enable_query_log +insert into t0(key1) select seq from seq_1_to_1024; alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key3 int not null, add index i3(key3); @@ -217,7 +198,7 @@ index i2_2(key2, key2_1) ); -insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0; +insert into t4 select seq,seq,seq div 10, seq % 10, seq % 10, seq from seq_1_to_1024; # the following will be handled by index_merge: select * from t4 where key1a = 3 or key1b = 4; @@ -392,14 +373,13 @@ # # BUG#17314: Index_merge/intersection not choosen by the optimizer for MERGE tables # -create table t0 (a int); -insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1 ( a int, b int, filler1 char(200), filler2 char(200), key(a),key(b) ); -insert into t1 select @v:= A.a, @v, 't1', 'filler2' from t0 A, t0 B, t0 C; +insert into t1 select @v:= seq % 10, @v, 't1', 'filler2' from seq_1_to_1000; + create table t2 like t1; create table t3 ( @@ -413,8 +393,7 @@ --replace_column 9 # explain select * from t3 where a=1 and b=1; -drop table t3; -drop table t0, t1, t2; +drop table t1, t2, t3; } # @@ -513,16 +492,13 @@ --echo # --echo # BUG#40974: Incorrect query results when using clause evaluated using range check --echo # -create table t0 (a int); -insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); - create table t1 (a int); insert into t1 values (1),(2); create table t2(a int, b int); insert into t2 values (1,1), (2, 1000); create table t3 (a int, b int, filler char(100), key(a), key(b)); -insert into t3 select 1000, 1000,'filler' from t0 A, t0 B, t0 C; +insert into t3 select 1000, 1000,'filler' from seq_1_to_1000; insert into t3 values (1,1,'data'); insert into t3 values (1,1,'data'); -- echo The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3) @@ -534,20 +510,14 @@ where exists (select 1 from t2, t3 where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); -drop table t0, t1, t2, t3; +drop table t1, t2, t3; --echo # --echo # BUG#44810: index merge and order by with low sort_buffer_size --echo # crashes server! --echo # CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B)); -INSERT INTO t1 VALUES (REPEAT('a',128),REPEAT('b',128)); -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT REPEAT('a',128),REPEAT('b',128) FROM seq_1_to_64; SET SESSION sort_buffer_size=1024*8; EXPLAIN SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' diff -Nru mariadb-10.3-10.3.18/mysql-test/include/index_merge2.inc mariadb-10.3-10.3.22/mysql-test/include/index_merge2.inc --- mariadb-10.3-10.3.18/mysql-test/include/index_merge2.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/index_merge2.inc 2020-01-26 18:37:27.000000000 +0000 @@ -2,10 +2,6 @@ # # Index merge tests # -# The variable -# $engine_type -- storage engine to be tested -# has to be set before sourcing this script. -# # Note: The comments/expectations refer to InnoDB. # They might be not valid for other storage engines. # @@ -14,15 +10,10 @@ # old name was t/index_merge_innodb.test # main code went into include/index_merge2.inc # +--source include/have_sequence.inc --echo #---------------- Index merge test 2 ------------------------------------------- -eval SET SESSION STORAGE_ENGINE = $engine_type; - ---disable_warnings -drop table if exists t1,t2; ---enable_warnings - create table t1 ( key1 int not null, @@ -32,16 +23,7 @@ INDEX i2(key2) ); ---disable_query_log -let $1=200; -begin; -while ($1) -{ - eval insert into t1 values (200-$1, $1); - dec $1; -} -commit; ---enable_query_log +INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200; # No primary key explain select * from t1 where key1 < 5 or key2 > 197; @@ -80,16 +62,8 @@ index (key2) ); show warnings; ---disable_query_log -let $1=30; -begin; -while ($1) -{ - eval insert into t1 (key1, key2, filler) values ($1/4, $1/8, 'filler-data'); - dec $1; -} -commit; ---enable_query_log +INSERT INTO t1 (key1, key2, filler) +SELECT seq/4, seq/8, 'filler-data' FROM seq_30_to_0; explain select pk from t1 where key1 = 1 and key2 = 1; select pk from t1 where key2 = 1 and key1 = 1; select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1; @@ -331,19 +305,7 @@ key3 int not null default 0 ); -insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); - -let $1=7; -set @d=8; -begin; -while ($1) -{ - eval insert into t1 (key1) select key1+@d from t1; - eval set @d=@d*2; - dec $1; -} -commit; - +insert into t1(key1) select seq from seq_1_to_1024; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; diff -Nru mariadb-10.3-10.3.18/mysql-test/include/index_merge_2sweeps.inc mariadb-10.3-10.3.22/mysql-test/include/index_merge_2sweeps.inc --- mariadb-10.3-10.3.18/mysql-test/include/index_merge_2sweeps.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/index_merge_2sweeps.inc 2020-01-26 18:37:27.000000000 +0000 @@ -2,24 +2,15 @@ # # 2-sweeps read Index_merge test # -# The variable -# $engine_type -- storage engine to be tested -# has to be set before sourcing this script. -# # Last update: # 2006-08-02 ML test refactored # old name was index_merge_innodb2.test # main code went into include/index_merge_2sweeps.inc # +--source include/have_sequence.inc --echo #---------------- 2-sweeps read Index merge test 2 ------------------------------- -eval SET SESSION STORAGE_ENGINE = $engine_type; - ---disable_warnings -drop table if exists t1; ---enable_warnings - create table t1 ( pk int primary key, key1 int, @@ -30,17 +21,8 @@ index(key2) ); - ---disable_query_log -begin; -let $1=1000; -while ($1) -{ - eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2'); - dec $1; -} -commit; ---enable_query_log +insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2' +from seq_1000_to_1; select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); diff -Nru mariadb-10.3-10.3.18/mysql-test/include/index_merge_ror.inc mariadb-10.3-10.3.22/mysql-test/include/index_merge_ror.inc --- mariadb-10.3-10.3.18/mysql-test/include/index_merge_ror.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/index_merge_ror.inc 2020-01-26 18:37:27.000000000 +0000 @@ -17,11 +17,6 @@ --echo #---------------- ROR-index_merge tests ----------------------- -eval SET SESSION STORAGE_ENGINE = $engine_type; - ---disable_warnings -drop table if exists t0,t1,t2; ---enable_warnings create table t1 ( /* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */ diff -Nru mariadb-10.3-10.3.18/mysql-test/include/index_merge_ror_cpk.inc mariadb-10.3-10.3.22/mysql-test/include/index_merge_ror_cpk.inc --- mariadb-10.3-10.3.18/mysql-test/include/index_merge_ror_cpk.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/index_merge_ror_cpk.inc 2020-01-26 18:37:27.000000000 +0000 @@ -2,10 +2,6 @@ # # Clustered PK ROR-index_merge tests # -# The variable -# $engine_type -- storage engine to be tested -# has to be set before sourcing this script. -# # Note: The comments/expectations refer to InnoDB. # They might be not valid for other storage engines. # @@ -15,13 +11,9 @@ # main code went into include/index_merge_ror_cpk.inc # ---echo #---------------- Clustered PK ROR-index_merge tests ----------------------------- - -eval SET SESSION STORAGE_ENGINE = $engine_type; +--source include/have_sequence.inc ---disable_warnings -drop table if exists t1; ---enable_warnings +--echo #---------------- Clustered PK ROR-index_merge tests ----------------------------- create table t1 ( diff -Nru mariadb-10.3-10.3.18/mysql-test/include/partition_mrr.inc mariadb-10.3-10.3.22/mysql-test/include/partition_mrr.inc --- mariadb-10.3-10.3.18/mysql-test/include/partition_mrr.inc 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/include/partition_mrr.inc 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,46 @@ +--source include/have_partition.inc + +--disable_warnings +drop table if exists t1,t3; +--enable_warnings + +--echo # +--echo # MDEV-20611: MRR scan over partitioned InnoDB table produces "Out of memory" error +--echo # +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +set @tmp=@@storage_engine; +eval set storage_engine=$engine_type; + +create table t3 ( + ID bigint(20) NOT NULL AUTO_INCREMENT, + part_id int, + key_col int, + col2 int, + key(key_col), + PRIMARY KEY (ID,part_id) +) PARTITION BY RANGE (part_id) +(PARTITION p1 VALUES LESS THAN (3), + PARTITION p2 VALUES LESS THAN (7), + PARTITION p3 VALUES LESS THAN (10) +); + +show create table t3; +set storage_engine= @tmp; + +insert into t3 select + A.a+10*B.a, + A.a, + B.a, + 123456 +from t1 A, t1 B; + +set optimizer_switch='mrr=on'; +--replace_column 9 # +explain +select * from t3 force index (key_col) where key_col < 3; +select * from t3 force index (key_col) where key_col < 3; + +drop table t1,t3; + diff -Nru mariadb-10.3-10.3.18/mysql-test/main/auto_increment_ranges.inc mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges.inc --- mariadb-10.3-10.3.18/mysql-test/main/auto_increment_ranges.inc 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges.inc 2020-01-26 18:37:27.000000000 +0000 @@ -238,3 +238,23 @@ --error HA_ERR_AUTOINC_ERANGE insert into t1 values(NULL); drop table t1; + +--echo # +--echo # MDEV-17333 Assertion in update_auto_increment() upon exotic LOAD +--echo # +--source include/have_partition.inc +let $mysqld_datadir= `select @@datadir`; +--write_file $mysqld_datadir/test/load.data +1 1 +0 2 +3 3 +4 1 +0 1 +6 6 +EOF +create or replace table t1 (pk int auto_increment, x int, primary key(pk), unique key(x)) +with system versioning partition by system_time interval 2 day +(partition p1 history, partition pn current); +load data infile 'load.data' ignore into table t1; +--remove_file $mysqld_datadir/test/load.data +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/auto_increment_ranges_innodb.result mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/auto_increment_ranges_innodb.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -264,6 +264,17 @@ insert into t1 values(NULL); ERROR 22003: Out of range value for column 'a' at row 1 drop table t1; +# +# MDEV-17333 Assertion in update_auto_increment() upon exotic LOAD +# +create or replace table t1 (pk int auto_increment, x int, primary key(pk), unique key(x)) +with system versioning partition by system_time interval 2 day +(partition p1 history, partition pn current); +load data infile 'load.data' ignore into table t1; +Warnings: +Warning 1062 Duplicate entry '1' for key 'x' +Warning 1062 Duplicate entry '1' for key 'x' +drop table t1; create table t1 (pk int auto_increment primary key, f varchar(20)); insert t1 (f) values ('a'), ('b'), ('c'), ('d'); select null, f into outfile 'load.data' from t1 limit 1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/auto_increment_ranges_myisam.result mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges_myisam.result --- mariadb-10.3-10.3.18/mysql-test/main/auto_increment_ranges_myisam.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/auto_increment_ranges_myisam.result 2020-01-26 18:37:27.000000000 +0000 @@ -270,3 +270,14 @@ insert into t1 values(NULL); ERROR 22003: Out of range value for column 'a' at row 1 drop table t1; +# +# MDEV-17333 Assertion in update_auto_increment() upon exotic LOAD +# +create or replace table t1 (pk int auto_increment, x int, primary key(pk), unique key(x)) +with system versioning partition by system_time interval 2 day +(partition p1 history, partition pn current); +load data infile 'load.data' ignore into table t1; +Warnings: +Warning 1062 Duplicate entry '1' for key 'x' +Warning 1062 Duplicate entry '1' for key 'x' +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/cache_temporal_4265.result mariadb-10.3-10.3.22/mysql-test/main/cache_temporal_4265.result --- mariadb-10.3-10.3.18/mysql-test/main/cache_temporal_4265.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/cache_temporal_4265.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,12 @@ create table t1 (a date); insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04'); -set debug_dbug='d,str_to_datetime_warn'; +SET STATEMENT debug_dbug='d,str_to_datetime_warn' for select * from t1 where a > date_add('2000-01-01', interval 5 day); a 2001-02-03 2002-03-04 Warnings: Note 1003 2000-01-01 -set debug_dbug=''; drop table t1; create table t1 (id int not null, ut timestamp(6) not null); insert into t1 values(1, '2001-01-01 00:00:00.2'); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/cache_temporal_4265.test mariadb-10.3-10.3.22/mysql-test/main/cache_temporal_4265.test --- mariadb-10.3-10.3.18/mysql-test/main/cache_temporal_4265.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/cache_temporal_4265.test 2020-01-26 18:37:27.000000000 +0000 @@ -5,9 +5,9 @@ create table t1 (a date); insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04'); -set debug_dbug='d,str_to_datetime_warn'; -select * from t1 where a > date_add('2000-01-01', interval 5 day); -set debug_dbug=''; + +SET STATEMENT debug_dbug='d,str_to_datetime_warn' for + select * from t1 where a > date_add('2000-01-01', interval 5 day); drop table t1; # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/compare.result mariadb-10.3-10.3.22/mysql-test/main/compare.result --- mariadb-10.3-10.3.18/mysql-test/main/compare.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/compare.result 2020-01-26 18:37:27.000000000 +0000 @@ -100,3 +100,23 @@ SELECT 1 FROM t1 WHERE t1.a IN (1, t1.a) AND t1.a=2; 1 DROP TABLE t1; +CREATE TABLE t1 (a char(2), index (a)); +insert into t1 values ("aa"),("bb"); +select * from t1 where a="aa"; +a +aa +select * from t1 where a="aaa"; +a +select * from t1 where a="aa "; +a +aa +select * from t1 where a>="aaa"; +a +bb +explain select * from t1 where a="aaa"; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 3 const 1 Using where; Using index +explain select * from t1 where a="aa "; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a a 3 const 1 Using where; Using index +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/compare.test mariadb-10.3-10.3.22/mysql-test/main/compare.test --- mariadb-10.3-10.3.18/mysql-test/main/compare.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/compare.test 2020-01-26 18:37:27.000000000 +0000 @@ -94,3 +94,17 @@ CREATE TABLE t1(a INT ZEROFILL); SELECT 1 FROM t1 WHERE t1.a IN (1, t1.a) AND t1.a=2; DROP TABLE t1; + +# +# Check what happens when comparing to long string +# + +CREATE TABLE t1 (a char(2), index (a)); +insert into t1 values ("aa"),("bb"); +select * from t1 where a="aa"; +select * from t1 where a="aaa"; +select * from t1 where a="aa "; +select * from t1 where a>="aaa"; +explain select * from t1 where a="aaa"; +explain select * from t1 where a="aa "; +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/connect_debug.result mariadb-10.3-10.3.22/mysql-test/main/connect_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/connect_debug.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/connect_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -8,3 +8,13 @@ ERROR 1045 (28000): Plugin foo/bar could not be loaded: invalid plugin name set global debug_dbug=@old_dbug; drop user bad; +set global debug_dbug='+d,increase_srv_handshake_scramble_len'; +connect(localhost,root,,test,MASTER_MYPORT,MYSQL_TMP_DIR/mysqld.1.sock); +connect con1,localhost,root; +ERROR HY000: received malformed packet +set global debug_dbug=@old_dbug; +set global debug_dbug='+d,poison_srv_handshake_scramble_len'; +connect(localhost,root,,test,MASTER_MYPORT,MYSQL_TMP_DIR/mysqld.1.sock); +connect con2,localhost,root; +ERROR HY000: received malformed packet +set global debug_dbug=@old_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/connect_debug.test mariadb-10.3-10.3.22/mysql-test/main/connect_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/connect_debug.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/connect_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -22,3 +22,18 @@ --exec $MYSQL --default-auth=mysql_old_password --user=bad --password=worse 2>&1 set global debug_dbug=@old_dbug; drop user bad; + +# +# Bug#29630767 - USE OF UNINITIALIZED VALUE IN LIBMYSQL (CLIENT.CC FUNCTION RUN_PLUGIN_AUTH) +# +set global debug_dbug='+d,increase_srv_handshake_scramble_len'; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MASTER_MYPORT MASTER_MYPORT +--error 2027 +connect con1,localhost,root; +set global debug_dbug=@old_dbug; + +set global debug_dbug='+d,poison_srv_handshake_scramble_len'; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MASTER_MYPORT MASTER_MYPORT +--error 2027 +connect con2,localhost,root; +set global debug_dbug=@old_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/create.result mariadb-10.3-10.3.22/mysql-test/main/create.result --- mariadb-10.3-10.3.18/mysql-test/main/create.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/create.result 2020-01-26 18:37:27.000000000 +0000 @@ -945,7 +945,7 @@ Bug #26104 Bug on foreign key class constructor -Check that ref_columns is initalized correctly in the constructor +Check that ref_columns is initialized correctly in the constructor and semantic checks in mysql_prepare_table work. We do not need a storage engine that supports foreign keys diff -Nru mariadb-10.3-10.3.18/mysql-test/main/create.test mariadb-10.3-10.3.22/mysql-test/main/create.test --- mariadb-10.3-10.3.18/mysql-test/main/create.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/create.test 2020-01-26 18:37:27.000000000 +0000 @@ -846,7 +846,7 @@ --echo --echo Bug #26104 Bug on foreign key class constructor --echo ---echo Check that ref_columns is initalized correctly in the constructor +--echo Check that ref_columns is initialized correctly in the constructor --echo and semantic checks in mysql_prepare_table work. --echo --echo We do not need a storage engine that supports foreign keys diff -Nru mariadb-10.3-10.3.18/mysql-test/main/create_drop_server.result mariadb-10.3-10.3.22/mysql-test/main/create_drop_server.result --- mariadb-10.3-10.3.18/mysql-test/main/create_drop_server.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/create_drop_server.result 2020-01-26 18:37:27.000000000 +0000 @@ -38,9 +38,9 @@ CREATE SERVER server_1 FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST 'Server.Example.Com', DATABASE 'test'); SELECT Host FROM mysql.servers WHERE Server_Name = 'server_1'; Host -server.example.com +Server.Example.Com ALTER SERVER server_1 OPTIONS(HOST 'Server.Example.Org'); SELECT Host FROM mysql.servers WHERE Server_Name = 'server_1'; Host -server.example.org +Server.Example.Org DROP SERVER server_1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/create_or_replace2.result mariadb-10.3-10.3.22/mysql-test/main/create_or_replace2.result --- mariadb-10.3-10.3.18/mysql-test/main/create_or_replace2.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/create_or_replace2.result 2020-01-26 18:37:27.000000000 +0000 @@ -4,9 +4,9 @@ SET @old_debug= @@session.debug; CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB; CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam; -set debug_dbug='+d,send_kill_after_delete'; +SET debug_dbug='+d,send_kill_after_delete'; CREATE OR REPLACE TABLE t1 LIKE tmp; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; SHOW TABLES; Tables_in_test t1 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/create_or_replace2.test mariadb-10.3-10.3.22/mysql-test/main/create_or_replace2.test --- mariadb-10.3-10.3.18/mysql-test/main/create_or_replace2.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/create_or_replace2.test 2020-01-26 18:37:27.000000000 +0000 @@ -19,9 +19,9 @@ CREATE TABLE t1 (i INT, KEY(i)) ENGINE=InnoDB; CREATE OR REPLACE TEMPORARY TABLE tmp (a int, b int, key(a)) engine=myisam; -set debug_dbug='+d,send_kill_after_delete'; +SET debug_dbug='+d,send_kill_after_delete'; CREATE OR REPLACE TABLE t1 LIKE tmp; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; SHOW TABLES; show create table t1; --sync_slave_with_master diff -Nru mariadb-10.3-10.3.18/mysql-test/main/create_w_max_indexes_128.result mariadb-10.3-10.3.22/mysql-test/main/create_w_max_indexes_128.result --- mariadb-10.3-10.3.18/mysql-test/main/create_w_max_indexes_128.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/create_w_max_indexes_128.result 2020-01-26 18:37:27.000000000 +0000 @@ -259,70 +259,70 @@ c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16) ); Warnings: -Note 1831 Duplicate index 'a002_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a003_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a004_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a005_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a006_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a007_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a008_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a009_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a010_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a011_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a012_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a013_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a014_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a015_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a016_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a017_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a018_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a019_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a020_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a021_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a022_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a023_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a024_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a025_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a026_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a027_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a028_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a029_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a030_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a031_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a032_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a033_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a034_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a035_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a036_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a037_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a038_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a039_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a040_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a041_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a042_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a043_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a044_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a045_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a046_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a047_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a048_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a049_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a050_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a051_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a052_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a053_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a054_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a055_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a056_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a057_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a058_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a059_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a060_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a061_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a062_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a063_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a064_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a065_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a002_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a003_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a004_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a005_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a006_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a007_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a008_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a009_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a010_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a011_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a012_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a013_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a014_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a015_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a016_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a017_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a018_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a019_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a020_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a021_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a022_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a023_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a024_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a025_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a026_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a027_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a028_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a029_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a030_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a031_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a032_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a033_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a034_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a035_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a036_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a037_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a038_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a039_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a040_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a041_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a042_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a043_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a044_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a045_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a046_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a047_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a048_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a049_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a050_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a051_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a052_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a053_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a054_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a055_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a056_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a057_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a058_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a059_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a060_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a061_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a062_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a063_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a064_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a065_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -881,70 +881,70 @@ add key a128_long_123456789_123456789_123456789_123456789_123456789_1234 ( c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16); Warnings: -Note 1831 Duplicate index 'a002_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a003_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a004_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a005_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a006_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a007_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a008_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a009_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a010_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a011_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a012_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a013_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a014_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a015_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a016_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a017_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a018_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a019_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a020_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a021_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a022_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a023_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a024_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a025_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a026_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a027_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a028_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a029_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a030_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a031_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a032_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a033_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a034_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a035_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a036_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a037_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a038_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a039_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a040_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a041_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a042_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a043_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a044_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a045_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a046_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a047_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a048_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a049_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a050_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a051_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a052_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a053_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a054_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a055_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a056_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a057_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a058_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a059_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a060_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a061_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a062_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a063_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a064_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release -Note 1831 Duplicate index 'a065_long_123456789_123456789_123456789_123456789_123456789_1234' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a002_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a003_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a004_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a005_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a006_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a007_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a008_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a009_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a010_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a011_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a012_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a013_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a014_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a015_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a016_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a017_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a018_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a019_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a020_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a021_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a022_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a023_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a024_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a025_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a026_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a027_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a028_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a029_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a030_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a031_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a032_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a033_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a034_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a035_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a036_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a037_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a038_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a039_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a040_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a041_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a042_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a043_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a044_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a045_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a046_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a047_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a048_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a049_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a050_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a051_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a052_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a053_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a054_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a055_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a056_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a057_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a058_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a059_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a060_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a061_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a062_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a063_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a064_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release +Note 1831 Duplicate index `a065_long_123456789_123456789_123456789_123456789_123456789_1234`. This is deprecated and will be disallowed in a future release show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff -Nru mariadb-10.3-10.3.18/mysql-test/main/cte_nonrecursive.result mariadb-10.3-10.3.22/mysql-test/main/cte_nonrecursive.result --- mariadb-10.3-10.3.18/mysql-test/main/cte_nonrecursive.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/cte_nonrecursive.result 2020-01-26 18:37:27.000000000 +0000 @@ -606,7 +606,7 @@ select * from t r1 where r1.c=4; show create view v3; View Create View character_set_client collation_connection -v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(c) as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci select * from v3; c 4 @@ -618,7 +618,7 @@ select * from t r1, t r2 where r1.c=r2.c and r2.c=4; show create view v4; View Create View character_set_client collation_connection -v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c') `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci +v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(c) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c') `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci select * from v4; c d 4 4 @@ -1673,3 +1673,21 @@ t 1 use test; +# +# MDEV-18460: Server crashed in strmake / tdc_create_key / +# THD::create_tmp_table_def_key +# +connect con1,localhost,root,,; +CREATE TEMPORARY TABLE test.t (a INT); +WITH cte AS (SELECT 1) SELECT * FROM cte; +1 +1 +WITH t AS (SELECT 1) SELECT * FROM t; +1 +1 +WITH cte AS (SELECT 1) SELECT * FROM t; +ERROR 3D000: No database selected +DROP TABLE test.t; +connection default; +disconnect con1; +# End of 10.2 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/cte_nonrecursive.test mariadb-10.3-10.3.22/mysql-test/main/cte_nonrecursive.test --- mariadb-10.3-10.3.18/mysql-test/main/cte_nonrecursive.test 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/cte_nonrecursive.test 2020-01-26 18:37:27.000000000 +0000 @@ -1182,3 +1182,23 @@ with columns as (select 1 as t) select * from columns; use test; + +--echo # +--echo # MDEV-18460: Server crashed in strmake / tdc_create_key / +--echo # THD::create_tmp_table_def_key +--echo # + +--connect con1,localhost,root,, +--change_user root,, + +CREATE TEMPORARY TABLE test.t (a INT); +WITH cte AS (SELECT 1) SELECT * FROM cte; +WITH t AS (SELECT 1) SELECT * FROM t; +--error ER_NO_DB_ERROR +WITH cte AS (SELECT 1) SELECT * FROM t; +DROP TABLE test.t; + +--connection default +--disconnect con1 + +--echo # End of 10.2 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/cte_recursive.result mariadb-10.3-10.3.22/mysql-test/main/cte_recursive.result --- mariadb-10.3-10.3.18/mysql-test/main/cte_recursive.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/cte_recursive.result 2020-01-26 18:37:27.000000000 +0000 @@ -699,7 +699,7 @@ 5 RECURSIVE UNION p ALL NULL NULL NULL NULL 12 100.00 Using where; Using join buffer (flat, BNL join) NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Warnings: -Note 1003 with recursive ancestor_couple_ids as (/* select#2 */ select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors as (/* select#3 */ select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all /* select#4 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all /* select#5 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)/* select#1 */ select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id` +Note 1003 with recursive ancestor_couple_ids(h_id,w_id) as (/* select#2 */ select `a`.`father` AS `h_id`,`a`.`mother` AS `w_id` from `coupled_ancestors` `a` where `a`.`father` is not null and `a`.`mother` is not null), coupled_ancestors(id,name,dob,father,mother) as (/* select#3 */ select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union all /* select#4 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `fa` where `test`.`p`.`id` = `fa`.`h_id` union all /* select#5 */ select `test`.`p`.`id` AS `id`,`test`.`p`.`name` AS `name`,`test`.`p`.`dob` AS `dob`,`test`.`p`.`father` AS `father`,`test`.`p`.`mother` AS `mother` from `test`.`folks` `p` join `ancestor_couple_ids` `ma` where `test`.`p`.`id` = `ma`.`w_id`)/* select#1 */ select `h`.`name` AS `name`,`h`.`dob` AS `dob`,`w`.`name` AS `name`,`w`.`dob` AS `dob` from `ancestor_couple_ids` `c` join `coupled_ancestors` `h` join `coupled_ancestors` `w` where `h`.`id` = `c`.`h_id` and `w`.`id` = `c`.`w_id` # simple mutual recursion with recursive ancestor_couple_ids(h_id, w_id) @@ -3091,7 +3091,7 @@ 4 DEPENDENT SUBQUERY ALL NULL NULL NULL NULL 16 100.00 Using where NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Warnings: -Note 1003 with recursive destinations as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !(`test`.`b`.`arrival`,(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations` +Note 1003 with recursive destinations(city,legs) as (/* select#2 */ select `test`.`a`.`arrival` AS `city`,1 AS `legs` from `test`.`flights` `a` where `test`.`a`.`departure` = 'Cairo' union /* select#3 */ select `test`.`b`.`arrival` AS `arrival`,`r`.`legs` + 1 AS `r.legs + 1` from `destinations` `r` join `test`.`flights` `b` where `r`.`city` = `test`.`b`.`departure` and !(`test`.`b`.`arrival`,(/* select#4 */ select `destinations`.`city` from `destinations` where trigcond(`test`.`b`.`arrival` = `destinations`.`city` or `destinations`.`city` is null) having trigcond(`destinations`.`city` is null))))/* select#1 */ select `destinations`.`city` AS `city`,`destinations`.`legs` AS `legs` from `destinations` set standard_compliant_cte=default; drop table flights; # @@ -3378,7 +3378,7 @@ 3 RECURSIVE UNION ALL NULL NULL NULL NULL 2 100.00 Using where NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Warnings: -Note 1003 with recursive rcte as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2` +Note 1003 with recursive rcte(a) as (/* select#2 */ select 1 AS `a` union /* select#3 */ select cast(`rcte`.`a` + 1 as unsigned) AS `cast(a+1 as unsigned)` from `rcte` where `rcte`.`a` < 10), cte1 as (/* select#4 */ select count(0) AS `c1` from `rcte` join `test`.`t1` where `rcte`.`a` between 3 and 5 and `test`.`t1`.`id` = `rcte`.`a` - 3), cte2 as (/* select#5 */ select count(0) AS `c2` from `rcte` join `test`.`t1` where `rcte`.`a` between 7 and 8 and `test`.`t1`.`id` = `rcte`.`a` - 7)/* select#1 */ select `cte1`.`c1` AS `c1`,`cte2`.`c2` AS `c2` from `cte1` join `cte2` prepare stmt from "with recursive rcte(a) as (select 1 union select cast(a+1 as unsigned) from rcte where a < 10), diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_binary.result mariadb-10.3-10.3.22/mysql-test/main/ctype_binary.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_binary.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_binary.result 2020-01-26 18:37:27.000000000 +0000 @@ -102,7 +102,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varbinary(1) DEFAULT NULL + `c1` varbinary(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-1)); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_cp1251.result mariadb-10.3-10.3.22/mysql-test/main/ctype_cp1251.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_cp1251.result 2019-09-08 16:52:58.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_cp1251.result 2020-01-26 18:37:27.000000000 +0000 @@ -511,7 +511,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL + `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-1)); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_latin1.result mariadb-10.3-10.3.22/mysql-test/main/ctype_latin1.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_latin1.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_latin1.result 2020-01-26 18:37:27.000000000 +0000 @@ -820,7 +820,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) DEFAULT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-1)); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_uca.result mariadb-10.3-10.3.22/mysql-test/main/ctype_uca.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_uca.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_uca.result 2020-01-26 18:37:27.000000000 +0000 @@ -6748,14 +6748,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; ch SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 DELETE FROM t1; INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????'); INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b'); @@ -6771,22 +6770,14 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -6829,8 +6820,6 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -6850,14 +6839,10 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; ch a @@ -6877,8 +6862,6 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z @@ -6889,24 +6872,16 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 ALTER TABLE t1 DROP KEY ch; # 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,''''); @@ -6992,14 +6967,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; ch SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 DELETE FROM t1; INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????'); INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b'); @@ -7015,22 +6989,14 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_uca_innodb.result mariadb-10.3-10.3.22/mysql-test/main/ctype_uca_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_uca_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_uca_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -23,14 +23,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; ch SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 DELETE FROM t1; INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????'); INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b'); @@ -46,22 +45,14 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -104,8 +95,6 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -125,14 +114,10 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; ch a @@ -152,8 +137,6 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z @@ -164,24 +147,16 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 ALTER TABLE t1 DROP KEY ch; # 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,''''); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_ucs.result mariadb-10.3-10.3.22/mysql-test/main/ctype_ucs.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_ucs.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_ucs.result 2020-01-26 18:37:27.000000000 +0000 @@ -1700,7 +1700,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL + `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-1)); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ctype_utf8.result mariadb-10.3-10.3.22/mysql-test/main/ctype_utf8.result --- mariadb-10.3-10.3.18/mysql-test/main/ctype_utf8.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ctype_utf8.result 2020-01-26 18:37:27.000000000 +0000 @@ -2571,7 +2571,7 @@ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL + `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; select hex(concat(-1)); @@ -5467,14 +5467,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; ch SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 DELETE FROM t1; INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????'); INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b'); @@ -5490,22 +5489,14 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -5548,8 +5539,6 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -5569,14 +5558,10 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; ch a @@ -5596,8 +5581,6 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z @@ -5608,24 +5591,16 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 ALTER TABLE t1 DROP KEY ch; # 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,''''); @@ -5711,14 +5686,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; ch SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 DELETE FROM t1; INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????'); INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b'); @@ -5734,22 +5708,14 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -5792,8 +5758,6 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a @@ -5813,14 +5777,10 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'aðŒ†b' ORDER BY ch; ch a @@ -5840,8 +5800,6 @@ az aЀ aÖ€ -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z @@ -5852,24 +5810,16 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'aðŒ†b' ORDER BY ch; ch z -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 ALTER TABLE t1 DROP KEY ch; # 0xD18F would be a good 2-byte character, 0xD1 is an incomplete sequence SET @query=CONCAT('SELECT ch FROM t1 WHERE ch=''a', 0xD1,''''); @@ -5955,14 +5905,13 @@ INSERT INTO t1 (ch) VALUES ('admin'),('admin1'); SELECT ch FROM t1 WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 +EXPLAIN SELECT ch FROM t1 WHERE ch='adminðŒ†'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch='adminðŒ†'; ch SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='adminðŒ†'; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 DELETE FROM t1; INSERT INTO t1 (ch) VALUES ('a'), ('a?'), ('a??'), ('a???'), ('a????'); INSERT INTO t1 (ch) VALUES ('ab'),('a?b'),('a??b'),('a???b'),('a????b'); @@ -5978,22 +5927,14 @@ SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column `test`.`t1`.`ch` at row 1 EXPLAIN SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL # Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 FORCE KEY (ch) WHERE ch='aðŒ†b' ORDER BY ch; ch -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column `test`.`t1`.`ch` at row 1 SELECT ch FROM t1 IGNORE KEY (ch) WHERE ch<'aðŒ†' ORDER BY ch; ch a diff -Nru mariadb-10.3-10.3.18/mysql-test/main/default_session.result mariadb-10.3-10.3.22/mysql-test/main/default_session.result --- mariadb-10.3-10.3.18/mysql-test/main/default_session.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/default_session.result 2020-01-26 18:37:27.000000000 +0000 @@ -92,3 +92,31 @@ STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI drop table t1; +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +a b c +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 10:55:27 2019-09-26 10:55:27 +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +flush tables; +select a, b, from_unixtime(a) from t1; +a b from_unixtime(a) +1569495327 2019-09-26 11:55:27 2019-09-26 11:55:27 +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/default_session.test mariadb-10.3-10.3.22/mysql-test/main/default_session.test --- mariadb-10.3-10.3.18/mysql-test/main/default_session.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/default_session.test 2020-01-26 18:37:27.000000000 +0000 @@ -80,3 +80,27 @@ set sql_mode=default; select * from t1; drop table t1; + +# +# MDEV-21249 MariaDB 10.3.10 When referring to bigint to generate timestamp data in the virtual generated column, the value of the generated column does not change when the time zone changes +# +set time_zone='+00:00'; +create table t1 (a int, b datetime default from_unixtime(a), c datetime); +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +set time_zone='+01:00'; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +flush tables; +insert t1 (a, c) values (1569495327, from_unixtime(1569495327)); +select * from t1; +drop table t1; + +# same with vcols +set time_zone = "+00:00"; +create table t1 (a int, b timestamp as (from_unixtime(a)) virtual); +insert into t1 (a) value (1569495327); +select a, b, from_unixtime(a) from t1; +set time_zone = "+01:00"; +select a, b, from_unixtime(a) from t1; +flush tables; +select a, b, from_unixtime(a) from t1; +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/delete_use_source.result mariadb-10.3-10.3.22/mysql-test/main/delete_use_source.result --- mariadb-10.3-10.3.18/mysql-test/main/delete_use_source.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/delete_use_source.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,4 +1,5 @@ -create table t1(c1 integer not null,c2 integer not null, key (c1)) engine=InnoDb; +create table t1(c1 integer not null,c2 integer not null, key (c1)) +ENGINE=InnoDB STATS_PERSISTENT=1; create view v1 as select * from t1 where c1 in (0,1); insert t1 select 0,seq from seq_1_to_500; insert t1 select 1,seq from seq_1_to_100; @@ -47,8 +48,8 @@ start transaction; explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL c1 NULL NULL NULL 502 Using where -2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 58 Using index +1 PRIMARY t1 range c1 c1 4 NULL 600 Using where +2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 83 Using index delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1; affected rows: 1 delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1; @@ -63,8 +64,8 @@ start transaction; explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL c1 NULL NULL NULL 502 Using where -2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 58 Using index +1 PRIMARY t1 ALL c1 NULL NULL NULL 670 Using where +2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 83 Using index delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 ; affected rows: 500 select count(*) from v1 where c1=0; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/delete_use_source.test mariadb-10.3-10.3.22/mysql-test/main/delete_use_source.test --- mariadb-10.3-10.3.18/mysql-test/main/delete_use_source.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/delete_use_source.test 2020-01-26 18:37:27.000000000 +0000 @@ -2,7 +2,8 @@ --source include/have_innodb.inc # This test is slow on buildbot. --source include/big_test.inc -create table t1(c1 integer not null,c2 integer not null, key (c1)) engine=InnoDb; +create table t1(c1 integer not null,c2 integer not null, key (c1)) +ENGINE=InnoDB STATS_PERSISTENT=1; create view v1 as select * from t1 where c1 in (0,1); insert t1 select 0,seq from seq_1_to_500; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/derived_cond_pushdown.result mariadb-10.3-10.3.22/mysql-test/main/derived_cond_pushdown.result --- mariadb-10.3-10.3.18/mysql-test/main/derived_cond_pushdown.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/derived_cond_pushdown.result 2020-01-26 18:37:27.000000000 +0000 @@ -10568,6 +10568,36 @@ } DROP TABLE t1; DROP VIEW v1; +# +# MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +# +CREATE TABLE t1 (a INT, b DATE, c INT); +INSERT INTO t1 VALUES +(1,'2001-01-21',345), +(6,'2001-01-20',315), +(6,'2001-01-20',214); +CREATE TABLE t2 (a INT, b INT); +INSERT INTO t2 VALUES (2,19), (7,20); +CREATE VIEW v1 AS SELECT a, b, max(c) AS max_c FROM t1 +GROUP BY a,b HAVING max_c < 707; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a); +a b max_c a b dayname(v1.b) +1 2001-01-21 345 2 19 Sunday +1 2001-01-21 345 7 20 Sunday +6 2001-01-20 315 7 20 Saturday +SET optimizer_switch='condition_pushdown_for_derived=off'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; +a b max_c a b dayname(v1.b) +1 2001-01-21 345 2 19 Sunday +1 2001-01-21 345 7 20 Sunday +SET optimizer_switch='condition_pushdown_for_derived=on'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; +a b max_c a b dayname(v1.b) +1 2001-01-21 345 2 19 Sunday +1 2001-01-21 345 7 20 Sunday +DROP VIEW v1; +DROP TABLE t1, t2; +SET optimizer_switch=DEFAULT; # End of 10.2 tests # # MDEV-14579: pushdown conditions into materialized views/derived tables diff -Nru mariadb-10.3-10.3.18/mysql-test/main/derived_cond_pushdown.test mariadb-10.3-10.3.22/mysql-test/main/derived_cond_pushdown.test --- mariadb-10.3-10.3.18/mysql-test/main/derived_cond_pushdown.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/derived_cond_pushdown.test 2020-01-26 18:37:27.000000000 +0000 @@ -2140,6 +2140,34 @@ DROP TABLE t1; DROP VIEW v1; +--echo # +--echo # MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +--echo # + +CREATE TABLE t1 (a INT, b DATE, c INT); +INSERT INTO t1 VALUES + (1,'2001-01-21',345), + (6,'2001-01-20',315), + (6,'2001-01-20',214); + +CREATE TABLE t2 (a INT, b INT); +INSERT INTO t2 VALUES (2,19), (7,20); +CREATE VIEW v1 AS SELECT a, b, max(c) AS max_c FROM t1 + GROUP BY a,b HAVING max_c < 707; + +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a); + +SET optimizer_switch='condition_pushdown_for_derived=off'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; + +SET optimizer_switch='condition_pushdown_for_derived=on'; +SELECT *, dayname(v1.b) FROM v1,t2 WHERE (v1.max_c>214) AND (t2.a>v1.a) AND dayname(v1.b)='Sunday'; + +DROP VIEW v1; +DROP TABLE t1, t2; + +SET optimizer_switch=DEFAULT; + --echo # End of 10.2 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/drop_bad_db_type.result mariadb-10.3-10.3.22/mysql-test/main/drop_bad_db_type.result --- mariadb-10.3-10.3.18/mysql-test/main/drop_bad_db_type.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/drop_bad_db_type.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,4 +1,5 @@ -set debug_dbug='+d,unstable_db_type'; +SET @saved_dbug = @@debug_dbug; +SET debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; create table t1 (a int) engine=archive; insert t1 values (1),(2),(3); @@ -32,4 +33,4 @@ drop table t1; db.opt uninstall soname 'ha_archive'; -set debug_dbug='-d,unstable_db_type'; +SET debug_dbug=@saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/drop_bad_db_type.test mariadb-10.3-10.3.22/mysql-test/main/drop_bad_db_type.test --- mariadb-10.3-10.3.18/mysql-test/main/drop_bad_db_type.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/drop_bad_db_type.test 2020-01-26 18:37:27.000000000 +0000 @@ -7,7 +7,8 @@ let $mysqld_datadir= `select @@datadir`; -set debug_dbug='+d,unstable_db_type'; +SET @saved_dbug = @@debug_dbug; +SET debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; create table t1 (a int) engine=archive; @@ -27,5 +28,4 @@ --list_files $mysqld_datadir/test uninstall soname 'ha_archive'; -set debug_dbug='-d,unstable_db_type'; - +SET debug_dbug=@saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/engine_error_in_alter-8453.result mariadb-10.3-10.3.22/mysql-test/main/engine_error_in_alter-8453.result --- mariadb-10.3-10.3.18/mysql-test/main/engine_error_in_alter-8453.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/engine_error_in_alter-8453.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,6 +1,7 @@ create table t1 (a int, b int); -set debug_dbug='+d,external_lock_failure'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,external_lock_failure'; alter table t1 add column c int; ERROR HY000: Got error 168 'KABOOM!' from MyISAM -set debug_dbug=''; +SET debug_dbug= @saved_dbug; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/engine_error_in_alter-8453.test mariadb-10.3-10.3.22/mysql-test/main/engine_error_in_alter-8453.test --- mariadb-10.3-10.3.18/mysql-test/main/engine_error_in_alter-8453.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/engine_error_in_alter-8453.test 2020-01-26 18:37:27.000000000 +0000 @@ -4,8 +4,9 @@ --source include/have_debug.inc create table t1 (a int, b int); -set debug_dbug='+d,external_lock_failure'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,external_lock_failure'; --error ER_GET_ERRMSG alter table t1 add column c int; -set debug_dbug=''; +SET debug_dbug= @saved_dbug; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/error_simulation.result mariadb-10.3-10.3.22/mysql-test/main/error_simulation.result --- mariadb-10.3-10.3.18/mysql-test/main/error_simulation.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/error_simulation.result 2020-01-26 18:37:27.000000000 +0000 @@ -10,6 +10,7 @@ ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'), ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK'); set tmp_table_size=1024; +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,raise_error"; SELECT MAX(a) FROM t1 GROUP BY a,b; ERROR 23000: Can't write; duplicate key in table '(temporary)' @@ -22,7 +23,7 @@ INSERT INTO t1 VALUES (1), (0), (2); SET SESSION debug_dbug='+d,alter_table_only_index_change'; ALTER TABLE t1 ADD INDEX a(a); -SET SESSION debug_dbug=DEFAULT; +SET debug_dbug= @saved_dbug; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -42,7 +43,7 @@ SET SESSION debug_dbug="+d,bug42064_simulate_oom"; INSERT INTO t1 VALUES(""); Got one of the listed errors -SET SESSION debug_dbug=DEFAULT; +SET debug_dbug= @saved_dbug; DROP TABLE t1; # # Bug#41660: Sort-index_merge for non-first join table may require @@ -79,7 +80,7 @@ 7 1 1 data 8 1 1 data 9 1 1 data -SET SESSION debug_dbug= DEFAULT; +SET debug_dbug= @saved_dbug; SET optimizer_switch=@save_optimizer_switch; DROP TABLE t1, t2; # @@ -92,7 +93,7 @@ SET SESSION debug_dbug="+d,bug11747970_raise_error"; INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); ERROR 70100: Query execution was interrupted -SET SESSION debug_dbug = DEFAULT; +SET debug_dbug= @saved_dbug; DROP TABLE t1,t2; # # End of 5.1 tests @@ -126,4 +127,4 @@ SELECT f1(1); Got one of the listed errors DROP FUNCTION f1; -SET SESSION debug_dbug=DEFAULT; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/error_simulation.test mariadb-10.3-10.3.22/mysql-test/main/error_simulation.test --- mariadb-10.3-10.3.18/mysql-test/main/error_simulation.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/error_simulation.test 2020-01-26 18:37:27.000000000 +0000 @@ -21,6 +21,7 @@ # Set debug flag so an error is returned when # tmp table in query is converted from heap to myisam +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,raise_error"; --error ER_DUP_KEY @@ -36,7 +37,7 @@ INSERT INTO t1 VALUES (1), (0), (2); SET SESSION debug_dbug='+d,alter_table_only_index_change'; ALTER TABLE t1 ADD INDEX a(a); -SET SESSION debug_dbug=DEFAULT; +SET debug_dbug= @saved_dbug; SHOW CREATE TABLE t1; SELECT * FROM t1; DROP TABLE t1; @@ -51,7 +52,7 @@ # May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY --error ER_OUT_OF_RESOURCES, 5 INSERT INTO t1 VALUES(""); -SET SESSION debug_dbug=DEFAULT; +SET debug_dbug= @saved_dbug; DROP TABLE t1; @@ -84,7 +85,7 @@ SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); -SET SESSION debug_dbug= DEFAULT; +SET debug_dbug= @saved_dbug; SET optimizer_switch=@save_optimizer_switch; @@ -101,7 +102,7 @@ SET SESSION debug_dbug="+d,bug11747970_raise_error"; --error ER_QUERY_INTERRUPTED INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); -SET SESSION debug_dbug = DEFAULT; +SET debug_dbug= @saved_dbug; DROP TABLE t1,t2; @@ -156,4 +157,4 @@ --error ER_OUT_OF_RESOURCES, 5 SELECT f1(1); DROP FUNCTION f1; -SET SESSION debug_dbug=DEFAULT; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/events_bugs.result mariadb-10.3-10.3.22/mysql-test/main/events_bugs.result --- mariadb-10.3-10.3.18/mysql-test/main/events_bugs.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/events_bugs.result 2020-01-26 18:37:27.000000000 +0000 @@ -692,7 +692,7 @@ connect u1_con,localhost,mysqltest_u1,,events_test; -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement ALTER EVENT e1 COMMENT 'comment'; @@ -703,7 +703,7 @@ connect root_con,localhost,root,,events_test; -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; Warnings: Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. diff -Nru mariadb-10.3-10.3.18/mysql-test/main/events_bugs.test mariadb-10.3-10.3.22/mysql-test/main/events_bugs.test --- mariadb-10.3-10.3.18/mysql-test/main/events_bugs.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/events_bugs.test 2020-01-26 18:37:27.000000000 +0000 @@ -1029,7 +1029,7 @@ --echo --error ER_OPTION_PREVENTS_STATEMENT -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; --echo @@ -1049,7 +1049,7 @@ --echo -CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; +CREATE EVENT e1 ON SCHEDULE AT '2038-01-01 00:00:00' DO SET @a = 1; --echo diff -Nru mariadb-10.3-10.3.18/mysql-test/main/foreign_key.result mariadb-10.3-10.3.22/mysql-test/main/foreign_key.result --- mariadb-10.3-10.3.18/mysql-test/main/foreign_key.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/foreign_key.result 2020-01-26 18:37:27.000000000 +0000 @@ -82,3 +82,29 @@ on update set default on update set default); 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 'update set default)' at line 3 drop table t_34455; +# +# MDEV-18460 Don't allow multiple table CONSTRAINTs with the same name. +# +CREATE TABLE tpk (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100) NOT NULL) ENGINE=Innodb; +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1), CONSTRAINT sid CHECK (c2>15)); +ERROR HY000: Duplicate CHECK constraint name 'sid' +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1)); +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +ERROR HY000: Duplicate CHECK constraint name 'sid' +DROP TABLE tfk; +CREATE TABLE tfk (c1 INT, c2 INT, +CONSTRAINT sid FOREIGN KEY (c1) REFERENCES tpk (id)) ENGINE=Innodb; +show create table tfk; +Table Create Table +tfk CREATE TABLE `tfk` ( + `c1` int(11) DEFAULT NULL, + `c2` int(11) DEFAULT NULL, + KEY `sid` (`c1`), + CONSTRAINT `sid` FOREIGN KEY (`c1`) REFERENCES `tpk` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +ERROR HY000: Duplicate CHECK constraint name 'sid' +ALTER TABLE tfk ADD CONSTRAINT sid UNIQUE(c2); +ERROR 42000: Duplicate key name 'sid' +DROP TABLE tfk; +DROP TABLE tpk; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/foreign_key.test mariadb-10.3-10.3.22/mysql-test/main/foreign_key.test --- mariadb-10.3-10.3.18/mysql-test/main/foreign_key.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/foreign_key.test 2020-01-26 18:37:27.000000000 +0000 @@ -117,4 +117,28 @@ drop table t_34455; +--echo # +--echo # MDEV-18460 Don't allow multiple table CONSTRAINTs with the same name. +--echo # + +CREATE TABLE tpk (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100) NOT NULL) ENGINE=Innodb; +--error ER_DUP_CONSTRAINT_NAME +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1), CONSTRAINT sid CHECK (c2>15)); + +CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1)); +--error ER_DUP_CONSTRAINT_NAME +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +DROP TABLE tfk; + +CREATE TABLE tfk (c1 INT, c2 INT, + CONSTRAINT sid FOREIGN KEY (c1) REFERENCES tpk (id)) ENGINE=Innodb; +show create table tfk; +--error ER_DUP_CONSTRAINT_NAME +ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15); +--error ER_DUP_KEYNAME +ALTER TABLE tfk ADD CONSTRAINT sid UNIQUE(c2); +DROP TABLE tfk; + +DROP TABLE tpk; + diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_json.result mariadb-10.3-10.3.22/mysql-test/main/func_json.result --- mariadb-10.3-10.3.18/mysql-test/main/func_json.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_json.result 2020-01-26 18:37:27.000000000 +0000 @@ -942,5 +942,26 @@ json_length json_depnth 2 3 # +# MDEV-19670 json escaped unicode parse error +# +SELECT json_valid('{"value":"\\ud83d\\ude0a"}'); +json_valid('{"value":"\\ud83d\\ude0a"}') +1 +SELECT json_valid('{"test": "\\ud83d\\ude0b"}'); +json_valid('{"test": "\\ud83d\\ude0b"}') +1 +# +# MDEV-19670 json escaped unicode parse error +# +SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}' + UNION +SELECT JSON_VALID('{"\\"admin": null}'), '{"\\"admin": null}' + UNION +SELECT JSON_VALID('{"\\"": null}'), '{"\\"": null}'; +JSON_VALID('{"admin\\"": null}') {"admin\"": null} +1 {"admin\"": null} +1 {"\"admin": null} +1 {"\"": null} +# # End of 10.3 tests # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_json.test mariadb-10.3-10.3.22/mysql-test/main/func_json.test --- mariadb-10.3-10.3.18/mysql-test/main/func_json.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_json.test 2020-01-26 18:37:27.000000000 +0000 @@ -562,5 +562,22 @@ --disable_metadata --echo # +--echo # MDEV-19670 json escaped unicode parse error +--echo # + +SELECT json_valid('{"value":"\\ud83d\\ude0a"}'); +SELECT json_valid('{"test": "\\ud83d\\ude0b"}'); + +--echo # +--echo # MDEV-19670 json escaped unicode parse error +--echo # + +SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}' + UNION + SELECT JSON_VALID('{"\\"admin": null}'), '{"\\"admin": null}' + UNION + SELECT JSON_VALID('{"\\"": null}'), '{"\\"": null}'; + +--echo # --echo # End of 10.3 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_math.result mariadb-10.3-10.3.22/mysql-test/main/func_math.result --- mariadb-10.3-10.3.18/mysql-test/main/func_math.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_math.result 2020-01-26 18:37:27.000000000 +0000 @@ -817,6 +817,107 @@ 0 DROP TABLE t1; # +# MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal +# +# Testing that dyadic arithmetic operations are symmetric +# for (+1) and (-1) and produce the same length in CONCAT(), +# because (+1) and (-1) have the same data type: signed int. +CREATE TABLE t1 AS SELECT +CONCAT(+1%2.0), +CONCAT(-1%2.0), +CONCAT(+1/2.0), +CONCAT(-1/2.0), +CONCAT(+1*2.0), +CONCAT(-1*2.0), +CONCAT(+1+2.0), +CONCAT(-1+2.0), +CONCAT(+1-2.0), +CONCAT(-1-2.0); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CONCAT(+1%2.0)` varchar(4) DEFAULT NULL, + `CONCAT(-1%2.0)` varchar(4) DEFAULT NULL, + `CONCAT(+1/2.0)` varchar(8) DEFAULT NULL, + `CONCAT(-1/2.0)` varchar(8) DEFAULT NULL, + `CONCAT(+1*2.0)` varchar(5) DEFAULT NULL, + `CONCAT(-1*2.0)` varchar(5) DEFAULT NULL, + `CONCAT(+1+2.0)` varchar(5) DEFAULT NULL, + `CONCAT(-1+2.0)` varchar(5) DEFAULT NULL, + `CONCAT(+1-2.0)` varchar(5) DEFAULT NULL, + `CONCAT(-1-2.0)` varchar(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 AS SELECT +CONCAT(+1%2), +CONCAT(-1%2), +CONCAT(+1/2), +CONCAT(-1/2), +CONCAT(+1*2), +CONCAT(-1*2), +CONCAT(+1+2), +CONCAT(-1+2), +CONCAT(+1-2), +CONCAT(-1-2); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CONCAT(+1%2)` varchar(2) DEFAULT NULL, + `CONCAT(-1%2)` varchar(2) DEFAULT NULL, + `CONCAT(+1/2)` varchar(7) DEFAULT NULL, + `CONCAT(-1/2)` varchar(7) DEFAULT NULL, + `CONCAT(+1*2)` varchar(3) DEFAULT NULL, + `CONCAT(-1*2)` varchar(3) DEFAULT NULL, + `CONCAT(+1+2)` varchar(3) DEFAULT NULL, + `CONCAT(-1+2)` varchar(3) DEFAULT NULL, + `CONCAT(+1-2)` varchar(3) DEFAULT NULL, + `CONCAT(-1-2)` varchar(3) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# +# Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST +# +create table t1(a int); +insert ignore t1 values("1e-214748364"); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +insert ignore t1 values("1e-2147483648"); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +insert ignore t1 values("1e-21474836480"); +Warnings: +Warning 1265 Data truncated for column 'a' at row 1 +insert ignore t1 values("1e+214748364"); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +insert ignore t1 values("1e+2147483647"); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +insert ignore t1 values("1e+21474836470"); +Warnings: +Warning 1264 Out of range value for column 'a' at row 1 +set global max_allowed_packet= cast(2*1024*1024*1024+1024 as unsigned); +Warnings: +Warning 1292 Truncated incorrect max_allowed_packet value: '2147484672' +connect foo,localhost,root; +set @a=2147483647; +insert ignore t1 values (concat('1', repeat('0', @a+18), 'e-', @a-1, '0')); +Warnings: +Warning 1301 Result of repeat() was larger than max_allowed_packet (1073741824) - truncated +disconnect foo; +connection default; +set global max_allowed_packet=default; +select * from t1; +a +0 +0 +0 +2147483647 +2147483647 +2147483647 +NULL +drop table t1; +# # End of 5.5 tests # # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_math.test mariadb-10.3-10.3.22/mysql-test/main/func_math.test --- mariadb-10.3-10.3.18/mysql-test/main/func_math.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_math.test 2020-01-26 18:37:27.000000000 +0000 @@ -589,6 +589,69 @@ SELECT STDDEV_SAMP(ROUND('0', 309)) FROM t1; DROP TABLE t1; + +--echo # +--echo # MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal +--echo # + +--echo # Testing that dyadic arithmetic operations are symmetric +--echo # for (+1) and (-1) and produce the same length in CONCAT(), +--echo # because (+1) and (-1) have the same data type: signed int. + +CREATE TABLE t1 AS SELECT + CONCAT(+1%2.0), + CONCAT(-1%2.0), + CONCAT(+1/2.0), + CONCAT(-1/2.0), + CONCAT(+1*2.0), + CONCAT(-1*2.0), + CONCAT(+1+2.0), + CONCAT(-1+2.0), + CONCAT(+1-2.0), + CONCAT(-1-2.0); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 AS SELECT + CONCAT(+1%2), + CONCAT(-1%2), + CONCAT(+1/2), + CONCAT(-1/2), + CONCAT(+1*2), + CONCAT(-1*2), + CONCAT(+1+2), + CONCAT(-1+2), + CONCAT(+1-2), + CONCAT(-1-2); +SHOW CREATE TABLE t1; +DROP TABLE t1; + + +--echo # +--echo # Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST +--echo # + +create table t1(a int); +insert ignore t1 values("1e-214748364"); +insert ignore t1 values("1e-2147483648"); +insert ignore t1 values("1e-21474836480"); +insert ignore t1 values("1e+214748364"); +insert ignore t1 values("1e+2147483647"); +insert ignore t1 values("1e+21474836470"); + +# if max max_allowed_packet will ever be increased beyond 2GB, this could +# break again: +set global max_allowed_packet= cast(2*1024*1024*1024+1024 as unsigned); +connect foo,localhost,root; +set @a=2147483647; +insert ignore t1 values (concat('1', repeat('0', @a+18), 'e-', @a-1, '0')); +disconnect foo; +connection default; +set global max_allowed_packet=default; + +select * from t1; +drop table t1; + --echo # --echo # End of 5.5 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_misc.result mariadb-10.3-10.3.22/mysql-test/main/func_misc.result --- mariadb-10.3-10.3.18/mysql-test/main/func_misc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_misc.result 2020-01-26 18:37:27.000000000 +0000 @@ -1491,6 +1491,19 @@ x DEALLOCATE PREPARE stmt; # +# MDEV-19680: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || +# (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' +# or alike failed upon SELECT with mix of functions from simple view +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE VIEW v1 AS SELECT * FROM t1; +SELECT ISNULL( BENCHMARK(1, MIN(a))) FROM v1; +ISNULL( BENCHMARK(1, MIN(a))) +0 +DROP VIEW v1; +DROP TABLE t1; +# # Start of 10.2 tests # # @@ -1557,6 +1570,15 @@ DROP VIEW v1; DROP TABLE t1; # +# MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item +# +SELECT ( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2; +( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2 +-1 +SELECT RELEASE_LOCK('foo'); +RELEASE_LOCK('foo') +1 +# # End of 10.2 tests # # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_misc.test mariadb-10.3-10.3.22/mysql-test/main/func_misc.test --- mariadb-10.3-10.3.18/mysql-test/main/func_misc.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_misc.test 2020-01-26 18:37:27.000000000 +0000 @@ -1139,6 +1139,21 @@ EXECUTE stmt; DEALLOCATE PREPARE stmt; +--echo # +--echo # MDEV-19680: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || +--echo # (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' +--echo # or alike failed upon SELECT with mix of functions from simple view +--echo # + +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(2); +CREATE VIEW v1 AS SELECT * FROM t1; + +SELECT ISNULL( BENCHMARK(1, MIN(a))) FROM v1; + +DROP VIEW v1; +DROP TABLE t1; + --echo # --echo # Start of 10.2 tests @@ -1192,6 +1207,12 @@ DROP VIEW v1; DROP TABLE t1; +--echo # +--echo # MDEV-20517 Assertion `!is_expensive()' failed in Item::value_depends_on_sql_mode_const_item +--echo # + +SELECT ( 1 LIKE GET_LOCK( 'foo', 0 ) ) - 2; +SELECT RELEASE_LOCK('foo'); --echo # --echo # End of 10.2 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre.result mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre.result --- mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre.result 2020-01-26 18:37:27.000000000 +0000 @@ -888,33 +888,33 @@ 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]*$' +SELECT CONCAT(REPEAT('100,',400),'101') RLIKE '^(([1-9][0-9]*),)*[1-9][0-9]*$'; +CONCAT(REPEAT('100,',400),'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,',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]*$') +SELECT REGEXP_INSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$'); +REGEXP_INSTR(CONCAT(REPEAT('100,',400),'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,',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]*$')) +SELECT LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$')); +LENGTH(REGEXP_SUBSTR(CONCAT(REPEAT('100,',400),'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,',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]*$', '')) -803 +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); +LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')) +1603 Warnings: Warning 1139 Got error 'pcre_exec: recursion limit of NUM exceeded' from regexp SELECT REGEXP_INSTR('a_kollision', 'oll'); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre.test mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre.test --- mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre.test 2020-01-26 18:37:27.000000000 +0000 @@ -438,19 +438,19 @@ # 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 CONCAT(REPEAT('100,',400),'101') RLIKE '^(([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 REGEXP_INSTR(CONCAT(REPEAT('100,',400),'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_SUBSTR(CONCAT(REPEAT('100,',400),'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]*$', '')); +SELECT LENGTH(REGEXP_REPLACE(CONCAT(REPEAT('100,',400),'101'), '^(([1-9][0-9]*),)*[1-9][0-9]*$', '')); # # MDEV-12942 REGEXP_INSTR returns 1 when using brackets diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre_debug.result mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,10 +1,9 @@ -SET debug_dbug='+d,pcre_exec_error_123'; +SET STATEMENT debug_dbug='+d,pcre_exec_error_123' for SELECT 'a' RLIKE 'a'; 'a' RLIKE 'a' 0 Warnings: Warning 1139 Got error 'pcre_exec: Internal error (-123)' from regexp -SET debug_dbug=''; SELECT 'a' RLIKE 'a'; 'a' RLIKE 'a' 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre_debug.test mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/func_regexp_pcre_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_regexp_pcre_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -1,6 +1,5 @@ --source include/have_debug.inc -SET debug_dbug='+d,pcre_exec_error_123'; +SET STATEMENT debug_dbug='+d,pcre_exec_error_123' for SELECT 'a' RLIKE 'a'; -SET debug_dbug=''; SELECT 'a' RLIKE 'a'; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_time.result mariadb-10.3-10.3.22/mysql-test/main/func_time.result --- mariadb-10.3-10.3.18/mysql-test/main/func_time.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_time.result 2020-01-26 18:37:27.000000000 +0000 @@ -159,7 +159,9 @@ 1999-52 1999-52 select dayname("1962-03-03"),dayname("1962-03-03")+0; dayname("1962-03-03") dayname("1962-03-03")+0 -Saturday 5 +Saturday 0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'Saturday' select monthname("1972-03-04"),monthname("1972-03-04")+0; monthname("1972-03-04") monthname("1972-03-04")+0 March 0 @@ -2153,7 +2155,7 @@ SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `f2` varchar(26) DEFAULT NULL + `f2` varchar(22) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 SELECT * FROM t2; f2 @@ -3508,6 +3510,19 @@ DROP VIEW v1,v2,v3; DROP TABLE t1,t2; # +# MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +# +SELECT DAYNAME('2019-01-05')+0; +DAYNAME('2019-01-05')+0 +0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'Saturday' +SELECT CAST(DAYNAME('2019-01-05') AS SIGNED); +CAST(DAYNAME('2019-01-05') AS SIGNED) +0 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'Saturday' +# # End of 10.2 tests # # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/func_time.test mariadb-10.3-10.3.22/mysql-test/main/func_time.test --- mariadb-10.3-10.3.18/mysql-test/main/func_time.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/func_time.test 2020-01-26 18:37:27.000000000 +0000 @@ -1970,6 +1970,14 @@ DROP TABLE t1,t2; --echo # +--echo # MDEV-21388 Wrong result of DAYNAME()=xxx in combination with condition_pushdown_for_derived=on +--echo # + +SELECT DAYNAME('2019-01-05')+0; +SELECT CAST(DAYNAME('2019-01-05') AS SIGNED); + + +--echo # --echo # End of 10.2 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/group_by.result mariadb-10.3-10.3.22/mysql-test/main/group_by.result --- mariadb-10.3-10.3.18/mysql-test/main/group_by.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/group_by.result 2020-01-26 18:37:27.000000000 +0000 @@ -2828,6 +2828,22 @@ 0 drop table t1; # +# MDEV-20922: Adding an order by changes the query results +# +CREATE TABLE t1(a int, b int); +INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200), (5, 200); +create view v1 as select a, b+1 as x from t1; +SELECT x, COUNT(DISTINCT a) AS y FROM v1 GROUP BY x ORDER BY y; +x y +101 2 +201 3 +SELECT b+1 AS x, COUNT(DISTINCT a) AS y FROM t1 GROUP BY x ORDER BY y; +x y +101 2 +201 3 +drop view v1; +drop table t1; +# # MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup # create table t1 (a int,b int) ; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/group_by.test mariadb-10.3-10.3.22/mysql-test/main/group_by.test --- mariadb-10.3-10.3.18/mysql-test/main/group_by.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/group_by.test 2020-01-26 18:37:27.000000000 +0000 @@ -1946,6 +1946,20 @@ drop table t1; --echo # +--echo # MDEV-20922: Adding an order by changes the query results +--echo # + +CREATE TABLE t1(a int, b int); +INSERT INTO t1 values (1, 100), (2, 200), (3, 100), (4, 200), (5, 200); + +create view v1 as select a, b+1 as x from t1; + +SELECT x, COUNT(DISTINCT a) AS y FROM v1 GROUP BY x ORDER BY y; +SELECT b+1 AS x, COUNT(DISTINCT a) AS y FROM t1 GROUP BY x ORDER BY y; + +drop view v1; +drop table t1; +--echo # --echo # MDEV-10694 - SIGFPE and/or huge memory allocation in maria_create with distinct/group by/ rollup --echo # create table t1 (a int,b int) ; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/group_min_max.result mariadb-10.3-10.3.22/mysql-test/main/group_min_max.result --- mariadb-10.3-10.3.18/mysql-test/main/group_min_max.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/group_min_max.result 2020-01-26 18:37:27.000000000 +0000 @@ -2119,12 +2119,12 @@ 1 SIMPLE t1 index NULL idx_t1_2 147 NULL 128 Using index explain extended select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 75.00 Using where; Using index +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 102 94.12 Using where; Using index Warnings: Note 1003 select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,count(`test`.`t1`.`a2`) AS `count(a2)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b` explain extended select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b; id select_type table type possible_keys key key_len ref rows filtered Extra -1 SIMPLE t1 index idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 128 75.00 Using where; Using index +1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 102 94.12 Using where; Using index Warnings: Note 1003 select sum(ord(`test`.`t1`.`a1`)) AS `sum(ord(a1))` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b` create table t4 as select distinct a1, a2, b, c from t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/index_merge_innodb.result mariadb-10.3-10.3.22/mysql-test/main/index_merge_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/index_merge_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/index_merge_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,8 +1,11 @@ +connect disable_purge,localhost,root,,; +# Disable the purge of InnoDB history, to make the test run faster. +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; +SET STORAGE_ENGINE = InnoDB; set @optimizer_switch_save= @@optimizer_switch; set optimizer_switch='index_merge_sort_intersection=off'; #---------------- Index merge test 2 ------------------------------------------- -SET SESSION STORAGE_ENGINE = InnoDB; -drop table if exists t1,t2; create table t1 ( key1 int not null, @@ -10,6 +13,7 @@ INDEX i1(key1), INDEX i2(key2) ); +INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200; explain select * from t1 where key1 < 5 or key2 > 197; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where @@ -67,6 +71,8 @@ ); show warnings; Level Code Message +INSERT INTO t1 (key1, key2, filler) +SELECT seq/4, seq/8, 'filler-data' FROM seq_30_to_0; explain select pk from t1 where key1 = 1 and key2 = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge key1,key2 key1,key2 5,4 NULL 1 Using intersect(key1,key2); Using where; Using index @@ -292,24 +298,7 @@ key2 int not null default 0, key3 int not null default 0 ); -insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); -set @d=8; -begin; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -commit; +insert into t1(key1) select seq from seq_1_to_1024; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; @@ -388,8 +377,6 @@ 1 b DROP TABLE t1, t2; #---------------- 2-sweeps read Index merge test 2 ------------------------------- -SET SESSION STORAGE_ENGINE = InnoDB; -drop table if exists t1; create table t1 ( pk int primary key, key1 int, @@ -399,6 +386,8 @@ index(key1), index(key2) ); +insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2' +from seq_1000_to_1; select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); pk key1 key2 filler filler2 2 2 2 filler-data filler-data-2 @@ -526,8 +515,6 @@ 54 54 54 filler-data filler-data-2 drop table t1; #---------------- Clustered PK ROR-index_merge tests ----------------------------- -SET SESSION STORAGE_ENGINE = InnoDB; -drop table if exists t1; create table t1 ( pk1 int not null, @@ -668,34 +655,27 @@ # # BUG#56862/640419: Wrong result with sort_union index merge when one # of the merged index scans is the primary key scan -# +# +CREATE TABLE t0(a int, b int) ENGINE=MyISAM; CREATE TABLE t1 ( pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, a int, b int, INDEX idx(a)) ENGINE=INNODB; -begin; -INSERT INTO t1(a,b) VALUES +INSERT INTO t0(a,b) VALUES (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); -INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; -INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; -INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t0(a,b) SELECT a+20, b+2000 FROM t0; +INSERT INTO t0(a,b) SELECT a+40, b+4000 FROM t0; +INSERT INTO t0(a,b) SELECT a+80, b+8000 FROM t0; +begin; +INSERT INTO t1(a,b) SELECT t0.a,t0.b FROM t0, seq_1_to_1024; INSERT INTO t1 VALUES (1000000, 0, 0); commit; +DROP TABLE t0; SET SESSION sort_buffer_size = 1024*36; set @tmp_optimizer_switch=@@optimizer_switch; set optimizer_switch='derived_merge=off,derived_with_keys=off'; @@ -759,8 +739,6 @@ # # BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows # -create table t0(a int); -insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1 ( pk int auto_increment, zone_id int, @@ -769,7 +747,7 @@ key (zone_id), key (modified) ) engine=innodb; -insert into t1 (zone_id, modified) select 0,0 from t0 A, t0 B, t0 C, t0 D; +insert into t1 (zone_id, modified) select 0,0 from seq_1_to_10000; update t1 set zone_id=487, modified=9 where pk=7259; update t1 set zone_id=487, modified=9 where pk=7260; update t1 set zone_id=830, modified=9 where pk=8434; @@ -787,7 +765,7 @@ commit; select * from t1 where t1.zone_id=830 AND modified=9; pk zone_id modified -drop table t0, t1; +drop table t1; # # MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join # @@ -822,14 +800,11 @@ KEY key1 (key1), KEY key2 (key2) ) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; -create table t2(a int); -insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); -create table t3(a int); -insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D; insert into t1 (key1, key2, col1,col2,col3,col4) -select a,a, a,a,a,a from t3; +select seq,seq,seq,seq,seq,seq from seq_1_to_10000; SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5); sum(col1) 33632261 -drop table t1,t2,t3; +drop table t1; set optimizer_switch=@tmp_optimizer_switch; +disconnect disable_purge; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/index_merge_innodb.test mariadb-10.3-10.3.22/mysql-test/main/index_merge_innodb.test --- mariadb-10.3-10.3.18/mysql-test/main/index_merge_innodb.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/index_merge_innodb.test 2020-01-26 18:37:27.000000000 +0000 @@ -14,7 +14,12 @@ --source include/not_staging.inc --source include/have_innodb.inc -let $engine_type= InnoDB; +connect disable_purge,localhost,root,,; +--echo # Disable the purge of InnoDB history, to make the test run faster. +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; + +SET STORAGE_ENGINE = InnoDB; # InnoDB does not support Merge tables (affects include/index_merge1.inc) let $merge_table_support= 0; @@ -37,7 +42,9 @@ --echo # --echo # BUG#56862/640419: Wrong result with sort_union index merge when one --echo # of the merged index scans is the primary key scan ---echo # +--echo # + +CREATE TABLE t0(a int, b int) ENGINE=MyISAM; CREATE TABLE t1 ( pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -46,27 +53,19 @@ INDEX idx(a)) ENGINE=INNODB; -begin; -INSERT INTO t1(a,b) VALUES +INSERT INTO t0(a,b) VALUES (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); -INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; -INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; -INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; -INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t0(a,b) SELECT a+20, b+2000 FROM t0; +INSERT INTO t0(a,b) SELECT a+40, b+4000 FROM t0; +INSERT INTO t0(a,b) SELECT a+80, b+8000 FROM t0; +begin; +INSERT INTO t1(a,b) SELECT t0.a,t0.b FROM t0, seq_1_to_1024; INSERT INTO t1 VALUES (1000000, 0, 0); commit; +DROP TABLE t0; SET SESSION sort_buffer_size = 1024*36; set @tmp_optimizer_switch=@@optimizer_switch; @@ -131,9 +130,6 @@ --echo # BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows --echo # -create table t0(a int); -insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); - create table t1 ( pk int auto_increment, zone_id int, @@ -143,7 +139,7 @@ key (modified) ) engine=innodb; -insert into t1 (zone_id, modified) select 0,0 from t0 A, t0 B, t0 C, t0 D; +insert into t1 (zone_id, modified) select 0,0 from seq_1_to_10000; update t1 set zone_id=487, modified=9 where pk=7259; update t1 set zone_id=487, modified=9 where pk=7260; update t1 set zone_id=830, modified=9 where pk=8434; @@ -157,7 +153,7 @@ commit; select * from t1 where t1.zone_id=830 AND modified=9; -drop table t0, t1; +drop table t1; --echo # --echo # MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join @@ -197,14 +193,10 @@ KEY key2 (key2) ) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; -create table t2(a int); -insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); - -create table t3(a int); -insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D; - insert into t1 (key1, key2, col1,col2,col3,col4) -select a,a, a,a,a,a from t3; +select seq,seq,seq,seq,seq,seq from seq_1_to_10000; SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5); -drop table t1,t2,t3; +drop table t1; set optimizer_switch=@tmp_optimizer_switch; + +disconnect disable_purge; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/index_merge_myisam.result mariadb-10.3-10.3.22/mysql-test/main/index_merge_myisam.result --- mariadb-10.3-10.3.18/mysql-test/main/index_merge_myisam.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/index_merge_myisam.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,13 +1,13 @@ +SET STORAGE_ENGINE = MyISAM; set @optimizer_switch_save= @@optimizer_switch; set optimizer_switch='index_merge_sort_intersection=off'; #---------------- Index merge test 1 ------------------------------------------- -SET SESSION STORAGE_ENGINE = MyISAM; -drop table if exists t0, t1, t2, t3, t4; create table t0 ( key1 int not null, INDEX i1(key1) ); +insert into t0(key1) select seq from seq_1_to_1024; alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key4 int not null, add index i4(key4); @@ -228,7 +228,7 @@ ); Warnings: Note 1831 Duplicate index `i2_2`. This is deprecated and will be disallowed in a future release -insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0; +insert into t4 select seq,seq,seq div 10, seq % 10, seq % 10, seq from seq_1_to_1024; select * from t4 where key1a = 3 or key1b = 4; key1a key1b key2 key2_1 key2_2 key3 3 3 0 3 3 3 @@ -414,14 +414,12 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge cola,colb cola,colb 3,3 NULL 32 Using intersect(cola,colb); Using where drop table t1; -create table t0 (a int); -insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1 ( a int, b int, filler1 char(200), filler2 char(200), key(a),key(b) ); -insert into t1 select @v:= A.a, @v, 't1', 'filler2' from t0 A, t0 B, t0 C; +insert into t1 select @v:= seq % 10, @v, 't1', 'filler2' from seq_1_to_1000; create table t2 like t1; create table t3 ( a int, b int, @@ -434,8 +432,7 @@ explain select * from t3 where a=1 and b=1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t3 index_merge a,b a,b 5,5 NULL # Using intersect(a,b); Using where -drop table t3; -drop table t0, t1, t2; +drop table t1, t2, t3; CREATE TABLE t1(a INT); INSERT INTO t1 VALUES(1); CREATE TABLE t2(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b)); @@ -540,14 +537,12 @@ # # BUG#40974: Incorrect query results when using clause evaluated using range check # -create table t0 (a int); -insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); create table t1 (a int); insert into t1 values (1),(2); create table t2(a int, b int); insert into t2 values (1,1), (2, 1000); create table t3 (a int, b int, filler char(100), key(a), key(b)); -insert into t3 select 1000, 1000,'filler' from t0 A, t0 B, t0 C; +insert into t3 select 1000, 1000,'filler' from seq_1_to_1000; insert into t3 values (1,1,'data'); insert into t3 values (1,1,'data'); The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3) @@ -565,19 +560,13 @@ a 1 2 -drop table t0, t1, t2, t3; +drop table t1, t2, t3; # # BUG#44810: index merge and order by with low sort_buffer_size # crashes server! # CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B)); -INSERT INTO t1 VALUES (REPEAT('a',128),REPEAT('b',128)); -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; -INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT REPEAT('a',128),REPEAT('b',128) FROM seq_1_to_64; SET SESSION sort_buffer_size=1024*8; EXPLAIN SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' @@ -590,8 +579,6 @@ DROP TABLE t1; End of 5.0 tests #---------------- ROR-index_merge tests ----------------------- -SET SESSION STORAGE_ENGINE = MyISAM; -drop table if exists t0,t1,t2; create table t1 ( /* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */ @@ -840,8 +827,6 @@ c1 c2 c3 DROP TABLE t1,t2; #---------------- Index merge test 2 ------------------------------------------- -SET SESSION STORAGE_ENGINE = MyISAM; -drop table if exists t1,t2; create table t1 ( key1 int not null, @@ -849,6 +834,7 @@ INDEX i1(key1), INDEX i2(key2) ); +INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200; explain select * from t1 where key1 < 5 or key2 > 197; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where @@ -906,6 +892,8 @@ ); show warnings; Level Code Message +INSERT INTO t1 (key1, key2, filler) +SELECT seq/4, seq/8, 'filler-data' FROM seq_30_to_0; explain select pk from t1 where key1 = 1 and key2 = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref key1,key2 key1 5 const 4 Using where @@ -1131,24 +1119,7 @@ key2 int not null default 0, key3 int not null default 0 ); -insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); -set @d=8; -begin; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -insert into t1 (key1) select key1+@d from t1; -set @d=@d*2; -commit; +insert into t1(key1) select seq from seq_1_to_1024; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; @@ -1227,8 +1198,6 @@ 1 b DROP TABLE t1, t2; #---------------- 2-sweeps read Index merge test 2 ------------------------------- -SET SESSION STORAGE_ENGINE = MyISAM; -drop table if exists t1; create table t1 ( pk int primary key, key1 int, @@ -1238,6 +1207,8 @@ index(key1), index(key2) ); +insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2' +from seq_1000_to_1; select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); pk key1 key2 filler filler2 10 10 10 filler-data filler-data-2 @@ -1365,8 +1336,6 @@ 1 1 1 filler-data filler-data-2 drop table t1; #---------------- Clustered PK ROR-index_merge tests ----------------------------- -SET SESSION STORAGE_ENGINE = MyISAM; -drop table if exists t1; create table t1 ( pk1 int not null, @@ -1727,22 +1696,7 @@ key1 int not null, INDEX i1(key1) ); -insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); -set @d=8; -insert into t0 select key1+ @d from t0; -set @d=@d*2; -insert into t0 select key1+ @d from t0; -set @d=@d*2; -insert into t0 select key1+ @d from t0; -set @d=@d*2; -insert into t0 select key1+ @d from t0; -set @d=@d*2; -insert into t0 select key1+ @d from t0; -set @d=@d*2; -insert into t0 select key1+ @d from t0; -set @d=@d*2; -insert into t0 select key1+ @d from t0; -set @d=@d*2; +insert into t0 select * from seq_1_to_1024; alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key8 int not null, add index i8(key8); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/index_merge_myisam.test mariadb-10.3-10.3.22/mysql-test/main/index_merge_myisam.test --- mariadb-10.3-10.3.18/mysql-test/main/index_merge_myisam.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/index_merge_myisam.test 2020-01-26 18:37:27.000000000 +0000 @@ -10,7 +10,7 @@ # include/index_merge*.inc files # -let $engine_type= MyISAM; +SET STORAGE_ENGINE = MyISAM; # MyISAM supports Merge tables let $merge_table_support= 1; @@ -33,7 +33,7 @@ A.a * B.a*10 + C.a*100, A.a, 'filler' -from t0 A, t0 B, t0 C; +from t0 A, t0 B, t0 C; --echo This should use union: explain select * from t1 where a=1 or b=1; @@ -253,15 +253,7 @@ INDEX i1(key1) ); -insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); -let $1=7; -set @d=8; -while ($1) -{ - eval insert into t0 select key1+ @d from t0; - eval set @d=@d*2; - dec $1; -} +insert into t0 select * from seq_1_to_1024; alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key8 int not null, add index i8(key8); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/information_schema_db.result mariadb-10.3-10.3.22/mysql-test/main/information_schema_db.result --- mariadb-10.3-10.3.18/mysql-test/main/information_schema_db.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/information_schema_db.result 2020-01-26 18:37:27.000000000 +0000 @@ -244,3 +244,82 @@ disconnect user1; connection default; set global sql_mode=default; +create user foo@localhost; +grant select on test.* to foo@localhost; +create procedure rootonly() select 1; +create sql security definer view v1d as select current_user(),user from information_schema.processlist; +create sql security invoker view v1i as select current_user(),user from information_schema.processlist; +create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%'; +create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%'; +create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%'; +create sql security invoker view v3i as select schema_name from information_schema.schemata where schema_name like '%mysql%'; +create sql security definer view v4d as select routine_name from information_schema.routines where routine_schema='test'; +create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test'; +create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d'; +create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d'; +connect foo,localhost,foo; +select * from v1d; +current_user() user +root@localhost root +root@localhost root +select * from v1i; +current_user() user +foo@localhost foo +select * from v2d; +table_name +user +select * from v2i; +table_name +select * from v3d; +schema_name +mysql +select * from v3i; +schema_name +select * from v4d; +routine_name +rootonly +select * from v4i; +routine_name +select * from v5d; +view_definition > '' +1 +select * from v5i; +view_definition > '' +0 +connection default; +select * from v1d; +current_user() user +root@localhost foo +root@localhost root +select * from v1i; +current_user() user +root@localhost foo +root@localhost root +select * from v2d; +table_name +user +select * from v2i; +table_name +user +select * from v3d; +schema_name +mysql +select * from v3i; +schema_name +mysql +select * from v4d; +routine_name +rootonly +select * from v4i; +routine_name +rootonly +select * from v5d; +view_definition > '' +1 +select * from v5i; +view_definition > '' +1 +disconnect foo; +drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i; +drop user foo@localhost; +drop procedure rootonly; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/information_schema_db.test mariadb-10.3-10.3.22/mysql-test/main/information_schema_db.test --- mariadb-10.3-10.3.18/mysql-test/main/information_schema_db.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/information_schema_db.test 2020-01-26 18:37:27.000000000 +0000 @@ -255,3 +255,47 @@ connection default; set global sql_mode=default; + +# +# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables +# + +create user foo@localhost; +grant select on test.* to foo@localhost; +create procedure rootonly() select 1; +create sql security definer view v1d as select current_user(),user from information_schema.processlist; +create sql security invoker view v1i as select current_user(),user from information_schema.processlist; +create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%'; +create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%'; +create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%'; +create sql security invoker view v3i as select schema_name from information_schema.schemata where schema_name like '%mysql%'; +create sql security definer view v4d as select routine_name from information_schema.routines where routine_schema='test'; +create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test'; +create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d'; +create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d'; +connect foo,localhost,foo; +select * from v1d; +select * from v1i; +select * from v2d; +select * from v2i; +select * from v3d; +select * from v3i; +select * from v4d; +select * from v4i; +select * from v5d; +select * from v5i; +connection default; +select * from v1d; +select * from v1i; +select * from v2d; +select * from v2i; +select * from v3d; +select * from v3i; +select * from v4d; +select * from v4i; +select * from v5d; +select * from v5i; +disconnect foo; +drop view v1d, v1i, v2d, v2i, v3d, v3i, v4d, v4i, v5d, v5i; +drop user foo@localhost; +drop procedure rootonly; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/innodb_icp.result mariadb-10.3-10.3.22/mysql-test/main/innodb_icp.result --- mariadb-10.3-10.3.18/mysql-test/main/innodb_icp.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/innodb_icp.result 2020-01-26 18:37:27.000000000 +0000 @@ -679,7 +679,7 @@ SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0 HAVING t1.c != 5 ORDER BY t1.c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort 1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0 HAVING t1.c != 5 ORDER BY t1.c; @@ -690,7 +690,7 @@ SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0 HAVING t1.c != 5 ORDER BY t1.c; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using filesort +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using filesort 1 SIMPLE t2 ref a a 515 test.t1.a 1 Using where SELECT t1.b, t1.c FROM t1, t2 WHERE t1.a = t2.a AND t1.b != 0 HAVING t1.c != 5 ORDER BY t1.c; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/insert_debug-master.opt mariadb-10.3-10.3.22/mysql-test/main/insert_debug-master.opt --- mariadb-10.3-10.3.18/mysql-test/main/insert_debug-master.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/insert_debug-master.opt 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1 @@ +--innodb_autoinc_lock_mode=2 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/insert_debug.result mariadb-10.3-10.3.22/mysql-test/main/insert_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/insert_debug.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/insert_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,29 @@ +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +connect con1, localhost, root,,; +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; +connection default; +CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); +CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); +CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), +c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; +SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; +INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; +connection con1; +INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; +SET DEBUG_SYNC = "now SIGNAL flushed"; +connection default; +SELECT * FROM result; +id c1 c2 c3 update_count +1 A1 B1 IT1 0 +2 A3 B3 UT1 1 +3 A2 B2 UT1 1 +4 A4 B4 UT1 1 +5 A5 B5 UT1 1 +9 A6 B6 IT1 0 +10 A7 B7 IT1 0 +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE result; +SET DEBUG_SYNC = "RESET"; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/insert_debug.test mariadb-10.3-10.3.22/mysql-test/main/insert_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/insert_debug.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/insert_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,54 @@ +source include/have_innodb.inc; +source include/have_debug.inc; +source include/have_debug_sync.inc; + +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; + +connect (con1, localhost, root,,); +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; + +connection default; + +let $conn0_id= `SELECT CONNECTION_ID()`; + +CREATE TABLE t1(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t1(c1, c2, c3) VALUES('A1','B1','IT1'), ('A2','B2','IT1'), ('A3','B3','IT1'), ('A4','B4','IT1'), ('A5','B5','IT1'), ('A6','B6','IT1'), ('A7','B7','IT1'); + +CREATE TABLE t2(c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) NOT NULL, c3 VARCHAR(10) NOT NULL); +INSERT INTO t2(c1, c2, c3) VALUES ('A3','B3','IT2'), ('A2','B2','IT2'), ('A4','B4','IT2'), ('A5','B5','II2'); + +CREATE TABLE result(id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10), +c3 VARCHAR(10), update_count INT DEFAULT 0, UNIQUE KEY uniq_idx (c1,c2), PRIMARY KEY (id)) ENGINE = innodb; + +# Insert one row from 't1' into the 'result' table and wait on a debug sync +# point. The next insert statement from an session 2 inserts values that would +# lead to unique key clash, when this insert resumes. +# The subsequent inserts of this statement(after resume) will fail because of a +# clash with the unique index, and are expected to update the row which clashes +# with the unique key. +# Without the fix for bug#30194841 a stale auto increment value, would cause a +# collision with existing auto increment column value and ends up updating that +# colliding row, instead of the row colliding with the unique index. +SET DEBUG_SYNC = "ha_write_row_end WAIT_FOR flushed EXECUTE 1"; +send INSERT INTO result(c1, c2, c3) SELECT * FROM t1 ON DUPLICATE KEY UPDATE c2=t1.c2, c3='UT1', update_count=update_count+1; + +# While session 1 is waiting (after one insert), insert rows that will cause a clash +# with the inserts of session 1 on the unique key. +connection con1; + +# Wait for the session 1 to hit the debug sync point. +let $wait_condition=SELECT 1 FROM information_schema.processlist WHERE id = $conn0_id AND state LIKE '%ha_write_row_end%'; +--source include/wait_condition.inc + +INSERT INTO result(c1, c2, c3) SELECT * FROM t2 ON DUPLICATE KEY UPDATE c2=t2.c2, c3='UT2', update_count=update_count+1; + +# Signal to resume the insert statement in session 1 +SET DEBUG_SYNC = "now SIGNAL flushed"; +connection default; +reap; +SELECT * FROM result; + +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE result; +SET DEBUG_SYNC = "RESET"; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/join.result mariadb-10.3-10.3.22/mysql-test/main/join.result --- mariadb-10.3-10.3.18/mysql-test/main/join.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/join.result 2020-01-26 18:37:27.000000000 +0000 @@ -3339,3 +3339,59 @@ 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using where 1 SIMPLE t1 ref a a 5 test.t0.a 1 drop table t0,t1; +# +# MDEV-21383: Possible range plan is not used under certain conditions +# +drop table if exists t10, t1000, t03; +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t1000(a int); +insert into t1000 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; +create table t03(a int); +insert into t03 values (0),(1),(2); +create table t1 ( +stationid int +); +insert into t1 select a from t10; +CREATE TABLE t2 ( +stationId int, +startTime int, +filler char(100), +key1 int, +key2 int, +key(key1), +key(key2), +PRIMARY KEY (`stationId`,`startTime`) +); +insert into t2 select +A.a, +B.a, +repeat('filler=data-', 4), +B.a, +1 +from +t03 A, +t1000 B; +analyze table t2; +Table Op Msg_type Msg_text +test.t2 analyze status OK +create table t3(a int, filler char(100), key(a)); +insert into t3 select A.a+1000*B.a, 'filler-data' from t1000 A, t10 B; +# This should produce a join order of t1,t2,t3 +# t2 should have type=range, key=PRIMARY key_len=8 (not type=ALL or key_len<8) +explain +SELECT * +FROM +t1,t2,t3 +WHERE +t2.startTime <= 100 and +t2.stationId = t1.stationId and +(t1.stationid = 1 or t1.stationid = 2 or t1.stationid = 3) and +key1 >0 and +t2.key2=t3.a; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +1 SIMPLE t2 range PRIMARY,key1,key2 PRIMARY 8 NULL 219 Using index condition; Using where; Using join buffer (flat, BNL join) +1 SIMPLE t3 ref a a 5 test.t2.key2 1 +drop table t1,t2,t3; +drop table t1000,t10,t03; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/join.test mariadb-10.3-10.3.22/mysql-test/main/join.test --- mariadb-10.3-10.3.18/mysql-test/main/join.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/join.test 2020-01-26 18:37:27.000000000 +0000 @@ -1748,3 +1748,68 @@ explain select * from t0,t1 where t0.a=t1.a; drop table t0,t1; + +--echo # +--echo # MDEV-21383: Possible range plan is not used under certain conditions +--echo # + +--disable_warnings +drop table if exists t10, t1000, t03; +--enable_warnings + +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t1000(a int); +insert into t1000 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; + +create table t03(a int); +insert into t03 values (0),(1),(2); + + +create table t1 ( + stationid int +); +insert into t1 select a from t10; + +CREATE TABLE t2 ( + stationId int, + startTime int, + filler char(100), + key1 int, + key2 int, + key(key1), + key(key2), + PRIMARY KEY (`stationId`,`startTime`) +); + +insert into t2 select + A.a, + B.a, + repeat('filler=data-', 4), + B.a, + 1 +from + t03 A, + t1000 B; +analyze table t2; + +create table t3(a int, filler char(100), key(a)); +insert into t3 select A.a+1000*B.a, 'filler-data' from t1000 A, t10 B; + +--echo # This should produce a join order of t1,t2,t3 +--echo # t2 should have type=range, key=PRIMARY key_len=8 (not type=ALL or key_len<8) +explain +SELECT * +FROM + t1,t2,t3 +WHERE + t2.startTime <= 100 and + t2.stationId = t1.stationId and + (t1.stationid = 1 or t1.stationid = 2 or t1.stationid = 3) and + key1 >0 and + t2.key2=t3.a; + +drop table t1,t2,t3; +drop table t1000,t10,t03; + diff -Nru mariadb-10.3-10.3.18/mysql-test/main/join_cache.result mariadb-10.3-10.3.22/mysql-test/main/join_cache.result --- mariadb-10.3-10.3.18/mysql-test/main/join_cache.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/join_cache.result 2020-01-26 18:37:27.000000000 +0000 @@ -6056,4 +6056,76 @@ f2 drop table t1, t2; set join_buffer_size=@save_join_buffer_size; +# +# MDEV-21243: Join buffer: condition is checked in wrong place for range access +# +create table t1(a int primary key); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int); +insert into t2 select A.a + 10*B.a from t1 A, t1 B; +create table t3 ( +kp1 int, +kp2 int, +col1 int, +col2 int, +key (kp1, kp2) +); +insert into t3 +select +A.a, +B.a, +A.a + 100*B.a, +A.a + 100*B.a +from +t2 A, t2 B; +analyze table t3; +Table Op Msg_type Msg_text +test.t3 analyze status Table is already up to date +# The following must have "B.col1 + 1 < 33333" attached to table B +# and not to the block-nl-join node: +explain format=json +select * +from t1 a, t3 b +where +b.kp1=a.a and +b.kp1 <= 10 and +b.kp2 <= 10 and +b.col1 +1 < 33333; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "a", + "access_type": "index", + "possible_keys": ["PRIMARY"], + "key": "PRIMARY", + "key_length": "4", + "used_key_parts": ["a"], + "rows": 10, + "filtered": 100, + "attached_condition": "a.a <= 10", + "using_index": true + }, + "block-nl-join": { + "table": { + "table_name": "b", + "access_type": "range", + "possible_keys": ["kp1"], + "key": "kp1", + "key_length": "10", + "used_key_parts": ["kp1", "kp2"], + "rows": 836, + "filtered": 11.962, + "index_condition": "b.kp2 <= 10", + "attached_condition": "b.kp2 <= 10 and b.col1 + 1 < 33333" + }, + "buffer_type": "flat", + "buffer_size": "256Kb", + "join_type": "BNL", + "attached_condition": "b.kp1 = a.a" + } + } +} +drop table t1,t2,t3; set @@optimizer_switch=@save_optimizer_switch; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/join_cache.test mariadb-10.3-10.3.22/mysql-test/main/join_cache.test --- mariadb-10.3-10.3.18/mysql-test/main/join_cache.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/join_cache.test 2020-01-26 18:37:27.000000000 +0000 @@ -4014,5 +4014,45 @@ drop table t1, t2; set join_buffer_size=@save_join_buffer_size; + +--echo # +--echo # MDEV-21243: Join buffer: condition is checked in wrong place for range access +--echo # +create table t1(a int primary key); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int); +insert into t2 select A.a + 10*B.a from t1 A, t1 B; + +create table t3 ( + kp1 int, + kp2 int, + col1 int, + col2 int, + key (kp1, kp2) +); + +insert into t3 +select + A.a, + B.a, + A.a + 100*B.a, + A.a + 100*B.a +from + t2 A, t2 B; +analyze table t3; + +--echo # The following must have "B.col1 + 1 < 33333" attached to table B +--echo # and not to the block-nl-join node: +explain format=json +select * +from t1 a, t3 b +where + b.kp1=a.a and + b.kp1 <= 10 and + b.kp2 <= 10 and + b.col1 +1 < 33333; + +drop table t1,t2,t3; + # The following command must be the last one in the file set @@optimizer_switch=@save_optimizer_switch; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/log_slow_debug.result mariadb-10.3-10.3.22/mysql-test/main/log_slow_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/log_slow_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/log_slow_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -6,6 +6,7 @@ FLUSH SLOW LOGS; SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.log_slow_admin_statements=ON; +SET @saved_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,simulate_slow_query"; CREATE PROCEDURE show_slow_log() BEGIN @@ -217,7 +218,7 @@ # # Clean up # -SET SESSION debug_dbug="-d,simulate_slow_query"; +SET SESSION debug_dbug=@saved_dbug; TRUNCATE mysql.slow_log; SET @@global.slow_query_log= @org_slow_query_log; SET @@global.log_output= @org_log_output; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/log_slow_debug.test mariadb-10.3-10.3.22/mysql-test/main/log_slow_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/log_slow_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/log_slow_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -9,6 +9,7 @@ FLUSH SLOW LOGS; SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.log_slow_admin_statements=ON; +SET @saved_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,simulate_slow_query"; DELIMITER $$; @@ -86,7 +87,7 @@ --echo # Clean up --echo # -SET SESSION debug_dbug="-d,simulate_slow_query"; +SET SESSION debug_dbug=@saved_dbug; TRUNCATE mysql.slow_log; SET @@global.slow_query_log= @org_slow_query_log; SET @@global.log_output= @org_log_output; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/mdev6830.result mariadb-10.3-10.3.22/mysql-test/main/mdev6830.result --- mariadb-10.3-10.3.18/mysql-test/main/mdev6830.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/mdev6830.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,3 +1,4 @@ +SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug= 'd,opt'; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t2 ( @@ -46,3 +47,4 @@ pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2 drop table t1,t2,t3,t4; drop view v2,v3; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/mdev6830.test mariadb-10.3-10.3.22/mysql-test/main/mdev6830.test --- mariadb-10.3-10.3.18/mysql-test/main/mdev6830.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/mdev6830.test 2020-01-26 18:37:27.000000000 +0000 @@ -2,7 +2,7 @@ # MDEV-6830 Server crashes in best_access_path after a sequence of SELECTs invollving a temptable view # --source include/have_debug.inc - +SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug= 'd,opt'; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; @@ -60,4 +60,4 @@ drop table t1,t2,t3,t4; drop view v2,v3; - +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/merge-big.result mariadb-10.3-10.3.22/mysql-test/main/merge-big.result --- mariadb-10.3-10.3.18/mysql-test/main/merge-big.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/merge-big.result 2020-01-26 18:37:27.000000000 +0000 @@ -7,7 +7,7 @@ CREATE TABLE t1 (c1 INT) ENGINE= MyISAM; LOCK TABLE t1 WRITE; connect con1,localhost,root,,; -SET @orig_debug=@@debug; +SET @orig_debug=@@global.debug_dbug; SET GLOBAL debug_dbug="+d,sleep_open_and_lock_after_open"; INSERT INTO t1 VALUES (1); connection default; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/merge-big.test mariadb-10.3-10.3.22/mysql-test/main/merge-big.test --- mariadb-10.3-10.3.18/mysql-test/main/merge-big.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/merge-big.test 2020-01-26 18:37:27.000000000 +0000 @@ -42,7 +42,7 @@ #SELECT NOW(); connect (con1,localhost,root,,); let $con1_id= `SELECT CONNECTION_ID()`; - SET @orig_debug=@@debug; + SET @orig_debug=@@global.debug_dbug; SET GLOBAL debug_dbug="+d,sleep_open_and_lock_after_open"; send INSERT INTO t1 VALUES (1); connection default; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/merge_debug.result mariadb-10.3-10.3.22/mysql-test/main/merge_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/merge_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/merge_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -3,7 +3,7 @@ set session storage_engine=myisam; call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair it"); drop table if exists crashed,t2,t3,t4; -SET @orig_debug=@@debug; +SET @orig_debug=@@global.debug_dbug; CREATE TABLE crashed (c1 INT); CREATE TABLE t2 (c1 INT); CREATE TABLE t3 (c1 INT); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/merge_debug.test mariadb-10.3-10.3.22/mysql-test/main/merge_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/merge_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/merge_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -14,7 +14,7 @@ drop table if exists crashed,t2,t3,t4; --enable_warnings -SET @orig_debug=@@debug; +SET @orig_debug=@@global.debug_dbug; # # Check that MariaDB handles reopen that fails without crashing diff -Nru mariadb-10.3-10.3.18/mysql-test/main/metadata.result mariadb-10.3-10.3.22/mysql-test/main/metadata.result --- mariadb-10.3-10.3.18/mysql-test/main/metadata.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/metadata.result 2020-01-26 18:37:27.000000000 +0000 @@ -647,17 +647,17 @@ 1111111111 MOD 1, 11111111111 MOD 1 LIMIT 0; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def 1 MOD 1 3 1 0 Y 32896 0 63 -def 11 MOD 1 3 2 0 Y 32896 0 63 -def 111 MOD 1 3 3 0 Y 32896 0 63 -def 1111 MOD 1 3 4 0 Y 32896 0 63 -def 11111 MOD 1 3 5 0 Y 32896 0 63 -def 111111 MOD 1 3 6 0 Y 32896 0 63 -def 1111111 MOD 1 3 7 0 Y 32896 0 63 -def 11111111 MOD 1 3 8 0 Y 32896 0 63 -def 111111111 MOD 1 3 9 0 Y 32896 0 63 -def 1111111111 MOD 1 8 10 0 Y 32896 0 63 -def 11111111111 MOD 1 8 11 0 Y 32896 0 63 +def 1 MOD 1 3 2 0 Y 32896 0 63 +def 11 MOD 1 3 3 0 Y 32896 0 63 +def 111 MOD 1 3 4 0 Y 32896 0 63 +def 1111 MOD 1 3 5 0 Y 32896 0 63 +def 11111 MOD 1 3 6 0 Y 32896 0 63 +def 111111 MOD 1 3 7 0 Y 32896 0 63 +def 1111111 MOD 1 3 8 0 Y 32896 0 63 +def 11111111 MOD 1 3 9 0 Y 32896 0 63 +def 111111111 MOD 1 8 10 0 Y 32896 0 63 +def 1111111111 MOD 1 8 11 0 Y 32896 0 63 +def 11111111111 MOD 1 8 12 0 Y 32896 0 63 1 MOD 1 11 MOD 1 111 MOD 1 1111 MOD 1 11111 MOD 1 111111 MOD 1 1111111 MOD 1 11111111 MOD 1 111111111 MOD 1 1111111111 MOD 1 11111111111 MOD 1 SELECT -(1), diff -Nru mariadb-10.3-10.3.18/mysql-test/main/myisam.result mariadb-10.3-10.3.22/mysql-test/main/myisam.result --- mariadb-10.3-10.3.18/mysql-test/main/myisam.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/myisam.result 2020-01-26 18:37:27.000000000 +0000 @@ -2670,3 +2670,26 @@ select @@global.myisam_block_size; @@global.myisam_block_size 1024 +# +# MDEV-20704 An index on a double column erroneously uses prefix compression +# +CREATE TABLE t1 ( +id INT NOT NULL PRIMARY KEY, +d DOUBLE, +KEY (d) +) ENGINE=MyISAM; + +MyISAM file: MYSQLD_DATADIR/test/t1 +Record format: Fixed length +Character set: latin1_swedish_ci (8) +Data records: 0 Deleted blocks: 0 +Recordlength: 13 + +table description: +Key Start Len Index Type +1 2 4 unique long +2 6 8 multip. double NULL +DROP TABLE t1; +# +# End of 5.5 tests +# diff -Nru mariadb-10.3-10.3.18/mysql-test/main/myisam.test mariadb-10.3-10.3.22/mysql-test/main/myisam.test --- mariadb-10.3-10.3.18/mysql-test/main/myisam.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/myisam.test 2020-01-26 18:37:27.000000000 +0000 @@ -1802,3 +1802,22 @@ # show variables like 'myisam_block_size'; select @@global.myisam_block_size; + + +--echo # +--echo # MDEV-20704 An index on a double column erroneously uses prefix compression +--echo # + +CREATE TABLE t1 ( + id INT NOT NULL PRIMARY KEY, + d DOUBLE, + KEY (d) +) ENGINE=MyISAM; +let $MYSQLD_DATADIR= `select @@datadir`; +--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR +--exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1 +DROP TABLE t1; + +--echo # +--echo # End of 5.5 tests +--echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/myisam_debug.result mariadb-10.3-10.3.22/mysql-test/main/myisam_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/myisam_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/myisam_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -34,10 +34,10 @@ lock tables t1 write; insert t1 values (1),(2),(1); set @old_dbug=@@debug_dbug; -set debug_dbug='+d,mi_lock_database_failure'; +SET debug_dbug='+d,mi_lock_database_failure'; unlock tables; Warnings: Error 126 Index for table './test/t1.MYI' is corrupt; try to repair it Error 1030 Got error 22 "Invalid argument" from storage engine MyISAM -set debug_dbug=@old_dbug; +SET debug_dbug=@old_dbug; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/myisam_debug.test mariadb-10.3-10.3.22/mysql-test/main/myisam_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/myisam_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/myisam_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -66,7 +66,7 @@ lock tables t1 write; insert t1 values (1),(2),(1); set @old_dbug=@@debug_dbug; -set debug_dbug='+d,mi_lock_database_failure'; +SET debug_dbug='+d,mi_lock_database_failure'; unlock tables; -set debug_dbug=@old_dbug; +SET debug_dbug=@old_dbug; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/mysql_tzinfo_to_sql_symlink.result mariadb-10.3-10.3.22/mysql-test/main/mysql_tzinfo_to_sql_symlink.result --- mariadb-10.3-10.3.18/mysql-test/main/mysql_tzinfo_to_sql_symlink.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/mysql_tzinfo_to_sql_symlink.result 2020-01-26 18:37:27.000000000 +0000 @@ -4,7 +4,7 @@ # Verbose run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -36,7 +36,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -46,7 +46,7 @@ # Silent run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -75,7 +75,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -93,7 +93,7 @@ ; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -105,21 +105,21 @@ # \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=InnoDB; END IF| \d ; TRUNCATE TABLE time_zone_leap_second; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=MyISAM; END IF| \d ; ALTER TABLE time_zone_leap_second ORDER BY Transition_time; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -131,7 +131,7 @@ # \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -146,7 +146,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/mysqld--help.result mariadb-10.3-10.3.22/mysql-test/main/mysqld--help.result --- mariadb-10.3-10.3.18/mysql-test/main/mysqld--help.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/mysqld--help.result 2020-01-26 18:37:27.000000000 +0000 @@ -1069,7 +1069,7 @@ disable; STATE to track just transaction state (Is there an active transaction? Does it have any data? etc.); CHARACTERISTICS to track transaction state and report all - statements needed to start a transaction withthe same + statements needed to start a transaction with the same characteristics (isolation level, read only/read write,snapshot - but not any work done / data modified within the transaction). @@ -1717,5 +1717,5 @@ verbose TRUE wait-timeout 28800 -To see what values a running MySQL server is using, type +To see what variables a running MySQL server is using, type 'mysqladmin variables' instead of 'mysqld --verbose --help'. diff -Nru mariadb-10.3-10.3.18/mysql-test/main/opt_tvc.result mariadb-10.3-10.3.22/mysql-test/main/opt_tvc.result --- mariadb-10.3-10.3.18/mysql-test/main/opt_tvc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/opt_tvc.result 2020-01-26 18:37:27.000000000 +0000 @@ -629,11 +629,9 @@ i EXPLAIN EXTENDED SELECT * FROM t1 WHERE i IN (NULL, NULL, NULL, NULL, NULL); id select_type table type possible_keys key key_len ref rows filtered Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 -1 PRIMARY ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join) -3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: -Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i` from `test`.`t1` semi join ((values (NULL),(NULL),(NULL),(NULL),(NULL)) `tvc_0`) where `test`.`t1`.`i` = `tvc_0`.`_col_1` +Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` in (NULL,NULL,NULL,NULL,NULL) SET in_predicate_conversion_threshold= default; DROP TABLE t1; # @@ -687,3 +685,50 @@ 1 1 DROP TABLE t1,t2,t3; SET @@in_predicate_conversion_threshold= default; +# +# MDEV-20900: IN predicate to IN subquery conversion causes performance regression +# +create table t1(a int, b int); +insert into t1 select seq-1, seq-1 from seq_1_to_10; +set in_predicate_conversion_threshold=2; +explain select * from t1 where t1.a IN ("1","2","3","4"); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +select * from t1 where t1.a IN ("1","2","3","4"); +a b +1 1 +2 2 +3 3 +4 4 +set in_predicate_conversion_threshold=0; +explain select * from t1 where t1.a IN ("1","2","3","4"); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +select * from t1 where t1.a IN ("1","2","3","4"); +a b +1 1 +2 2 +3 3 +4 4 +set in_predicate_conversion_threshold=2; +explain select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4)); +a b +1 1 +2 2 +3 3 +4 4 +set in_predicate_conversion_threshold=0; +explain select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4)); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where +select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4)); +a b +1 1 +2 2 +3 3 +4 4 +drop table t1; +SET @@in_predicate_conversion_threshold= default; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/opt_tvc.test mariadb-10.3-10.3.22/mysql-test/main/opt_tvc.test --- mariadb-10.3-10.3.18/mysql-test/main/opt_tvc.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/opt_tvc.test 2020-01-26 18:37:27.000000000 +0000 @@ -3,6 +3,7 @@ # source include/have_debug.inc; source include/default_optimizer_switch.inc; +source include/have_sequence.inc; create table t1 (a int, b int); @@ -397,3 +398,33 @@ DROP TABLE t1,t2,t3; SET @@in_predicate_conversion_threshold= default; + +--echo # +--echo # MDEV-20900: IN predicate to IN subquery conversion causes performance regression +--echo # + +create table t1(a int, b int); +insert into t1 select seq-1, seq-1 from seq_1_to_10; + +set in_predicate_conversion_threshold=2; + +let $query= select * from t1 where t1.a IN ("1","2","3","4"); +eval explain $query; +eval $query; + +set in_predicate_conversion_threshold=0; +eval explain $query; +eval $query; + +set in_predicate_conversion_threshold=2; +let $query= select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4)); +eval explain $query; +eval $query; + +set in_predicate_conversion_threshold=0; +eval explain $query; +eval $query; + +drop table t1; +SET @@in_predicate_conversion_threshold= default; + diff -Nru mariadb-10.3-10.3.18/mysql-test/main/order_by.result mariadb-10.3-10.3.22/mysql-test/main/order_by.result --- mariadb-10.3-10.3.18/mysql-test/main/order_by.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/order_by.result 2020-01-26 18:37:27.000000000 +0000 @@ -3206,6 +3206,36 @@ 3 DROP TABLE t1; # +# MDEV-21044: Wrong result when using a smaller size for sort buffer +# +create table t1(a varchar(765),b int); +insert into t1 values ("a",1),("b",2),("c",3),("e",4); +insert into t1 values ("d",5),("f",6),("g",7),("h",8); +insert into t1 values ("k",11),("l",12),("i",9),("j",10); +insert into t1 values ("m",13),("n",14),("o",15),("p",16); +set @save_sort_buffer_size= @@sort_buffer_size; +set sort_buffer_size=1024; +select * from t1 order by b; +a b +a 1 +b 2 +c 3 +e 4 +d 5 +f 6 +g 7 +h 8 +i 9 +j 10 +k 11 +l 12 +m 13 +n 14 +o 15 +p 16 +set @@sort_buffer_size= @save_sort_buffer_size; +drop table t1; +# # MDEV-13994: Bad join results with orderby_uses_equalities=on # CREATE TABLE books ( diff -Nru mariadb-10.3-10.3.18/mysql-test/main/order_by.test mariadb-10.3-10.3.22/mysql-test/main/order_by.test --- mariadb-10.3-10.3.18/mysql-test/main/order_by.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/order_by.test 2020-01-26 18:37:27.000000000 +0000 @@ -2146,6 +2146,22 @@ DROP TABLE t1; --echo # +--echo # MDEV-21044: Wrong result when using a smaller size for sort buffer +--echo # + +create table t1(a varchar(765),b int); +insert into t1 values ("a",1),("b",2),("c",3),("e",4); +insert into t1 values ("d",5),("f",6),("g",7),("h",8); +insert into t1 values ("k",11),("l",12),("i",9),("j",10); +insert into t1 values ("m",13),("n",14),("o",15),("p",16); +set @save_sort_buffer_size= @@sort_buffer_size; +set sort_buffer_size=1024; +select * from t1 order by b; +set @@sort_buffer_size= @save_sort_buffer_size; +drop table t1; + + +--echo # --echo # MDEV-13994: Bad join results with orderby_uses_equalities=on --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/order_by_innodb.result mariadb-10.3-10.3.22/mysql-test/main/order_by_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/order_by_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/order_by_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -49,6 +49,32 @@ 1 SIMPLE t1 index_merge key1,key2 key1,key2 5,5 NULL # Using sort_union(key1,key2); Using where drop table t0, t1; # +# MDEV-18094: Query with order by limit picking index scan over filesort +# +create table t0 (a int); +INSERT INTO t0 VALUES (0),(0),(0),(0),(2),(0),(0),(1),(1),(0); +CREATE TABLE t1 ( +a int(11), +b int(11), +c int(11), +KEY a_c (a,c), +KEY a_b (a,b) +) ENGINE=InnoDB; +insert into t1 select A.a , B.a, C.a from t0 A, t0 B, t0 C; +# should use ref access +explain select a,b,c from t1 where a=1 and c=2 order by b; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref a_c,a_b a_c 10 const,const 20 Using where; Using filesort +# both should use range access +explain select a,b,c from t1 where a=1 and c=2 order by b limit 1000; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a_c,a_b a_b 5 NULL 200 Using where +explain select a,b,c from t1 where a=1 and c=2 order by b limit 2000; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a_c,a_b a_b 5 NULL 200 Using where +drop table t1,t0; +# Start of 10.2 tests +# # MDEV-14071: wrong results with orderby_uses_equalities=on # (duplicate of MDEV-13994) # @@ -121,3 +147,4 @@ 656 eight set optimizer_switch= @save_optimizer_switch; DROP TABLE t1,t2,t3; +# End of 10.2 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/order_by_innodb.test mariadb-10.3-10.3.22/mysql-test/main/order_by_innodb.test --- mariadb-10.3-10.3.18/mysql-test/main/order_by_innodb.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/order_by_innodb.test 2020-01-26 18:37:27.000000000 +0000 @@ -63,6 +63,32 @@ drop table t0, t1; --echo # +--echo # MDEV-18094: Query with order by limit picking index scan over filesort +--echo # + +create table t0 (a int); +INSERT INTO t0 VALUES (0),(0),(0),(0),(2),(0),(0),(1),(1),(0); + +CREATE TABLE t1 ( +a int(11), +b int(11), +c int(11), +KEY a_c (a,c), +KEY a_b (a,b) +) ENGINE=InnoDB; +insert into t1 select A.a , B.a, C.a from t0 A, t0 B, t0 C; + +--echo # should use ref access +explain select a,b,c from t1 where a=1 and c=2 order by b; + +--echo # both should use range access +explain select a,b,c from t1 where a=1 and c=2 order by b limit 1000; +explain select a,b,c from t1 where a=1 and c=2 order by b limit 2000; +drop table t1,t0; + +--echo # Start of 10.2 tests + +--echo # --echo # MDEV-14071: wrong results with orderby_uses_equalities=on --echo # (duplicate of MDEV-13994) --echo # @@ -108,3 +134,5 @@ set optimizer_switch= @save_optimizer_switch; DROP TABLE t1,t2,t3; + +--echo # End of 10.2 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_debug_sync.result mariadb-10.3-10.3.22/mysql-test/main/partition_debug_sync.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_debug_sync.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_debug_sync.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1, t2; SET DEBUG_SYNC= 'RESET'; # # Bug#42438: Crash ha_partition::change_table_ptr diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_debug_sync.test mariadb-10.3-10.3.22/mysql-test/main/partition_debug_sync.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_debug_sync.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_debug_sync.test 2020-01-26 18:37:27.000000000 +0000 @@ -8,10 +8,7 @@ --source include/have_debug.inc --source include/have_innodb.inc ---disable_warnings -DROP TABLE IF EXISTS t1, t2; SET DEBUG_SYNC= 'RESET'; ---enable_warnings --echo # --echo # Bug#42438: Crash ha_partition::change_table_ptr diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_innodb.result mariadb-10.3-10.3.22/mysql-test/main/partition_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -1028,5 +1028,29 @@ 2 DROP TABLE t1; # +# MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val +# +CREATE TABLE t1 (a INT) +ENGINE=InnoDB +PARTITION BY RANGE (a) ( +PARTITION p0 VALUES LESS THAN (6), +PARTITION pn VALUES LESS THAN MAXVALUE +); +INSERT INTO t1 VALUES (4),(5),(6); +ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY; +UPDATE t1 PARTITION (p0) SET a = 3 WHERE a = 5; +INSERT INTO t1 PARTITION(p0) VALUES (); +ERROR HY000: Found a row not matching the given partition set +INSERT INTO t1 PARTITION(p0) VALUES (-1); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +a +-1 +1 +3 +4 +6 +DROP TABLE t1; +# # End of 10.3 tests # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_innodb.test mariadb-10.3-10.3.22/mysql-test/main/partition_innodb.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_innodb.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_innodb.test 2020-01-26 18:37:27.000000000 +0000 @@ -1106,5 +1106,25 @@ DROP TABLE t1; --echo # +--echo # MDEV-18244 Server crashes in ha_innobase::update_thd / ... / ha_partition::update_next_auto_inc_val +--echo # + +CREATE TABLE t1 (a INT) + ENGINE=InnoDB + PARTITION BY RANGE (a) ( + PARTITION p0 VALUES LESS THAN (6), + PARTITION pn VALUES LESS THAN MAXVALUE + ); +INSERT INTO t1 VALUES (4),(5),(6); +ALTER TABLE t1 MODIFY a INT AUTO_INCREMENT PRIMARY KEY; +UPDATE t1 PARTITION (p0) SET a = 3 WHERE a = 5; +--error ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET +INSERT INTO t1 PARTITION(p0) VALUES (); +INSERT INTO t1 PARTITION(p0) VALUES (-1); +INSERT INTO t1 VALUES (); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # --echo # End of 10.3 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_aria.result mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_aria.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_aria.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_aria.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,79 @@ +drop table if exists t1,t3; +# +# MDEV-20611: MRR scan over partitioned InnoDB table produces "Out of memory" error +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +set @tmp=@@storage_engine; +set storage_engine=Aria; +create table t3 ( +ID bigint(20) NOT NULL AUTO_INCREMENT, +part_id int, +key_col int, +col2 int, +key(key_col), +PRIMARY KEY (ID,part_id) +) PARTITION BY RANGE (part_id) +(PARTITION p1 VALUES LESS THAN (3), +PARTITION p2 VALUES LESS THAN (7), +PARTITION p3 VALUES LESS THAN (10) +); +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `part_id` int(11) NOT NULL, + `key_col` int(11) DEFAULT NULL, + `col2` int(11) DEFAULT NULL, + PRIMARY KEY (`ID`,`part_id`), + KEY `key_col` (`key_col`) +) ENGINE=Aria DEFAULT CHARSET=latin1 + PARTITION BY RANGE (`part_id`) +(PARTITION `p1` VALUES LESS THAN (3) ENGINE = Aria, + PARTITION `p2` VALUES LESS THAN (7) ENGINE = Aria, + PARTITION `p3` VALUES LESS THAN (10) ENGINE = Aria) +set storage_engine= @tmp; +insert into t3 select +A.a+10*B.a, +A.a, +B.a, +123456 +from t1 A, t1 B; +set optimizer_switch='mrr=on'; +explain +select * from t3 force index (key_col) where key_col < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range key_col key_col 5 NULL # Using where; Rowid-ordered scan +select * from t3 force index (key_col) where key_col < 3; +ID part_id key_col col2 +1 0 0 123456 +1 1 0 123456 +2 2 0 123456 +10 0 1 123456 +11 1 1 123456 +12 2 1 123456 +20 0 2 123456 +21 1 2 123456 +22 2 2 123456 +3 3 0 123456 +4 4 0 123456 +5 5 0 123456 +6 6 0 123456 +13 3 1 123456 +14 4 1 123456 +15 5 1 123456 +16 6 1 123456 +23 3 2 123456 +24 4 2 123456 +25 5 2 123456 +26 6 2 123456 +7 7 0 123456 +8 8 0 123456 +9 9 0 123456 +17 7 1 123456 +18 8 1 123456 +19 9 1 123456 +27 7 2 123456 +28 8 2 123456 +29 9 2 123456 +drop table t1,t3; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_aria.test mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_aria.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_aria.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_aria.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,2 @@ +let $engine_type= Aria; +--source include/partition_mrr.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_innodb.result mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_innodb.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,79 @@ +drop table if exists t1,t3; +# +# MDEV-20611: MRR scan over partitioned InnoDB table produces "Out of memory" error +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +set @tmp=@@storage_engine; +set storage_engine=InnoDB; +create table t3 ( +ID bigint(20) NOT NULL AUTO_INCREMENT, +part_id int, +key_col int, +col2 int, +key(key_col), +PRIMARY KEY (ID,part_id) +) PARTITION BY RANGE (part_id) +(PARTITION p1 VALUES LESS THAN (3), +PARTITION p2 VALUES LESS THAN (7), +PARTITION p3 VALUES LESS THAN (10) +); +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `part_id` int(11) NOT NULL, + `key_col` int(11) DEFAULT NULL, + `col2` int(11) DEFAULT NULL, + PRIMARY KEY (`ID`,`part_id`), + KEY `key_col` (`key_col`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY RANGE (`part_id`) +(PARTITION `p1` VALUES LESS THAN (3) ENGINE = InnoDB, + PARTITION `p2` VALUES LESS THAN (7) ENGINE = InnoDB, + PARTITION `p3` VALUES LESS THAN (10) ENGINE = InnoDB) +set storage_engine= @tmp; +insert into t3 select +A.a+10*B.a, +A.a, +B.a, +123456 +from t1 A, t1 B; +set optimizer_switch='mrr=on'; +explain +select * from t3 force index (key_col) where key_col < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range key_col key_col 5 NULL # Using where; Rowid-ordered scan +select * from t3 force index (key_col) where key_col < 3; +ID part_id key_col col2 +1 0 0 123456 +1 1 0 123456 +2 2 0 123456 +10 0 1 123456 +11 1 1 123456 +12 2 1 123456 +20 0 2 123456 +21 1 2 123456 +22 2 2 123456 +3 3 0 123456 +4 4 0 123456 +5 5 0 123456 +6 6 0 123456 +13 3 1 123456 +14 4 1 123456 +15 5 1 123456 +16 6 1 123456 +23 3 2 123456 +24 4 2 123456 +25 5 2 123456 +26 6 2 123456 +7 7 0 123456 +8 8 0 123456 +9 9 0 123456 +17 7 1 123456 +18 8 1 123456 +19 9 1 123456 +27 7 2 123456 +28 8 2 123456 +29 9 2 123456 +drop table t1,t3; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_innodb.test mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_innodb.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_innodb.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_innodb.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,4 @@ +--source include/have_innodb.inc +let $engine_type= InnoDB; + +--source include/partition_mrr.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_myisam.result mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_myisam.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_myisam.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_myisam.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,79 @@ +drop table if exists t1,t3; +# +# MDEV-20611: MRR scan over partitioned InnoDB table produces "Out of memory" error +# +create table t1(a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +set @tmp=@@storage_engine; +set storage_engine=myisam; +create table t3 ( +ID bigint(20) NOT NULL AUTO_INCREMENT, +part_id int, +key_col int, +col2 int, +key(key_col), +PRIMARY KEY (ID,part_id) +) PARTITION BY RANGE (part_id) +(PARTITION p1 VALUES LESS THAN (3), +PARTITION p2 VALUES LESS THAN (7), +PARTITION p3 VALUES LESS THAN (10) +); +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `ID` bigint(20) NOT NULL AUTO_INCREMENT, + `part_id` int(11) NOT NULL, + `key_col` int(11) DEFAULT NULL, + `col2` int(11) DEFAULT NULL, + PRIMARY KEY (`ID`,`part_id`), + KEY `key_col` (`key_col`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + PARTITION BY RANGE (`part_id`) +(PARTITION `p1` VALUES LESS THAN (3) ENGINE = MyISAM, + PARTITION `p2` VALUES LESS THAN (7) ENGINE = MyISAM, + PARTITION `p3` VALUES LESS THAN (10) ENGINE = MyISAM) +set storage_engine= @tmp; +insert into t3 select +A.a+10*B.a, +A.a, +B.a, +123456 +from t1 A, t1 B; +set optimizer_switch='mrr=on'; +explain +select * from t3 force index (key_col) where key_col < 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t3 range key_col key_col 5 NULL # Using where; Rowid-ordered scan +select * from t3 force index (key_col) where key_col < 3; +ID part_id key_col col2 +1 0 0 123456 +1 1 0 123456 +2 2 0 123456 +10 0 1 123456 +11 1 1 123456 +12 2 1 123456 +20 0 2 123456 +21 1 2 123456 +22 2 2 123456 +3 3 0 123456 +4 4 0 123456 +5 5 0 123456 +6 6 0 123456 +13 3 1 123456 +14 4 1 123456 +15 5 1 123456 +16 6 1 123456 +23 3 2 123456 +24 4 2 123456 +25 5 2 123456 +26 6 2 123456 +7 7 0 123456 +8 8 0 123456 +9 9 0 123456 +17 7 1 123456 +18 8 1 123456 +19 9 1 123456 +27 7 2 123456 +28 8 2 123456 +29 9 2 123456 +drop table t1,t3; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_myisam.test mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_myisam.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_mrr_myisam.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_mrr_myisam.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,3 @@ +let $engine_type= myisam; + +--source include/partition_mrr.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_pruning.result mariadb-10.3-10.3.22/mysql-test/main/partition_pruning.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_pruning.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_pruning.result 2020-01-26 18:37:27.000000000 +0000 @@ -3485,6 +3485,16 @@ 1 a b 1 drop table t1; # +# MDEV-14667 Assertion `used_parts > 0' failed in ha_partition::init_record_priority_queue. +# +create table t1 (a int); +insert into t1 values (1),(2); +create table t2 (b int, c int, key(c,b)) partition by hash(b) partitions 2; +insert into t2 values (3,4),(5,6); +select straight_join * from t1, t2 where b != NULL; +a b c +drop table t1, t2; +# # MDEV-17493: Partition pruning doesn't work for nested outer joins # create table t0(a int); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_pruning.test mariadb-10.3-10.3.22/mysql-test/main/partition_pruning.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_pruning.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_pruning.test 2020-01-26 18:37:27.000000000 +0000 @@ -1537,6 +1537,19 @@ drop table t1; --echo # +--echo # MDEV-14667 Assertion `used_parts > 0' failed in ha_partition::init_record_priority_queue. +--echo # + +create table t1 (a int); +insert into t1 values (1),(2); + +create table t2 (b int, c int, key(c,b)) partition by hash(b) partitions 2; +insert into t2 values (3,4),(5,6); + +select straight_join * from t1, t2 where b != NULL; +drop table t1, t2; + +--echo # --echo # MDEV-17493: Partition pruning doesn't work for nested outer joins --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_ucs2.result mariadb-10.3-10.3.22/mysql-test/main/partition_ucs2.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_ucs2.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_ucs2.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,13 @@ +# +# Start of 10.3 tests +# +# +# MDEV-20855 Crash with PARTITION BY LIST and extended characters +# +SET NAMES utf8; +CREATE OR REPLACE TABLE t1 (a TIME) +PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_ucs2 0x0411)); +ERROR HY000: This partition function is not allowed +# +# End of 10.3 tests +# diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_ucs2.test mariadb-10.3-10.3.22/mysql-test/main/partition_ucs2.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_ucs2.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_ucs2.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,19 @@ +--source include/have_partition.inc +--source include/have_ucs2.inc + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-20855 Crash with PARTITION BY LIST and extended characters +--echo # + +SET NAMES utf8; +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +CREATE OR REPLACE TABLE t1 (a TIME) + PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN (_ucs2 0x0411)); + +--echo # +--echo # End of 10.3 tests +--echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_utf8.result mariadb-10.3-10.3.22/mysql-test/main/partition_utf8.result --- mariadb-10.3-10.3.18/mysql-test/main/partition_utf8.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_utf8.result 2020-01-26 18:37:27.000000000 +0000 @@ -51,3 +51,19 @@ insert into t1 values (''); insert into t1 values (_ucs2 0x2020); drop table t1; +# +# Start of 10.3 tests +# +# +# MDEV-20855 Crash with PARTITION BY LIST and extended characters +# +SET NAMES utf8; +CREATE OR REPLACE TABLE t1 (a CHAR(10)) CHARACTER SET latin1 +PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б')); +ERROR HY000: This partition function is not allowed +CREATE OR REPLACE TABLE t1 (a TIME) +PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б')); +ERROR HY000: This partition function is not allowed +# +# End of 10.3 tests +# diff -Nru mariadb-10.3-10.3.18/mysql-test/main/partition_utf8.test mariadb-10.3-10.3.22/mysql-test/main/partition_utf8.test --- mariadb-10.3-10.3.18/mysql-test/main/partition_utf8.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/partition_utf8.test 2020-01-26 18:37:27.000000000 +0000 @@ -40,3 +40,25 @@ insert into t1 values (''); insert into t1 values (_ucs2 0x2020); drop table t1; + +--echo # +--echo # Start of 10.3 tests +--echo # + +--echo # +--echo # MDEV-20855 Crash with PARTITION BY LIST and extended characters +--echo # + +SET NAMES utf8; + +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +CREATE OR REPLACE TABLE t1 (a CHAR(10)) CHARACTER SET latin1 + PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б')); + +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +CREATE OR REPLACE TABLE t1 (a TIME) + PARTITION BY LIST COLUMNS (a) (PARTITION p0 VALUES IN ('Б')); + +--echo # +--echo # End of 10.3 tests +--echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/processlist.result mariadb-10.3-10.3.22/mysql-test/main/processlist.result --- mariadb-10.3-10.3.18/mysql-test/main/processlist.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/processlist.result 2020-01-26 18:37:27.000000000 +0000 @@ -23,8 +23,9 @@ command time < 5 Sleep 1 disconnect con1; -set debug_sync='reset'; connection default; +set debug_sync='reset'; +End of 5.5 tests # # 10.1 tests # @@ -36,10 +37,6 @@ INFO SELECT INFO, INFO_BINARY, 'xxx????yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%' INFO_BINARY SELECT INFO, INFO_BINARY, 'xxx😎yyy' AS utf8mb4_string FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO LIKE '%xxx%yyy%' utf8mb4_string xxx😎yyy -Warnings: -Level Warning -Code 1366 -Message Incorrect string value: '\xF0\x9F\x98\x8Eyy...' for column `information_schema`.`(temporary)`.`INFO` at row 1 # # End of 10.1 tests # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/processlist.test mariadb-10.3-10.3.22/mysql-test/main/processlist.test --- mariadb-10.3-10.3.18/mysql-test/main/processlist.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/processlist.test 2020-01-26 18:37:27.000000000 +0000 @@ -49,10 +49,10 @@ select command, time < 5 from information_schema.processlist where id != connection_id(); disconnect con1; -set debug_sync='reset'; - connection default; +set debug_sync='reset'; +--echo End of 5.5 tests --echo # --echo # 10.1 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/processlist_notembedded.result mariadb-10.3-10.3.22/mysql-test/main/processlist_notembedded.result --- mariadb-10.3-10.3.18/mysql-test/main/processlist_notembedded.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/processlist_notembedded.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,12 @@ +# +# MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes +# +connect con1,localhost,root,,; +connection con1; +SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; +connection default; +SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; +FOUND 1 /sleep \(30\)/ in MDEV-20466.text +disconnect con1; +SET DEBUG_SYNC = 'RESET'; +End of 5.5 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/processlist_notembedded.test mariadb-10.3-10.3.22/mysql-test/main/processlist_notembedded.test --- mariadb-10.3-10.3.18/mysql-test/main/processlist_notembedded.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/processlist_notembedded.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,34 @@ +source include/have_debug.inc; +source include/have_debug_sync.inc; +source include/not_embedded.inc; + +--echo # +--echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes +--echo # + +connect (con1,localhost,root,,); + +connection con1; + +let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`; + +SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; +--disable_query_log +--send_eval $q; +--enable_query_log +connection default; + +SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; + +exec $MYSQL test -e "SHOW PROCESSLIST" > $MYSQLTEST_VARDIR/tmp/MDEV-20466.text; + +let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-20466.text; +let SEARCH_PATTERN=sleep \(30\); +source include/search_pattern_in_file.inc; +remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20466.text; + +disconnect con1; + +SET DEBUG_SYNC = 'RESET'; + +--echo End of 5.5 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range.result mariadb-10.3-10.3.22/mysql-test/main/range.result --- mariadb-10.3-10.3.18/mysql-test/main/range.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range.result 2020-01-26 18:37:27.000000000 +0000 @@ -2056,23 +2056,15 @@ SELECT * FROM t1 WHERE fd='ðŸ˜'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 SELECT * FROM t1 WHERE fd='ðŸ˜'; id fd -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 # The following must not use range access: explain select count(*) from t1 where fd <'ðŸ˜'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 select count(*) from t1 where fd <'ðŸ˜'; count(*) 40960 -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 select count(*) from t1 ignore index (ix_fd) where fd <'ðŸ˜'; count(*) 40960 @@ -2293,8 +2285,6 @@ EXPLAIN SELECT * FROM t1 WHERE a<=>'😎'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 1 DROP TABLE t1; # # MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_innodb.result mariadb-10.3-10.3.22/mysql-test/main/range_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/range_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -70,6 +70,7 @@ insert into t1 select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a from t0 A, t0 B, t0 C, t0 D where D.a<5; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,ha_index_init_fail"; explain select * from t1 where a=10 and b=10; id select_type table type possible_keys key key_len ref rows Extra @@ -77,5 +78,5 @@ select * from t1 where a=10 and b=10; ERROR HY000: Table definition has changed, please retry transaction DROP TABLE t0,t1; -set @@global.debug_dbug="-d"; +SET @@GLOBAL.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_innodb.test mariadb-10.3-10.3.22/mysql-test/main/range_innodb.test --- mariadb-10.3-10.3.18/mysql-test/main/range_innodb.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_innodb.test 2020-01-26 18:37:27.000000000 +0000 @@ -80,10 +80,11 @@ insert into t1 select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a from t0 A, t0 B, t0 C, t0 D where D.a<5; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,ha_index_init_fail"; explain select * from t1 where a=10 and b=10; --error ER_TABLE_DEF_CHANGED select * from t1 where a=10 and b=10; DROP TABLE t0,t1; -set @@global.debug_dbug="-d"; +SET @@GLOBAL.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_interrupted-13751.result mariadb-10.3-10.3.22/mysql-test/main/range_interrupted-13751.result --- mariadb-10.3-10.3.18/mysql-test/main/range_interrupted-13751.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_interrupted-13751.result 2020-01-26 18:37:27.000000000 +0000 @@ -7,10 +7,10 @@ INSERT INTO t1 (c) SELECT c FROM t1; INSERT INTO t1 (c) SELECT c FROM t1; set @old_dbug=@@session.debug_dbug; -set debug_dbug="+d,kill_join_init_read_record"; +SET debug_dbug="+d,kill_join_init_read_record"; SELECT 1 FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 WHERE alias1.c = alias2.c OR alias1.i <= 1 ; ERROR 70100: Query execution was interrupted -set debug_dbug=@old_dbug; +SET debug_dbug=@old_dbug; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_interrupted-13751.test mariadb-10.3-10.3.22/mysql-test/main/range_interrupted-13751.test --- mariadb-10.3-10.3.18/mysql-test/main/range_interrupted-13751.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_interrupted-13751.test 2020-01-26 18:37:27.000000000 +0000 @@ -14,14 +14,14 @@ INSERT INTO t1 (c) SELECT c FROM t1; set @old_dbug=@@session.debug_dbug; -set debug_dbug="+d,kill_join_init_read_record"; +SET debug_dbug="+d,kill_join_init_read_record"; --error ER_QUERY_INTERRUPTED SELECT 1 FROM t1 AS alias1, t1 AS alias2, t1 AS alias3 WHERE alias1.c = alias2.c OR alias1.i <= 1 ; -set debug_dbug=@old_dbug; +SET debug_dbug=@old_dbug; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_mrr_icp.result mariadb-10.3-10.3.22/mysql-test/main/range_mrr_icp.result --- mariadb-10.3-10.3.18/mysql-test/main/range_mrr_icp.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_mrr_icp.result 2020-01-26 18:37:27.000000000 +0000 @@ -2058,23 +2058,15 @@ SELECT * FROM t1 WHERE fd='ðŸ˜'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 SELECT * FROM t1 WHERE fd='ðŸ˜'; id fd -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 # The following must not use range access: explain select count(*) from t1 where fd <'ðŸ˜'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index ix_fd ix_fd 63 NULL # Using where; Using index -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 select count(*) from t1 where fd <'ðŸ˜'; count(*) 40960 -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column `test`.`t1`.`fd` at row 1 select count(*) from t1 ignore index (ix_fd) where fd <'ðŸ˜'; count(*) 40960 @@ -2295,8 +2287,6 @@ EXPLAIN SELECT * FROM t1 WHERE a<=>'😎'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables -Warnings: -Warning 1366 Incorrect string value: '\xF0\x9F\x98\x8E' for column `test`.`t1`.`a` at row 1 DROP TABLE t1; # # MDEV-10185: Assertion `tree1->keys[key_no] && tree2->keys[key_no]' failed in diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_vs_index_merge.result mariadb-10.3-10.3.22/mysql-test/main/range_vs_index_merge.result --- mariadb-10.3-10.3.18/mysql-test/main/range_vs_index_merge.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_vs_index_merge.result 2020-01-26 18:37:27.000000000 +0000 @@ -1795,7 +1795,7 @@ WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range state,capital state 71 NULL 12 Using index condition; Using where +1 SIMPLE t1 range state,capital state 71 NULL 8 Using index condition; Using where SELECT * FROM t1 FORCE KEY (state,capital) WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas'; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/range_vs_index_merge_innodb.result mariadb-10.3-10.3.22/mysql-test/main/range_vs_index_merge_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/range_vs_index_merge_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/range_vs_index_merge_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -1796,7 +1796,7 @@ WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas'; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 range state,capital state 71 NULL 12 Using index condition; Using where +1 SIMPLE t1 range state,capital state 71 NULL 8 Using index condition; Using where SELECT * FROM t1 FORCE KEY (state,capital) WHERE ( state = 'Alabama' OR state >= 'Colorado' ) AND id != 9 OR ( capital >= 'Topeka' OR state = 'Kansas' ) AND state != 'Texas'; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/select_debug.result mariadb-10.3-10.3.22/mysql-test/main/select_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/select_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/select_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -6,6 +6,7 @@ create table t2 (a int); insert into t2 values (2), (3); set session join_cache_level=3; +SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug= 'd,opt'; explain select t1.b from t1,t2 where t1.b=t2.a; id select_type table type possible_keys key key_len ref rows Extra @@ -16,3 +17,4 @@ 2 set session join_cache_level=default; drop table t1,t2; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/select_debug.test mariadb-10.3-10.3.22/mysql-test/main/select_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/select_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/select_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -10,6 +10,7 @@ insert into t2 values (2), (3); set session join_cache_level=3; +SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug= 'd,opt'; explain select t1.b from t1,t2 where t1.b=t2.a; @@ -17,3 +18,4 @@ set session join_cache_level=default; drop table t1,t2; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/selectivity.result mariadb-10.3-10.3.22/mysql-test/main/selectivity.result --- mariadb-10.3-10.3.18/mysql-test/main/selectivity.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/selectivity.result 2020-01-26 18:37:27.000000000 +0000 @@ -1673,5 +1673,203 @@ set use_stat_tables= @save_use_stat_tables; set @@histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# MDEV-20576: failing assertion DBUG_ASSERT(0.0 < sel && sel <= 1) +# +set @@optimizer_use_condition_selectivity=2; +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) +); +CREATE INDEX Name ON City(Name); +CREATE INDEX CountryPopulation ON City(Country,Population); +CREATE INDEX CountryName ON City(Country,Name); +set @@optimizer_use_condition_selectivity=2; +EXPLAIN +SELECT * FROM City WHERE Country='FIN'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City ref Country,CountryPopulation,CountryName CountryName 3 const 5 Using index condition +DROP DATABASE world; +use test; +CREATE TABLE t1 ( +a INT, +b INT NOT NULL, +c char(100), +KEY (b, c), +KEY (b, a, c) +) ENGINE=MyISAM +DEFAULT CHARSET = utf8; +INSERT INTO t1 VALUES +(1, 1, 1), +(2, 2, 2), +(3, 3, 3), +(4, 4, 4), +(5, 5, 5), +(6, 6, 6), +(7, 7, 7), +(8, 8, 8), +(9, 9, 9); +INSERT INTO t1 SELECT a + 10, b, c FROM t1; +INSERT INTO t1 SELECT a + 20, b, c FROM t1; +INSERT INTO t1 SELECT a + 40, b, c FROM t1; +INSERT INTO t1 SELECT a + 80, b, c FROM t1; +INSERT INTO t1 SELECT a + 160, b, c FROM t1; +INSERT INTO t1 SELECT a + 320, b, c FROM t1; +INSERT INTO t1 SELECT a + 640, b, c FROM t1; +INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80; +EXPLAIN +SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range b,b_2 b 4 NULL 226 Using where +SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9; +a +2071 +2061 +2051 +2041 +2031 +2021 +2011 +2001 +1991 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +# +# MDEV-20424: New default value for optimizer_use_condition-selectivity +# leads to bad plan +# +create table t1(a int, b int, c int, d int, key(a,b)); +insert into t1 select 50,seq-1,seq-1,seq from seq_1_to_10; +insert into t1 select seq-1,seq-1,seq-1,seq from seq_1_to_100 limit 90; +create table t2(a int, b int, c int, primary key(a)); +insert into t2 select seq-1,seq-1,seq-1 from seq_1_to_100; +create table t3(a int, b int, c int, primary key(a)); +insert into t3 select seq-1,seq-1,seq-1 from seq_1_to_100 limit 30; +set optimizer_use_condition_selectivity=1; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 9 100.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t2`.`a` = `test`.`t1`.`c` and `test`.`t3`.`a` = `test`.`t1`.`d` and `test`.`t1`.`a` = 50 and `test`.`t1`.`b` <= 100 +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity=2; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 9 9.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t2`.`a` = `test`.`t1`.`c` and `test`.`t3`.`a` = `test`.`t1`.`d` and `test`.`t1`.`a` = 50 and `test`.`t1`.`b` <= 100 +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +drop table t1,t2,t3; +# +# MDEV-20519: Query plan regression with optimizer_use_condition_selectivity=4 +# +create table t1 (id int, a int, PRIMARY KEY(id), key(a)); +insert into t1 select seq,seq from seq_1_to_100; +create table t2 (id int, a int, b int, PRIMARY KEY(id), key(a), key(b)); +insert into t2 select seq,seq,seq from seq_1_to_100; +set optimizer_switch='exists_to_in=off'; +set optimizer_use_condition_selectivity=2; +SELECT * FROM t1 +WHERE +EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id +WHERE A.a=t1.a AND t2.b < 20); +id a +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +explain SELECT * FROM t1 +WHERE +EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id +WHERE A.a=t1.a AND t2.b < 20); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where +2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1 +2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where +EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A const PRIMARY,a PRIMARY 4 const 1 +1 SIMPLE B ref a a 5 const 1 +explain SELECT * FROM t1 +WHERE +EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id +WHERE A.a=t1.a AND t2.b < 20); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 100 Using where +2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1 +2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where +set optimizer_switch= @save_optimizer_switch; +set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1,t2; # End of 10.1 tests set @@global.histogram_size=@save_histogram_size; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/selectivity.test mariadb-10.3-10.3.22/mysql-test/main/selectivity.test --- mariadb-10.3-10.3.18/mysql-test/main/selectivity.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/selectivity.test 2020-01-26 18:37:27.000000000 +0000 @@ -1130,6 +1130,148 @@ set use_stat_tables= @save_use_stat_tables; set @@histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; + +--echo # +--echo # MDEV-20576: failing assertion DBUG_ASSERT(0.0 < sel && sel <= 1) +--echo # + +set @@optimizer_use_condition_selectivity=2; + +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 + +CREATE INDEX Name ON City(Name); +CREATE INDEX CountryPopulation ON City(Country,Population); +CREATE INDEX CountryName ON City(Country,Name); + +--disable_query_log +--disable_result_log +--disable_warnings +ANALYZE TABLE City; +--enable_warnings +--enable_result_log +--enable_query_log + +set @@optimizer_use_condition_selectivity=2; + +EXPLAIN +SELECT * FROM City WHERE Country='FIN'; + +DROP DATABASE world; + +use test; + +CREATE TABLE t1 ( + a INT, + b INT NOT NULL, + c char(100), + KEY (b, c), + KEY (b, a, c) +) ENGINE=MyISAM +DEFAULT CHARSET = utf8; + +INSERT INTO t1 VALUES +(1, 1, 1), +(2, 2, 2), +(3, 3, 3), +(4, 4, 4), +(5, 5, 5), +(6, 6, 6), +(7, 7, 7), +(8, 8, 8), +(9, 9, 9); + +INSERT INTO t1 SELECT a + 10, b, c FROM t1; +INSERT INTO t1 SELECT a + 20, b, c FROM t1; +INSERT INTO t1 SELECT a + 40, b, c FROM t1; +INSERT INTO t1 SELECT a + 80, b, c FROM t1; +INSERT INTO t1 SELECT a + 160, b, c FROM t1; +INSERT INTO t1 SELECT a + 320, b, c FROM t1; +INSERT INTO t1 SELECT a + 640, b, c FROM t1; +INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80; + +EXPLAIN +SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9; +SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9; + +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; + +DROP TABLE t1; + +--echo # +--echo # MDEV-20424: New default value for optimizer_use_condition-selectivity +--echo # leads to bad plan +--echo # + +create table t1(a int, b int, c int, d int, key(a,b)); +insert into t1 select 50,seq-1,seq-1,seq from seq_1_to_10; +insert into t1 select seq-1,seq-1,seq-1,seq from seq_1_to_100 limit 90; + +create table t2(a int, b int, c int, primary key(a)); +insert into t2 select seq-1,seq-1,seq-1 from seq_1_to_100; + +create table t3(a int, b int, c int, primary key(a)); +insert into t3 select seq-1,seq-1,seq-1 from seq_1_to_100 limit 30; + +let $query= select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; + +set optimizer_use_condition_selectivity=1; +eval explain extended $query; +eval $query; + +set optimizer_use_condition_selectivity=2; +eval explain extended $query; +eval $query; +set optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; + +drop table t1,t2,t3; + + +--echo # +--echo # MDEV-20519: Query plan regression with optimizer_use_condition_selectivity=4 +--echo # + + + +create table t1 (id int, a int, PRIMARY KEY(id), key(a)); +insert into t1 select seq,seq from seq_1_to_100; + +create table t2 (id int, a int, b int, PRIMARY KEY(id), key(a), key(b)); +insert into t2 select seq,seq,seq from seq_1_to_100; + +set optimizer_switch='exists_to_in=off'; +set optimizer_use_condition_selectivity=2; + +let $query= SELECT * FROM t1 + WHERE + EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id + WHERE A.a=t1.a AND t2.b < 20); + +eval $query; +eval explain $query; + +EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65; + +eval explain $query; + +set optimizer_switch= @save_optimizer_switch; +set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1,t2; + --echo # End of 10.1 tests # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/selectivity_innodb.result mariadb-10.3-10.3.22/mysql-test/main/selectivity_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/selectivity_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/selectivity_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -1683,6 +1683,204 @@ set use_stat_tables= @save_use_stat_tables; set @@histogram_size=@save_histogram_size; set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +# +# MDEV-20576: failing assertion DBUG_ASSERT(0.0 < sel && sel <= 1) +# +set @@optimizer_use_condition_selectivity=2; +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) +); +CREATE INDEX Name ON City(Name); +CREATE INDEX CountryPopulation ON City(Country,Population); +CREATE INDEX CountryName ON City(Country,Name); +set @@optimizer_use_condition_selectivity=2; +EXPLAIN +SELECT * FROM City WHERE Country='FIN'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE City ref Country,CountryPopulation,CountryName Country 3 const 7 Using index condition +DROP DATABASE world; +use test; +CREATE TABLE t1 ( +a INT, +b INT NOT NULL, +c char(100), +KEY (b, c), +KEY (b, a, c) +) ENGINE=MyISAM +DEFAULT CHARSET = utf8; +INSERT INTO t1 VALUES +(1, 1, 1), +(2, 2, 2), +(3, 3, 3), +(4, 4, 4), +(5, 5, 5), +(6, 6, 6), +(7, 7, 7), +(8, 8, 8), +(9, 9, 9); +INSERT INTO t1 SELECT a + 10, b, c FROM t1; +INSERT INTO t1 SELECT a + 20, b, c FROM t1; +INSERT INTO t1 SELECT a + 40, b, c FROM t1; +INSERT INTO t1 SELECT a + 80, b, c FROM t1; +INSERT INTO t1 SELECT a + 160, b, c FROM t1; +INSERT INTO t1 SELECT a + 320, b, c FROM t1; +INSERT INTO t1 SELECT a + 640, b, c FROM t1; +INSERT INTO t1 SELECT a + 1280, b, c FROM t1 LIMIT 80; +EXPLAIN +SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range b,b_2 b 4 NULL 226 Using where +SELECT a FROM t1 WHERE b = 1 ORDER BY c DESC LIMIT 9; +a +2071 +2061 +2051 +2041 +2031 +2021 +2011 +2001 +1991 +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1; +# +# MDEV-20424: New default value for optimizer_use_condition-selectivity +# leads to bad plan +# +create table t1(a int, b int, c int, d int, key(a,b)); +insert into t1 select 50,seq-1,seq-1,seq from seq_1_to_10; +insert into t1 select seq-1,seq-1,seq-1,seq from seq_1_to_100 limit 90; +create table t2(a int, b int, c int, primary key(a)); +insert into t2 select seq-1,seq-1,seq-1 from seq_1_to_100; +create table t3(a int, b int, c int, primary key(a)); +insert into t3 select seq-1,seq-1,seq-1 from seq_1_to_100 limit 30; +set optimizer_use_condition_selectivity=1; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 11 100.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t2`.`a` = `test`.`t1`.`c` and `test`.`t3`.`a` = `test`.`t1`.`d` and `test`.`t1`.`a` = 50 and `test`.`t1`.`b` <= 100 +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity=2; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 11 11.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where `test`.`t2`.`a` = `test`.`t1`.`c` and `test`.`t3`.`a` = `test`.`t1`.`d` and `test`.`t1`.`a` = 50 and `test`.`t1`.`b` <= 100 +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +drop table t1,t2,t3; +# +# MDEV-20519: Query plan regression with optimizer_use_condition_selectivity=4 +# +create table t1 (id int, a int, PRIMARY KEY(id), key(a)); +insert into t1 select seq,seq from seq_1_to_100; +create table t2 (id int, a int, b int, PRIMARY KEY(id), key(a), key(b)); +insert into t2 select seq,seq,seq from seq_1_to_100; +set optimizer_switch='exists_to_in=off'; +set optimizer_use_condition_selectivity=2; +SELECT * FROM t1 +WHERE +EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id +WHERE A.a=t1.a AND t2.b < 20); +id a +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +explain SELECT * FROM t1 +WHERE +EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id +WHERE A.a=t1.a AND t2.b < 20); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 5 NULL 100 Using where; Using index +2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1 Using index +2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where +EXPLAIN SELECT * FROM t1 A, t1 B WHERE A.a = B.a and A.id = 65; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE A const PRIMARY,a PRIMARY 4 const 1 +1 SIMPLE B ref a a 5 const 1 Using index +explain SELECT * FROM t1 +WHERE +EXISTS (SELECT * FROM t1 A INNER JOIN t2 ON t2.a = A.id +WHERE A.a=t1.a AND t2.b < 20); +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 index NULL a 5 NULL 100 Using where; Using index +2 DEPENDENT SUBQUERY A ref PRIMARY,a a 5 test.t1.a 1 Using index +2 DEPENDENT SUBQUERY t2 ref a,b a 5 test.A.id 1 Using where +set optimizer_switch= @save_optimizer_switch; +set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; +drop table t1,t2; # End of 10.1 tests set @@global.histogram_size=@save_histogram_size; set optimizer_switch=@save_optimizer_switch_for_selectivity_test; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/show_explain.result mariadb-10.3-10.3.22/mysql-test/main/show_explain.result --- mariadb-10.3-10.3.18/mysql-test/main/show_explain.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/show_explain.result 2020-01-26 18:37:27.000000000 +0000 @@ -23,7 +23,7 @@ ERROR HY000: Target is not running an EXPLAINable command connection con1; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select count(*) from t1 where a < 100000; connection default; show explain for $thr2; @@ -58,10 +58,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range a a 5 NULL 10 Using index condition; Rowid-ordered scan set optimizer_switch= @show_expl_tmp; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # UNION, first branch set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; explain select a from t0 A union select a+1 from t0 B; connection default; show explain for $thr2; @@ -76,10 +76,10 @@ 1 PRIMARY A ALL NULL NULL NULL NULL 10 2 UNION B ALL NULL NULL NULL NULL 10 NULL UNION RESULT ALL NULL NULL NULL NULL NULL -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # UNION, second branch set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; explain select a from t0 A union select a+1 from t0 B; connection default; show explain for $thr2; @@ -94,10 +94,10 @@ 1 PRIMARY A ALL NULL NULL NULL NULL 10 2 UNION B ALL NULL NULL NULL NULL 10 NULL UNION RESULT ALL NULL NULL NULL NULL NULL -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # Uncorrelated subquery, select set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select a, (select max(a) from t0 B) from t0 A where a<1; connection default; show explain for $thr2; @@ -109,10 +109,10 @@ connection con1; a (select max(a) from t0 B) 0 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # Uncorrelated subquery, explain set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; explain select a, (select max(a) from t0 B) from t0 A where a<1; connection default; show explain for $thr2; @@ -125,10 +125,10 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where 2 SUBQUERY B ALL NULL NULL NULL NULL 10 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # correlated subquery, select set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; show explain for $thr2; @@ -140,10 +140,10 @@ connection con1; a (select max(a) from t0 b where b.a+a.a<10) 0 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # correlated subquery, explain set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; show explain for $thr2; @@ -155,10 +155,10 @@ connection con1; a (select max(a) from t0 b where b.a+a.a<10) 0 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # correlated subquery, select, while inside the subquery set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; show explain for $thr2; @@ -170,10 +170,10 @@ connection con1; a (select max(a) from t0 b where b.a+a.a<10) 0 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # correlated subquery, explain, while inside the subquery set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; show explain for $thr2; @@ -185,10 +185,10 @@ connection con1; a (select max(a) from t0 b where b.a+a.a<10) 0 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # correlated subquery, explain, while inside the subquery set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; show explain for $thr2; @@ -200,12 +200,12 @@ connection con1; a (select max(a) from t0 b where b.a+a.a<10) 0 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # Try to do SHOW EXPLAIN for a query that runs a SET command: # I've found experimentally that select_id==2 here... # set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @foo= (select max(a) from t0 where sin(a) >0); connection default; show explain for $thr2; @@ -213,13 +213,13 @@ kill query $thr2; connection con1; ERROR 70100: Query execution was interrupted -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # Attempt SHOW EXPLAIN for an UPDATE # create table t2 as select a as a, a as dummy from t0 limit 2; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; connection default; show explain for $thr2; @@ -236,13 +236,13 @@ Note 1003 update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 connection con1; drop table t2; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # Attempt SHOW EXPLAIN for a DELETE (UPD: now works) # create table t2 as select a as a, a as dummy from t0 limit 2; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; connection default; show explain for $thr2; @@ -259,13 +259,13 @@ Note 1003 delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 connection con1; drop table t2; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # Multiple SHOW EXPLAIN calls for one select # create table t2 as select a as a, a as dummy from t0 limit 3; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2; connection default; show explain for $thr2; @@ -292,14 +292,14 @@ 1 0 2 0 drop table t2; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort" # explain select * from t0 order by a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using filesort -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @show_explain_probe_select_id=1; select * from t0 order by a; connection default; @@ -320,7 +320,7 @@ 7 8 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # SHOW EXPLAIN for SELECT ... with "Using temporary" # @@ -329,7 +329,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary connection con1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @show_explain_probe_select_id=1; select distinct a from t0; connection default; @@ -350,7 +350,7 @@ 7 8 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort" # @@ -359,7 +359,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t0 ALL NULL NULL NULL NULL 10 Using temporary connection con1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @show_explain_probe_select_id=1; select distinct a from t0; connection default; @@ -380,7 +380,7 @@ 7 8 9 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY # @@ -390,7 +390,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using temporary; Using filesort 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) -set debug_dbug='+d,show_explain_in_find_all_keys'; +SET debug_dbug='+d,show_explain_in_find_all_keys'; SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; connection default; # FIXED by "conservative assumptions about when QEP is available" fix: @@ -406,7 +406,7 @@ 1 2 4 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t2; # # MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store(double, uint32, String*) with @@ -421,7 +421,7 @@ Warnings: Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; connection default; show explain for $thr2; @@ -436,7 +436,7 @@ 1 SIMPLE t2 ALL NULL NULL NULL NULL 5 100.00 Using join buffer (flat, BNL join) Warnings: Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` join `test`.`t2` group by `test`.`t2`.`a` -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t2; # # MDEV-240: SHOW EXPLAIN: Assertion `this->optimized == 2' failed in @@ -453,7 +453,7 @@ 1 PRIMARY t2 ALL NULL NULL NULL NULL 6 2 DERIVED t3 system NULL NULL NULL NULL 1 set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; SELECT * FROM v1, t2; connection default; show explain for $thr2; @@ -461,14 +461,14 @@ kill query $thr2; connection con1; ERROR 70100: Query execution was interrupted -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP VIEW v1; DROP TABLE t2, t3; # # MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; select sleep(1); connection default; show explain for $thr2; @@ -479,12 +479,12 @@ connection con1; sleep(1) 0 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # Same as above, but try another reason for JOIN to be degenerate # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; select * from t0 where 1>10; connection default; show explain for $thr2; @@ -494,14 +494,14 @@ Note 1003 select * from t0 where 1>10 connection con1; a -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # Same as above, but try another reason for JOIN to be degenerate (2) # create table t3(a int primary key); insert into t3 select a from t0; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; select * from t0,t3 where t3.a=112233; connection default; show explain for $thr2; @@ -511,7 +511,7 @@ Note 1003 select * from t0,t3 where t3.a=112233 connection con1; a a -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t3; # # MDEV-270: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with @@ -530,7 +530,7 @@ 2 SUBQUERY t2 const PRIMARY PRIMARY 4 const 1 3 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; SELECT * FROM t2 WHERE a = (SELECT MAX(a) FROM t2 WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) @@ -552,7 +552,7 @@ 6 7 7 7 9 7 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t2; # # MDEV-273: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with impossible WHERE @@ -584,7 +584,7 @@ 1 PRIMARY t3 ALL NULL NULL NULL NULL 87 Using join buffer (flat, BNL join) 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; SELECT count(*) FROM t2, t3 WHERE a1 < ALL ( SELECT a1 FROM t2 @@ -605,7 +605,7 @@ connection con1; count(*) 1740 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t2, t3, t4; # # MDEV-275: SHOW EXPLAIN: server crashes in JOIN::print_explain with IN subquery and aggregate function @@ -615,7 +615,7 @@ (1,5),(2,4),(3,6),(4,9),(5,2),(6,8),(7,4),(8,8),(9,0),(10,43), (11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`); connection default; show explain for $thr2; @@ -627,7 +627,7 @@ Note 1003 SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`) connection con1; pk a1 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t2; DROP TABLE t1; # @@ -636,7 +636,7 @@ CREATE TABLE t1(a INT, KEY(a)); INSERT INTO t1 VALUES (3),(1),(5),(1); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT 'test' FROM t1 WHERE a=1; connection default; show explain for $thr2; @@ -648,7 +648,7 @@ test test test -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1; # # MDEV-299: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN changes back and forth during query execution @@ -666,7 +666,7 @@ 1 SIMPLE A ALL NULL NULL NULL NULL 100 Using where 1 SIMPLE B ALL key1 NULL NULL NULL 100 Range checked for each record (index map: 0x1) set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_test_if_quick_select'; +SET debug_dbug='+d,show_explain_probe_test_if_quick_select'; select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; connection default; show explain for $thr2; @@ -696,7 +696,7 @@ connection con1; count(*) 212 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1; # # MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while @@ -705,7 +705,7 @@ CREATE TABLE t1(a INT, b INT, c INT, KEY(a), KEY(b), KEY(c)); INSERT INTO t1 (a) VALUES (3),(1),(5),(1); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SHOW INDEX FROM t1; connection default; show explain for $thr2; @@ -718,7 +718,7 @@ t1 1 a 1 a A NULL NULL NULL YES BTREE t1 1 b 1 b A NULL NULL NULL YES BTREE t1 1 c 1 c A NULL NULL NULL YES BTREE -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1; # # MDEV-324: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN for a query with TEMPTABLE view @@ -731,7 +731,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY ALL NULL NULL NULL NULL 2 2 DERIVED t1 ALL NULL NULL NULL NULL 2 -set debug_dbug='+d,show_explain_probe_join_tab_preread'; +SET debug_dbug='+d,show_explain_probe_join_tab_preread'; set @show_explain_probe_select_id=1; SELECT a + 1 FROM v1; connection default; @@ -745,7 +745,7 @@ a + 1 2 3 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP VIEW v1; DROP TABLE t1; # @@ -761,7 +761,7 @@ 2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used 3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used NULL UNION RESULT ALL NULL NULL NULL NULL NULL -set debug_dbug='+d,show_explain_probe_union_read'; +SET debug_dbug='+d,show_explain_probe_union_read'; SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); connection default; show explain for $thr2; @@ -782,7 +782,7 @@ Note 1003 SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ) connection con1; a -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1; # # MDEV-327: SHOW EXPLAIN: Different select_type in plans produced by SHOW EXPLAIN @@ -805,7 +805,7 @@ 3 SUBQUERY t1 ALL NULL NULL NULL NULL 20 3 SUBQUERY t2 ALL NULL NULL NULL NULL 20 Using where set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); connection default; @@ -820,7 +820,7 @@ WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ) connection con1; a b -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1, t2; # # Test that SHOW EXPLAIN will print 'Distinct'. @@ -842,7 +842,7 @@ 1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary 1 SIMPLE t3 ref a a 5 test.t1.a 7 Using index; Distinct set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select distinct t1.a from t1,t3 where t1.a=t3.a; connection default; show explain for $thr2; @@ -855,7 +855,7 @@ a 1 2 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1,t3,t4; # # ---------- SHOW EXPLAIN and permissions ----------------- @@ -869,7 +869,7 @@ # First, make sure that user 'test2' cannot do SHOW EXPLAIN on us # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select * from t0 where a < 3; connection default; connection con2; @@ -886,14 +886,14 @@ 0 1 2 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # # Check that user test2 can do SHOW EXPLAIN on its own queries # connect con3, localhost, test2,,; connection con2; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select * from t0 where a < 3; connection con1; connection con3; @@ -916,9 +916,9 @@ grant process on *.* to test2@localhost; connect con2, localhost, test2,,; connection con1; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select * from t0 where a < 3; connection default; connection con2; @@ -932,7 +932,7 @@ 0 1 2 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; revoke all privileges on test.* from test2@localhost; drop user test2@localhost; disconnect con2; @@ -1009,7 +1009,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge a,b a,b 5,5 NULL 8 Using sort_union(a,b); Using where; Using filesort set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT a+SLEEP(0.01) FROM t1 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 ORDER BY b; @@ -1030,9 +1030,9 @@ 0 0 0 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; SELECT a+SLEEP(0.01) FROM t1 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 ORDER BY b; @@ -1053,7 +1053,7 @@ 0 0 0 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1; # # MDEV-298: SHOW EXPLAIN: Plan returned by SHOW EXPLAIN only contains @@ -1067,7 +1067,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4112 Using temporary; Using filesort set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT a FROM t1 GROUP BY a; connection default; show explain for $thr2; @@ -1093,7 +1093,7 @@ 14 15 16 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1; # # MDEV-408: SHOW EXPLAIN: Some values are chopped off in SHOW EXPLAIN output @@ -1107,7 +1107,7 @@ 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where 2 DEPENDENT SUBQUERY t2 index_subquery PRIMARY,c c 5 func 1 Using index; Using where set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; connection default; show explain for $thr2; @@ -1119,7 +1119,7 @@ connection con1; SUM(a + SLEEP(0.1)) 7862 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1, t2; # # MDEV-412: SHOW EXPLAIN: Server crashes in JOIN::print_explain on a query with inner join and ORDER BY the same column twice @@ -1157,7 +1157,7 @@ 1 SIMPLE t1 range b b 6 NULL 107 Using where; Using index 1 SIMPLE t3 ref PRIMARY PRIMARY 5 test.t1.b 1 Using index set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; connection default; show explain for $thr2; @@ -1169,7 +1169,7 @@ Note 1003 SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2 connection con1; field1 field2 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1,t2,t3; # # MDEV-423: SHOW EXPLAIN: 'Using where' for a subquery is shown in EXPLAIN, but not in SHOW EXPLAIN output @@ -1190,7 +1190,7 @@ 1 PRIMARY t2 ALL NULL NULL NULL NULL 20 3 SUBQUERY t3 ALL NULL NULL NULL NULL 20 Using where set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10; connection default; @@ -1205,7 +1205,7 @@ connection con1; max(a+b+c) 279 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1,t2,t3; # # MDEV-416: Server crashes in SQL_SELECT::cleanup on EXPLAIN with SUM ( DISTINCT ) in a non-correlated subquery (5.5-show-explain tree) @@ -1231,7 +1231,7 @@ hex('ãû') E3FB set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; select * from t0 where length('ãû') = a; connection default; set names utf8; @@ -1244,7 +1244,7 @@ connection con1; a 2 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set names default; # # MDEV-462: SHOW EXPLAIN: Assertion `table_list->table' fails in find_field_in_table_ref if FOR contains a non-numeric value @@ -1270,7 +1270,7 @@ 3 DEPENDENT SUBQUERY t1 ALL a NULL NULL NULL 2 Range checked for each record (index map: 0x1) 4 SUBQUERY t2 ALL NULL NULL NULL NULL 2 set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 WHERE b <= ANY ( SELECT a FROM t1 @@ -1290,7 +1290,7 @@ connection con1; SUM(b) 0 -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1,t2; drop table t0; # @@ -1302,7 +1302,7 @@ insert into t1 select a,a from t0; create table t2 as select * from t1; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_best_ext_lim_search'; +SET debug_dbug='+d,show_explain_probe_best_ext_lim_search'; explain select * from t0 where not exists ( select 1 from t1, t2 where t1.b=t2.b and t2.a=t0.a) and a is null; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/show_explain.test mariadb-10.3-10.3.22/mysql-test/main/show_explain.test --- mariadb-10.3-10.3.18/mysql-test/main/show_explain.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/show_explain.test 2020-01-26 18:37:27.000000000 +0000 @@ -15,7 +15,7 @@ # is that we use the following commands for synchronization: # # set @show_explain_probe_select_id=1; -# set debug_dbug='d,show_explain_probe_join_exec_start'; +# SET debug_dbug='d,show_explain_probe_join_exec_start'; # send select count(*) from t1 where a < 100000; # # When ran with mysqltest_embedded, this translates into: @@ -75,7 +75,7 @@ # connection con1; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select count(*) from t1 where a < 100000; connection default; @@ -103,109 +103,109 @@ connection con1; reap; set optimizer_switch= @show_expl_tmp; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # UNION, first branch set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send explain select a from t0 A union select a+1 from t0 B; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # UNION, second branch set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send explain select a from t0 A union select a+1 from t0 B; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # Uncorrelated subquery, select set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select a, (select max(a) from t0 B) from t0 A where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # Uncorrelated subquery, explain set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send explain select a, (select max(a) from t0 B) from t0 A where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # correlated subquery, select set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # correlated subquery, explain set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # correlated subquery, select, while inside the subquery set @show_explain_probe_select_id=2; # <--- -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # correlated subquery, explain, while inside the subquery set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # correlated subquery, explain, while inside the subquery set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send select a, (select max(a) from t0 b where b.a+a.a<10) from t0 a where a<1; connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; # TODO: explain in the parent subuqery when the un-correlated child has been # run (and have done irreversible cleanups) @@ -218,7 +218,7 @@ --echo # I've found experimentally that select_id==2 here... --echo # set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send set @foo= (select max(a) from t0 where sin(a) >0); connection default; --source include/wait_condition.inc @@ -228,14 +228,14 @@ connection con1; --error ER_QUERY_INTERRUPTED reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # Attempt SHOW EXPLAIN for an UPDATE --echo # create table t2 as select a as a, a as dummy from t0 limit 2; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send update t2 set dummy=0 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; connection default; --source include/wait_condition.inc @@ -247,14 +247,14 @@ connection con1; reap; drop table t2; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # Attempt SHOW EXPLAIN for a DELETE (UPD: now works) --echo # create table t2 as select a as a, a as dummy from t0 limit 2; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send delete from t2 where (select max(a) from t0 where t2.a + t0.a <3) >3 ; connection default; --source include/wait_condition.inc @@ -266,14 +266,14 @@ connection con1; reap; drop table t2; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # Multiple SHOW EXPLAIN calls for one select --echo # create table t2 as select a as a, a as dummy from t0 limit 3; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select t2.a, ((select max(a) from t0 where t2.a + t0.a <3) >3) as SUBQ from t2; connection default; --source include/wait_condition.inc @@ -285,14 +285,14 @@ connection con1; reap; drop table t2; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # SHOW EXPLAIN for SELECT ... ORDER BY with "Using filesort" --echo # explain select * from t0 order by a; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @show_explain_probe_select_id=1; send select * from t0 order by a; connection default; @@ -300,7 +300,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # SHOW EXPLAIN for SELECT ... with "Using temporary" @@ -309,7 +309,7 @@ explain select distinct a from t0; connection con1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @show_explain_probe_select_id=1; send select distinct a from t0; connection default; @@ -317,7 +317,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # SHOW EXPLAIN for SELECT ... with "Using temporary; Using filesort" @@ -326,7 +326,7 @@ explain select distinct a from t0; connection con1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; set @show_explain_probe_select_id=1; send select distinct a from t0; connection default; @@ -334,7 +334,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM subquery and GROUP BY @@ -343,7 +343,7 @@ INSERT INTO t2 VALUES (1),(2),(1),(4),(2); explain SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; -set debug_dbug='+d,show_explain_in_find_all_keys'; +SET debug_dbug='+d,show_explain_in_find_all_keys'; send SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a; connection default; @@ -354,7 +354,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t2; @@ -370,7 +370,7 @@ EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send EXPLAIN EXTENDED SELECT alias.a FROM t2, ( SELECT * FROM t2 ) AS alias GROUP BY alias.a ; connection default; @@ -378,7 +378,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t2; @@ -394,7 +394,7 @@ explain SELECT * FROM v1, t2; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send SELECT * FROM v1, t2; connection default; @@ -405,7 +405,7 @@ connection con1; --error ER_QUERY_INTERRUPTED reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP VIEW v1; DROP TABLE t2, t3; @@ -413,21 +413,21 @@ --echo # MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queries --echo # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send select sleep(1); connection default; --source include/wait_condition.inc evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # Same as above, but try another reason for JOIN to be degenerate --echo # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send select * from t0 where 1>10; connection default; --source include/wait_condition.inc @@ -435,7 +435,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # Same as above, but try another reason for JOIN to be degenerate (2) @@ -443,7 +443,7 @@ create table t3(a int primary key); insert into t3 select a from t0; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send select * from t0,t3 where t3.a=112233; connection default; --source include/wait_condition.inc @@ -451,7 +451,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t3; --echo # @@ -470,7 +470,7 @@ ); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; send SELECT * FROM t2 WHERE a = (SELECT MAX(a) FROM t2 WHERE pk= (SELECT MAX(pk) FROM t2 WHERE pk = 3) @@ -480,7 +480,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t2; @@ -513,7 +513,7 @@ ); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; send SELECT count(*) FROM t2, t3 WHERE a1 < ALL ( @@ -526,7 +526,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t2, t3, t4; --echo # @@ -538,7 +538,7 @@ (11,23),(12,3),(13,45),(14,16),(15,2),(16,33),(17,2),(18,5),(19,9),(20,2); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_end'; +SET debug_dbug='+d,show_explain_probe_join_exec_end'; send SELECT * FROM t2 WHERE (5, 78) IN (SELECT `a1`, MAX(`a1`) FROM t2 GROUP BY `a1`); connection default; @@ -547,7 +547,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t2; DROP TABLE t1; @@ -559,7 +559,7 @@ INSERT INTO t1 VALUES (3),(1),(5),(1); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send SELECT 'test' FROM t1 WHERE a=1; connection default; @@ -567,7 +567,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1; @@ -591,7 +591,7 @@ explain select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_test_if_quick_select'; +SET debug_dbug='+d,show_explain_probe_test_if_quick_select'; send select count(*) from t1 A, t1 B where B.key1 < A.col2 and A.col1=3 AND B.col2 + 1 < 100; @@ -608,7 +608,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1; --echo # @@ -619,7 +619,7 @@ INSERT INTO t1 (a) VALUES (3),(1),(5),(1); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send SHOW INDEX FROM t1; connection default; @@ -627,7 +627,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1; @@ -641,7 +641,7 @@ EXPLAIN SELECT a + 1 FROM v1; -set debug_dbug='+d,show_explain_probe_join_tab_preread'; +SET debug_dbug='+d,show_explain_probe_join_tab_preread'; set @show_explain_probe_select_id=1; send @@ -651,7 +651,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP VIEW v1; DROP TABLE t1; @@ -667,7 +667,7 @@ EXPLAIN SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); -set debug_dbug='+d,show_explain_probe_union_read'; +SET debug_dbug='+d,show_explain_probe_union_read'; send SELECT a FROM t1 WHERE a IN ( SELECT 1+SLEEP(0.01) UNION SELECT 2 ); @@ -681,7 +681,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1; --echo # @@ -703,7 +703,7 @@ WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; --send SELECT * FROM t1, ( SELECT * FROM t2 ) AS alias WHERE a < ALL ( SELECT b FROM t1, t2 WHERE a = b ); @@ -714,7 +714,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1, t2; --echo # @@ -737,7 +737,7 @@ explain select distinct t1.a from t1,t3 where t1.a=t3.a; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; --send select distinct t1.a from t1,t3 where t1.a=t3.a; connection default; @@ -746,7 +746,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1,t3,t4; @@ -756,7 +756,7 @@ create user test2@localhost; grant ALL on test.* to test2@localhost; -# Give the user SUPER privilege so it can set debug_dbug variable. +# Give the user SUPER privilege so it can SET debug_dbug variable. grant super on *.* to test2@localhost; connect (con2, localhost, test2,,); connection con1; @@ -765,7 +765,7 @@ --echo # First, make sure that user 'test2' cannot do SHOW EXPLAIN on us --echo # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select * from t0 where a < 3; @@ -781,7 +781,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; --echo # --echo # Check that user test2 can do SHOW EXPLAIN on its own queries @@ -791,7 +791,7 @@ connection con2; let $thr_con2=`select connection_id()`; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select * from t0 where a < 3; @@ -817,10 +817,10 @@ grant process on *.* to test2@localhost; connect (con2, localhost, test2,,); connection con1; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select * from t0 where a < 3; @@ -832,7 +832,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; revoke all privileges on test.* from test2@localhost; drop user test2@localhost; @@ -912,7 +912,7 @@ ORDER BY b; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; --send SELECT a+SLEEP(0.01) FROM t1 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 @@ -924,10 +924,10 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; --send SELECT a+SLEEP(0.01) FROM t1 WHERE a IN ( 255, 0 ) OR b BETWEEN 6 AND 129 @@ -940,7 +940,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1; @@ -956,7 +956,7 @@ EXPLAIN SELECT a FROM t1 GROUP BY a; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; --send SELECT a FROM t1 GROUP BY a; @@ -967,7 +967,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1; @@ -983,7 +983,7 @@ explain SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; --send SELECT SUM(a + SLEEP(0.1)) FROM t1 WHERE a IN ( SELECT c FROM t2 WHERE d < b ) OR b < 's'; @@ -994,7 +994,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; drop table t1, t2; --echo # @@ -1033,7 +1033,7 @@ SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; send SELECT b AS field1, b AS field2 FROM t1, t2, t3 WHERE d = b ORDER BY field1, field2; @@ -1045,7 +1045,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1,t2,t3; @@ -1069,7 +1069,7 @@ WHERE EXISTS ( SELECT * FROM t3 WHERE b = c ) OR a <= 10; set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send SELECT max(a+b+c) FROM t1 AS alias1, ( SELECT * FROM t2 ) AS alias @@ -1082,7 +1082,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1,t2,t3; --echo # @@ -1109,7 +1109,7 @@ select hex('ãû'); set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send select * from t0 where length('ãû') = a; @@ -1124,7 +1124,7 @@ # The constant should be two letters, the last looking like 'bl' reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set names default; --echo # @@ -1151,7 +1151,7 @@ set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_join_exec_start'; +SET debug_dbug='+d,show_explain_probe_join_exec_start'; send SELECT SUM(b) FROM ( SELECT * FROM t1 ) AS alias1, t2 @@ -1166,7 +1166,7 @@ connection con1; reap; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; DROP TABLE t1,t2; drop table t0; @@ -1182,7 +1182,7 @@ create table t2 as select * from t1; set @show_explain_probe_select_id=2; -set debug_dbug='+d,show_explain_probe_best_ext_lim_search'; +SET debug_dbug='+d,show_explain_probe_best_ext_lim_search'; send explain select * from t0 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/show_explain_non_select.result mariadb-10.3-10.3.22/mysql-test/main/show_explain_non_select.result --- mariadb-10.3-10.3.18/mysql-test/main/show_explain_non_select.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/show_explain_non_select.result 2020-01-26 18:37:27.000000000 +0000 @@ -14,7 +14,7 @@ # Test SHOW EXPLAIN for single-table DELETE # connection con2; -set debug_dbug='+d,show_explain_probe_delete_exec_start'; +SET debug_dbug='+d,show_explain_probe_delete_exec_start'; delete from t1 where a<10 and b+1>1000; connection default; show explain for $thr2; @@ -27,7 +27,7 @@ # Test SHOW EXPLAIN for multi-table DELETE # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000; connection default; show explain for $thr2; @@ -41,7 +41,7 @@ # Test SHOW EXPLAIN for single-table UPDATE # connection con2; -set debug_dbug='+d,show_explain_probe_update_exec_start'; +SET debug_dbug='+d,show_explain_probe_update_exec_start'; update t1 set filler='filler-data-2' where a<10 and b+1>1000; connection default; show explain for $thr2; @@ -51,5 +51,5 @@ Note 1003 update t1 set filler='filler-data-2' where a<10 and b+1>1000 connection con2; drop table t0,t1; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set debug_sync='RESET'; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/show_explain_non_select.test mariadb-10.3-10.3.22/mysql-test/main/show_explain_non_select.test --- mariadb-10.3-10.3.18/mysql-test/main/show_explain_non_select.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/show_explain_non_select.test 2020-01-26 18:37:27.000000000 +0000 @@ -38,7 +38,7 @@ --echo # Test SHOW EXPLAIN for single-table DELETE --echo # connection con2; -set debug_dbug='+d,show_explain_probe_delete_exec_start'; +SET debug_dbug='+d,show_explain_probe_delete_exec_start'; send delete from t1 where a<10 and b+1>1000; connection default; @@ -51,7 +51,7 @@ --echo # Test SHOW EXPLAIN for multi-table DELETE --echo # set @show_explain_probe_select_id=1; -set debug_dbug='+d,show_explain_probe_do_select'; +SET debug_dbug='+d,show_explain_probe_do_select'; send delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000; connection default; --source include/wait_condition.inc @@ -63,7 +63,7 @@ --echo # Test SHOW EXPLAIN for single-table UPDATE --echo # connection con2; -set debug_dbug='+d,show_explain_probe_update_exec_start'; +SET debug_dbug='+d,show_explain_probe_update_exec_start'; send update t1 set filler='filler-data-2' where a<10 and b+1>1000; connection default; @@ -74,5 +74,5 @@ drop table t0,t1; -set debug_dbug=@old_debug; +SET debug_dbug=@old_debug; set debug_sync='RESET'; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/show_explain_ps.result mariadb-10.3-10.3.22/mysql-test/main/show_explain_ps.result --- mariadb-10.3-10.3.18/mysql-test/main/show_explain_ps.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/show_explain_ps.result 2020-01-26 18:37:27.000000000 +0000 @@ -17,7 +17,8 @@ connection default; connection con1; set @show_explain_probe_select_id=1; -set debug_dbug='d,show_explain_probe_join_exec_start'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='d,show_explain_probe_join_exec_start'; select count(*) from t0 where a < 100000; connection default; show explain for $thr2; @@ -28,7 +29,7 @@ connection con1; count(*) 10 -set debug_dbug=''; +SET debug_dbug= @saved_dbug; select event_name from performance_schema.events_stages_history_long join diff -Nru mariadb-10.3-10.3.18/mysql-test/main/show_explain_ps.test mariadb-10.3-10.3.22/mysql-test/main/show_explain_ps.test --- mariadb-10.3-10.3.18/mysql-test/main/show_explain_ps.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/show_explain_ps.test 2020-01-26 18:37:27.000000000 +0000 @@ -38,7 +38,8 @@ # connection con1; set @show_explain_probe_select_id=1; -set debug_dbug='d,show_explain_probe_join_exec_start'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='d,show_explain_probe_join_exec_start'; send select count(*) from t0 where a < 100000; connection default; @@ -47,7 +48,7 @@ connection con1; reap; -set debug_dbug=''; +SET debug_dbug= @saved_dbug; evalp select event_name from diff -Nru mariadb-10.3-10.3.18/mysql-test/main/slowlog_enospace-10508.result mariadb-10.3-10.3.22/mysql-test/main/slowlog_enospace-10508.result --- mariadb-10.3-10.3.18/mysql-test/main/slowlog_enospace-10508.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/slowlog_enospace-10508.result 2020-01-26 18:37:27.000000000 +0000 @@ -3,7 +3,8 @@ insert t1 select seq, seq+1 from seq_1_to_1000; set global general_log=0; set global log_queries_not_using_indexes=1; -set debug_dbug='+d,simulate_file_write_error'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,simulate_file_write_error'; select * from t1 where a>10; select * from t1 where a>10; select * from t1 where a>10; @@ -54,7 +55,7 @@ select * from t1 where a>10; select * from t1 where a>10; select * from t1 where a>10; -set debug_dbug=''; +SET debug_dbug= @saved_dbug; set global general_log=1; set global log_queries_not_using_indexes=default; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/slowlog_enospace-10508.test mariadb-10.3-10.3.22/mysql-test/main/slowlog_enospace-10508.test --- mariadb-10.3-10.3.18/mysql-test/main/slowlog_enospace-10508.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/slowlog_enospace-10508.test 2020-01-26 18:37:27.000000000 +0000 @@ -9,7 +9,8 @@ insert t1 select seq, seq+1 from seq_1_to_1000; set global general_log=0; set global log_queries_not_using_indexes=1; -set debug_dbug='+d,simulate_file_write_error'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,simulate_file_write_error'; --disable_result_log --let $run= 50 while ($run) @@ -18,7 +19,7 @@ dec $run; } --enable_result_log -set debug_dbug=''; +SET debug_dbug= @saved_dbug; set global general_log=1; set global log_queries_not_using_indexes=default; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp-bugs.result mariadb-10.3-10.3.22/mysql-test/main/sp-bugs.result --- mariadb-10.3-10.3.18/mysql-test/main/sp-bugs.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp-bugs.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,5 +1,5 @@ # -# Bug #47412: Valgrind warnings / user can read uninitalized memory +# Bug #47412: Valgrind warnings / user can read uninitialized memory # using SP variables # CREATE SCHEMA testdb; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp-bugs.test mariadb-10.3-10.3.22/mysql-test/main/sp-bugs.test --- mariadb-10.3-10.3.18/mysql-test/main/sp-bugs.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp-bugs.test 2020-01-26 18:37:27.000000000 +0000 @@ -1,7 +1,7 @@ # Test file for stored procedure bugfixes --echo # ---echo # Bug #47412: Valgrind warnings / user can read uninitalized memory +--echo # Bug #47412: Valgrind warnings / user can read uninitialized memory --echo # using SP variables --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp-code.result mariadb-10.3-10.3.22/mysql-test/main/sp-code.result --- mariadb-10.3-10.3.18/mysql-test/main/sp-code.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp-code.result 2020-01-26 18:37:27.000000000 +0000 @@ -919,6 +919,7 @@ CLOSE c; SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack END| +SET @save_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,bug23032_emit_warning"; CALL p1(); Warning found! @@ -938,7 +939,7 @@ Level Code Message Warning 1105 Unknown error Error 1329 No data - zero rows fetched, selected, or processed -SET SESSION debug_dbug="-d,bug23032_emit_warning"; +SET SESSION debug_dbug=@save_dbug; DROP PROCEDURE p1; DROP TABLE t1; # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp-code.test mariadb-10.3-10.3.22/mysql-test/main/sp-code.test --- mariadb-10.3-10.3.18/mysql-test/main/sp-code.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp-code.test 2020-01-26 18:37:27.000000000 +0000 @@ -696,9 +696,10 @@ delimiter ;| +SET @save_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,bug23032_emit_warning"; CALL p1(); -SET SESSION debug_dbug="-d,bug23032_emit_warning"; +SET SESSION debug_dbug=@save_dbug; DROP PROCEDURE p1; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp-security.test mariadb-10.3-10.3.22/mysql-test/main/sp-security.test --- mariadb-10.3-10.3.18/mysql-test/main/sp-security.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp-security.test 2020-01-26 18:37:27.000000000 +0000 @@ -342,7 +342,7 @@ drop table t1; # -# Bug#9503 reseting correct parameters of thread after error in SP function +# Bug#9503 resetting correct parameters of thread after error in SP function # connect (root,localhost,root,,test); connection root; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp.result mariadb-10.3-10.3.22/mysql-test/main/sp.result --- mariadb-10.3-10.3.18/mysql-test/main/sp.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp.result 2020-01-26 18:37:27.000000000 +0000 @@ -7657,7 +7657,7 @@ 1 1 DROP PROCEDURE sp; -CREATE PROCEDURE sp() SHOW USER_STATISTICS; +CREATE PROCEDURE sp() SET STATEMENT SQL_SELECT_LIMIT=0 FOR SHOW USER_STATISTICS; CALL sp; User Total_connections Concurrent_connections Connected_time Busy_time Cpu_time Bytes_received Bytes_sent Binlog_bytes_written Rows_read Rows_sent Rows_deleted Rows_inserted Rows_updated Select_commands Update_commands Other_commands Commit_transactions Rollback_transactions Denied_connections Lost_connections Access_denied Empty_queries Total_ssl_connections Max_statement_time_exceeded SELECT 1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sp.test mariadb-10.3-10.3.22/mysql-test/main/sp.test --- mariadb-10.3-10.3.18/mysql-test/main/sp.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sp.test 2020-01-26 18:37:27.000000000 +0000 @@ -9082,7 +9082,7 @@ CALL sp; SELECT 1; DROP PROCEDURE sp; -CREATE PROCEDURE sp() SHOW USER_STATISTICS; +CREATE PROCEDURE sp() SET STATEMENT SQL_SELECT_LIMIT=0 FOR SHOW USER_STATISTICS; CALL sp; SELECT 1; DROP PROCEDURE sp; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_7937.test mariadb-10.3-10.3.22/mysql-test/main/ssl_7937.test --- mariadb-10.3-10.3.18/mysql-test/main/ssl_7937.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_7937.test 2020-01-26 18:37:27.000000000 +0000 @@ -21,15 +21,6 @@ --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 --echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()" -# this is the test where certificate verification fails. -# but yassl doesn't support certificate verification, so -# we fake the test result for yassl -let yassl=`select variable_value='Unknown' from information_schema.session_status where variable_name='Ssl_session_cache_mode'`; -if (!$yassl) { - --replace_result "self signed certificate in certificate chain" "Failed to verify the server certificate" "Error in the certificate." "Failed to verify the server certificate" - --exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 -} -if ($yassl) { - --echo ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate -} +--replace_regex /SSL connection error.*certificate[^\n]*/SSL connection error: Failed to verify the server certificate/ +--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1 drop procedure have_ssl; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_8k_key.test mariadb-10.3-10.3.22/mysql-test/main/ssl_8k_key.test --- mariadb-10.3-10.3.18/mysql-test/main/ssl_8k_key.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_8k_key.test 2020-01-26 18:37:27.000000000 +0000 @@ -1,6 +1,3 @@ -# schannel does not support keys longer than 4k --- source include/not_windows.inc - -- source include/have_ssl_communication.inc # # Bug#29784 YaSSL assertion failure when reading 8k key. diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_crl.test mariadb-10.3-10.3.22/mysql-test/main/ssl_crl.test --- mariadb-10.3-10.3.18/mysql-test/main/ssl_crl.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_crl.test 2020-01-26 18:37:27.000000000 +0000 @@ -7,7 +7,7 @@ --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/server-new-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/server-new-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" --echo # try logging in with a certificate in the server's --ssl-crl : should fail -# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is wrong ---replace_result "ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0" "ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked" +# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different +--replace_regex /ERROR 2013 \(HY000\): Lost connection to MySQL server at '.*', system error: [0-9]+/ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked/ --error 1 --exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_crl_clients.test mariadb-10.3-10.3.22/mysql-test/main/ssl_crl_clients.test --- mariadb-10.3-10.3.18/mysql-test/main/ssl_crl_clients.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_crl_clients.test 2020-01-26 18:37:27.000000000 +0000 @@ -1,6 +1,12 @@ # This test should work in embedded server after we fix mysqltest -- source include/not_embedded.inc --- source include/have_openssl.inc + +if (`SELECT COUNT(*) = 0 FROM information_schema.GLOBAL_VARIABLES + WHERE (VARIABLE_NAME ='version_compile_os' AND VARIABLE_VALUE LIKE 'Win%' OR + VARIABLE_NAME='have_openssl' AND VARIABLE_VALUE='YES')`) +{ + skip Need openssl or Windows; +} --echo # Test clients with and without CRL lists @@ -14,10 +20,12 @@ --echo ############ Test mysql ############## --echo # Test mysql connecting to a server with a certificate revoked by -crl +--replace_result "Server certificate validation failed. The certificate is revoked. Error 0x80092010(CRYPT_E_REVOKED)" "certificate revoked" --error 1 --exec $MYSQL $ssl_crl test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1 --echo # Test mysql connecting to a server with a certificate revoked by -crlpath +--replace_result "Server certificate validation failed. The certificate is revoked. Error 0x80092010(CRYPT_E_REVOKED)" "certificate revoked" --error 1 --exec $MYSQL $ssl_crlpath test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1 @@ -26,11 +34,11 @@ let $admin_suffix = --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping; --echo # Test mysqladmin connecting to a server with a certificate revoked by -crl ---replace_regex /.*mysqladmin.*:/mysqladmin:/ +--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/ --error 1 --exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1 --echo # Test mysqladmin connecting to a server with a certificate revoked by -crlpath ---replace_regex /.*mysqladmin.*:/mysqladmin:/ +--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/ --error 1 --exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca,bad.result mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca,bad.result --- mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca,bad.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca,bad.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1 @@ +ERROR 2026 (HY000): SSL connection error: Validation of SSL server certificate failed diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca.combinations mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.combinations --- mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca.combinations 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.combinations 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,11 @@ +[good] +# +# hostname on the certificate is localhost +# + +[bad] +# +# hostname on the certificate is server8k +# +loose-ssl-key=$MYSQL_TEST_DIR/std_data/server8k-key.pem +loose-ssl-cert=$MYSQL_TEST_DIR/std_data/server8k-cert.pem diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca.result mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.result --- mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.result 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,2 @@ +*************************** 1. row *************************** +have_ssl: 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca.test mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.test --- mariadb-10.3-10.3.18/mysql-test/main/ssl_system_ca.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/ssl_system_ca.test 2020-01-26 18:37:27.000000000 +0000 @@ -0,0 +1,22 @@ +# +# Tests here don't use --ssl-ca but expect the certificate to be +# signed by a CA in a system CA store +# +# They only work for openssl, because the following line works only there: +let SSL_CERT_DIR=$MYSQL_TMP_DIR; + +source include/not_embedded.inc; + +if (`select @@version_ssl_library not like 'OpenSSL%'`) { + skip Needs OpenSSL; +} + +# See `openssl x509 -in cacert.pem -noout -issuer_hash` +copy_file $MYSQL_TEST_DIR/std_data/cacert.pem $MYSQL_TMP_DIR/ed1f42db.0; + +# +# test --ssl-verify-server-cert +# + +disable_abort_on_error; +exec $MYSQL --ssl-verify-server-cert -Ee "select (variable_value <> '') as have_ssl from information_schema.session_status where variable_name='ssl_cipher'" 2>&1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/stat_tables-enospc.result mariadb-10.3-10.3.22/mysql-test/main/stat_tables-enospc.result --- mariadb-10.3-10.3.18/mysql-test/main/stat_tables-enospc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/stat_tables-enospc.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,11 +1,12 @@ call mtr.add_suppression("No space left on device"); create table t1 (a varchar(255), b varchar(255), c varchar(255)); set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; -set debug_dbug='+d,simulate_file_write_error'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,simulate_file_write_error'; set @@max_heap_table_size=128*1024; analyze table t1; Table Op Msg_type Msg_text test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device") test.t1 analyze status Operation failed -set debug_dbug=''; +SET debug_dbug= @saved_dbug; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/stat_tables-enospc.test mariadb-10.3-10.3.22/mysql-test/main/stat_tables-enospc.test --- mariadb-10.3-10.3.18/mysql-test/main/stat_tables-enospc.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/stat_tables-enospc.test 2020-01-26 18:37:27.000000000 +0000 @@ -16,9 +16,10 @@ } --enable_query_log set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; -set debug_dbug='+d,simulate_file_write_error'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,simulate_file_write_error'; set @@max_heap_table_size=128*1024; --replace_regex /'.*'/'tmp-file'/ analyze table t1; -set debug_dbug=''; +SET debug_dbug= @saved_dbug; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/stat_tables.result mariadb-10.3-10.3.22/mysql-test/main/stat_tables.result --- mariadb-10.3-10.3.18/mysql-test/main/stat_tables.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/stat_tables.result 2020-01-26 18:37:27.000000000 +0000 @@ -797,9 +797,33 @@ 2004-01-01 2004-02-29 0000-10-31 -drop table t1; set @@sql_mode= @save_sql_mode; set use_stat_tables=@save_use_stat_tables; set @@histogram_size= @save_histogram_size; set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +# +# MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value +# +set names utf8; +create table t1 ( a varchar(255) character set utf8); +insert into t1 values (REPEAT('Ó¥',255)), (REPEAT('ç',255)); +set use_stat_tables='preferably'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +set @save_sql_mode= @@sql_mode; +set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; +update mysql.column_stats set min_value= REPEAT('Ó¥',256) where db_name='test' and table_name='t1'; +Warnings: +Warning 1265 Data truncated for column 'min_value' at row 1 +set @@sql_mode= @save_sql_mode; +select length(a) from t1 where a=REPEAT('Ó¥',255); +length(a) +510 +set names latin1; +set @@use_stat_tables=@save_use_stat_tables; +drop table t1; +# please keep this at the last set @@global.histogram_size=@save_histogram_size; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/stat_tables.test mariadb-10.3-10.3.22/mysql-test/main/stat_tables.test --- mariadb-10.3-10.3.18/mysql-test/main/stat_tables.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/stat_tables.test 2020-01-26 18:37:27.000000000 +0000 @@ -540,10 +540,33 @@ update mysql.column_stats set min_value='2004-0-31123' where db_name='test' and table_name='t1'; select min_value from mysql.column_stats where db_name='test' and table_name='t1'; select * from t1; -drop table t1; - set @@sql_mode= @save_sql_mode; set use_stat_tables=@save_use_stat_tables; set @@histogram_size= @save_histogram_size; set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; + +--echo # +--echo # MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value +--echo # + +set names utf8; +create table t1 ( a varchar(255) character set utf8); +insert into t1 values (REPEAT('Ó¥',255)), (REPEAT('ç',255)); + +set use_stat_tables='preferably'; +analyze table t1 persistent for all; + +set @save_sql_mode= @@sql_mode; +set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; +update mysql.column_stats set min_value= REPEAT('Ó¥',256) where db_name='test' and table_name='t1'; +set @@sql_mode= @save_sql_mode; + +select length(a) from t1 where a=REPEAT('Ó¥',255); + +set names latin1; +set @@use_stat_tables=@save_use_stat_tables; +drop table t1; + +--echo # please keep this at the last set @@global.histogram_size=@save_histogram_size; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/stat_tables_innodb.result mariadb-10.3-10.3.22/mysql-test/main/stat_tables_innodb.result --- mariadb-10.3-10.3.18/mysql-test/main/stat_tables_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/stat_tables_innodb.result 2020-01-26 18:37:27.000000000 +0000 @@ -824,11 +824,35 @@ 2004-01-01 2004-02-29 0000-10-31 -drop table t1; set @@sql_mode= @save_sql_mode; set use_stat_tables=@save_use_stat_tables; set @@histogram_size= @save_histogram_size; set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +drop table t1; +# +# MDEV-20589: Server still crashes in Field::set_warning_truncated_wrong_value +# +set names utf8; +create table t1 ( a varchar(255) character set utf8); +insert into t1 values (REPEAT('Ó¥',255)), (REPEAT('ç',255)); +set use_stat_tables='preferably'; +analyze table t1 persistent for all; +Table Op Msg_type Msg_text +test.t1 analyze status Engine-independent statistics collected +test.t1 analyze status OK +set @save_sql_mode= @@sql_mode; +set sql_mode='ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; +update mysql.column_stats set min_value= REPEAT('Ó¥',256) where db_name='test' and table_name='t1'; +Warnings: +Warning 1265 Data truncated for column 'min_value' at row 1 +set @@sql_mode= @save_sql_mode; +select length(a) from t1 where a=REPEAT('Ó¥',255); +length(a) +510 +set names latin1; +set @@use_stat_tables=@save_use_stat_tables; +drop table t1; +# please keep this at the last set @@global.histogram_size=@save_histogram_size; set optimizer_switch=@save_optimizer_switch_for_stat_tables_test; SET SESSION STORAGE_ENGINE=DEFAULT; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/subselect_sj.result mariadb-10.3-10.3.22/mysql-test/main/subselect_sj.result --- mariadb-10.3-10.3.18/mysql-test/main/subselect_sj.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/subselect_sj.result 2020-01-26 18:37:27.000000000 +0000 @@ -3259,6 +3259,32 @@ create table t2 (a2 varchar(25)) ; insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2); drop table t1,t2; +# +# MDEV-13172: Wrong result / SELECT ... WHERE EXISTS ... (with UNIQUE Key) +# +CREATE TABLE `t1` ( +`Id` int(11) NOT NULL, +PRIMARY KEY (`Id`) +); +INSERT INTO `t1` (`Id`) VALUES (1); +CREATE TABLE `t2` ( +`t1_Id` int(11) NOT NULL DEFAULT 0, +`col1` int(11) DEFAULT NULL, +UNIQUE KEY `col1` (`col1`) +); +INSERT INTO `t2` (`t1_Id`, `col1`) VALUES (1, NULL), (1, NULL); +SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL); +Id +1 +explain extended +SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 100.00 +1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t2 ref col1 col1 5 const 1 100.00 Using index condition; Using where +Warnings: +Note 1003 select 1 AS `Id` from (`test`.`t2`) where `test`.`t2`.`t1_Id` = 1 and `test`.`t2`.`col1` is null +DROP TABLE t1, t2; # End of 5.5 test # # MDEV-20109: Optimizer ignores distinct key created for materialized diff -Nru mariadb-10.3-10.3.18/mysql-test/main/subselect_sj.test mariadb-10.3-10.3.22/mysql-test/main/subselect_sj.test --- mariadb-10.3-10.3.18/mysql-test/main/subselect_sj.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/subselect_sj.test 2020-01-26 18:37:27.000000000 +0000 @@ -2940,6 +2940,32 @@ drop table t1,t2; + +--echo # +--echo # MDEV-13172: Wrong result / SELECT ... WHERE EXISTS ... (with UNIQUE Key) +--echo # + +CREATE TABLE `t1` ( + `Id` int(11) NOT NULL, + PRIMARY KEY (`Id`) +); + +INSERT INTO `t1` (`Id`) VALUES (1); + +CREATE TABLE `t2` ( + `t1_Id` int(11) NOT NULL DEFAULT 0, + `col1` int(11) DEFAULT NULL, + UNIQUE KEY `col1` (`col1`) +); + +INSERT INTO `t2` (`t1_Id`, `col1`) VALUES (1, NULL), (1, NULL); + +SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL); +explain extended +SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL); + +DROP TABLE t1, t2; + --echo # End of 5.5 test --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/subselect_sj2_mat.result mariadb-10.3-10.3.22/mysql-test/main/subselect_sj2_mat.result --- mariadb-10.3-10.3.18/mysql-test/main/subselect_sj2_mat.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/subselect_sj2_mat.result 2020-01-26 18:37:27.000000000 +0000 @@ -1855,18 +1855,18 @@ AND t3.id_product IN (SELECT id_product FROM t2 t2_4 WHERE t2_4.id_t2 = 34 OR t2_4.id_t2 = 23) AND t3.id_product IN (SELECT id_product FROM t2 t2_5 WHERE t2_5.id_t2 = 29 OR t2_5.id_t2 = 28 OR t2_5.id_t2 = 26); id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY ALL distinct_key NULL NULL NULL 12 -1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t2_2.id_product 1 Using where; Using index +1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using index +1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.id_product 1 Using index 1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 Using where 1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 Using where -1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 Using where +1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 Using where 1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 Using where +1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t1.id_product,const 1 Using where; Using index +1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 Using where 1 PRIMARY t5 ALL NULL NULL NULL NULL 18 Using where; Using join buffer (flat, BNL join) -1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t3.id_product,const 1 Using where; Using index -1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using where; Using index; Using join buffer (flat, BNL join) -3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12 Using where 5 MATERIALIZED t2_4 range id_t2,id_product id_t2 5 NULL 18 Using index condition; Using where 4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 32 Using index condition; Using where -6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 30 Using index condition; Using where +3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12 2 MATERIALIZED t2_1 ref id_t2,id_product id_t2 5 const 50 +6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 30 Using index condition; Using where drop table t1,t2,t3,t4,t5; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/subselect_sj_jcl6.result mariadb-10.3-10.3.22/mysql-test/main/subselect_sj_jcl6.result --- mariadb-10.3-10.3.18/mysql-test/main/subselect_sj_jcl6.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/subselect_sj_jcl6.result 2020-01-26 18:37:27.000000000 +0000 @@ -3270,6 +3270,32 @@ create table t2 (a2 varchar(25)) ; insert into t1 select 'xxx' from dual where 'xxx' in (select a2 from t2); drop table t1,t2; +# +# MDEV-13172: Wrong result / SELECT ... WHERE EXISTS ... (with UNIQUE Key) +# +CREATE TABLE `t1` ( +`Id` int(11) NOT NULL, +PRIMARY KEY (`Id`) +); +INSERT INTO `t1` (`Id`) VALUES (1); +CREATE TABLE `t2` ( +`t1_Id` int(11) NOT NULL DEFAULT 0, +`col1` int(11) DEFAULT NULL, +UNIQUE KEY `col1` (`col1`) +); +INSERT INTO `t2` (`t1_Id`, `col1`) VALUES (1, NULL), (1, NULL); +SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL); +Id +1 +explain extended +SELECT Id FROM t1 WHERE Id in (SELECT t1_Id FROM t2 WHERE t2.col1 IS NULL); +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 100.00 +1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 100.00 +2 MATERIALIZED t2 ref col1 col1 5 const 1 100.00 Using index condition; Using where +Warnings: +Note 1003 select 1 AS `Id` from (`test`.`t2`) where `test`.`t2`.`t1_Id` = 1 and `test`.`t2`.`col1` is null +DROP TABLE t1, t2; # End of 5.5 test # # MDEV-20109: Optimizer ignores distinct key created for materialized @@ -3501,8 +3527,8 @@ SELECT a FROM t1 t WHERE a IN (SELECT b FROM t1, t2 WHERE b = a) GROUP BY a HAVING a != 'z'; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY ALL distinct_key NULL NULL NULL 2 Using temporary; Using filesort -1 PRIMARY t ref idx_a idx_a 4 test.t2.b 2 Using index +1 PRIMARY t index idx_a idx_a 4 NULL 3 Using index +1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where 2 MATERIALIZED t1 ref idx_a idx_a 4 test.t2.b 2 Using index SELECT a FROM t1 t WHERE a IN (SELECT b FROM t1, t2 WHERE b = a) @@ -3515,8 +3541,8 @@ SELECT a FROM t1 t WHERE a IN (SELECT b FROM t1, t2 WHERE b = a) GROUP BY a HAVING a != 'z'; id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY ALL distinct_key NULL NULL NULL 2 Using temporary; Using filesort -1 PRIMARY t ref idx_a idx_a 4 test.t2.b 2 Using index +1 PRIMARY t index idx_a idx_a 4 NULL 3 Using index +1 PRIMARY eq_ref distinct_key distinct_key 4 func 1 2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where 2 MATERIALIZED t1 ref idx_a idx_a 4 test.t2.b 2 Using index SELECT a FROM t1 t WHERE a IN (SELECT b FROM t1, t2 WHERE b = a) diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sum_distinct-big.result mariadb-10.3-10.3.22/mysql-test/main/sum_distinct-big.result --- mariadb-10.3-10.3.18/mysql-test/main/sum_distinct-big.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sum_distinct-big.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,7 +1,5 @@ -DROP TABLE IF EXISTS t1, t2; set @save_tmp_table_size=@@tmp_table_size; set @save_max_heap_table_size=@@max_heap_table_size; -set @save_storage_engine=@@storage_engine; set storage_engine=MYISAM; CREATE TABLE t1 (id INTEGER); CREATE TABLE t2 (id INTEGER); @@ -126,35 +124,13 @@ DROP TABLE t2; SET @@tmp_table_size=@save_tmp_table_size; SET @@max_heap_table_size=@save_max_heap_table_size; -# -# Bug mdev-4311: COUNT(DISTINCT...) requiring a file for Unique -# (bug #68749) -# -set @save_storage_engine=@@storage_engine; -set storage_engine=INNODB; -CREATE TABLE t1 (id INTEGER) ENGINE=InnoDB; +# +# MDEV-4311: COUNT(DISTINCT...) requiring a file for UNIQUE (bug #68749) +# CREATE TABLE t2 (id INTEGER) ENGINE=InnoDB; -INSERT INTO t1 (id) VALUES (1), (1), (1),(1); -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 SELECT id+1 FROM t1; -INSERT INTO t1 SELECT id+2 FROM t1; -INSERT INTO t1 SELECT id+4 FROM t1; -INSERT INTO t1 SELECT id+8 FROM t1; -INSERT INTO t1 SELECT id+16 FROM t1; -INSERT INTO t1 SELECT id+32 FROM t1; -INSERT INTO t1 SELECT id+64 FROM t1; -INSERT INTO t1 SELECT id+128 FROM t1; -INSERT INTO t1 SELECT id+256 FROM t1; -INSERT INTO t1 SELECT id+512 FROM t1; -INSERT INTO t1 SELECT id+1024 FROM t1; -INSERT INTO t1 SELECT id+2048 FROM t1; -INSERT INTO t1 SELECT id+4096 FROM t1; -INSERT INTO t1 SELECT id+8192 FROM t1; -INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand(); +BEGIN; +INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a, seq_1_to_16384 b +ORDER BY b.seq*rand(); INSERT INTO t2 VALUE(NULL); # With default tmp_table_size / max_heap_table_size SELECT SQL_NO_CACHE count(DISTINCT id) sm FROM t2; @@ -176,5 +152,5 @@ SELECT SQL_NO_CACHE count(DISTINCT id) sm FROM t2; sm 16384 -DROP TABLE t1,t2; -set storage_engine=@save_storage_engine; +COMMIT; +DROP TABLE t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/sum_distinct-big.test mariadb-10.3-10.3.22/mysql-test/main/sum_distinct-big.test --- mariadb-10.3-10.3.18/mysql-test/main/sum_distinct-big.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/sum_distinct-big.test 2020-01-26 18:37:27.000000000 +0000 @@ -4,15 +4,11 @@ --source include/big_test.inc --source include/have_innodb.inc ---disable_warnings -DROP TABLE IF EXISTS t1, t2; ---enable_warnings +--source include/have_sequence.inc set @save_tmp_table_size=@@tmp_table_size; set @save_max_heap_table_size=@@max_heap_table_size; -set @save_storage_engine=@@storage_engine; - # # Test the case when distinct values doesn't fit in memory and # filesort is used (see uniques.cc:merge_walk) @@ -94,39 +90,14 @@ SET @@tmp_table_size=@save_tmp_table_size; SET @@max_heap_table_size=@save_max_heap_table_size; ---echo # ---echo # Bug mdev-4311: COUNT(DISTINCT...) requiring a file for Unique ---echo # (bug #68749) ---echo # - -set @save_storage_engine=@@storage_engine; -set storage_engine=INNODB; - -CREATE TABLE t1 (id INTEGER) ENGINE=InnoDB; +--echo # +--echo # MDEV-4311: COUNT(DISTINCT...) requiring a file for UNIQUE (bug #68749) +--echo # CREATE TABLE t2 (id INTEGER) ENGINE=InnoDB; -INSERT INTO t1 (id) VALUES (1), (1), (1),(1); -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 (id) SELECT id FROM t1; -INSERT INTO t1 SELECT id+1 FROM t1; -INSERT INTO t1 SELECT id+2 FROM t1; -INSERT INTO t1 SELECT id+4 FROM t1; -INSERT INTO t1 SELECT id+8 FROM t1; -INSERT INTO t1 SELECT id+16 FROM t1; -INSERT INTO t1 SELECT id+32 FROM t1; -INSERT INTO t1 SELECT id+64 FROM t1; -INSERT INTO t1 SELECT id+128 FROM t1; -INSERT INTO t1 SELECT id+256 FROM t1; -INSERT INTO t1 SELECT id+512 FROM t1; -INSERT INTO t1 SELECT id+1024 FROM t1; -INSERT INTO t1 SELECT id+2048 FROM t1; -INSERT INTO t1 SELECT id+4096 FROM t1; -INSERT INTO t1 SELECT id+8192 FROM t1; - -INSERT INTO t2 SELECT id FROM t1 ORDER BY id*rand(); +BEGIN; +INSERT INTO t2 SELECT b.seq FROM seq_1_to_128 a, seq_1_to_16384 b +ORDER BY b.seq*rand(); INSERT INTO t2 VALUE(NULL); --echo # With default tmp_table_size / max_heap_table_size @@ -147,7 +118,6 @@ --echo # Back to default tmp_table_size / max_heap_table_size SELECT SQL_NO_CACHE count(DISTINCT id) sm FROM t2; +COMMIT; -DROP TABLE t1,t2; - -set storage_engine=@save_storage_engine; +DROP TABLE t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/system_mysql_db.result mariadb-10.3-10.3.22/mysql-test/main/system_mysql_db.result --- mariadb-10.3-10.3.18/mysql-test/main/system_mysql_db.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/system_mysql_db.result 2020-01-26 18:37:27.000000000 +0000 @@ -190,14 +190,14 @@ Table Create Table servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', - `Host` char(64) NOT NULL DEFAULT '', + `Host` varchar(2048) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT 0, `Socket` char(64) NOT NULL DEFAULT '', `Wrapper` char(64) NOT NULL DEFAULT '', - `Owner` char(64) NOT NULL DEFAULT '', + `Owner` varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' show create table proc; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/system_mysql_db_fix40123.result mariadb-10.3-10.3.22/mysql-test/main/system_mysql_db_fix40123.result --- mariadb-10.3-10.3.18/mysql-test/main/system_mysql_db_fix40123.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/system_mysql_db_fix40123.result 2020-01-26 18:37:27.000000000 +0000 @@ -190,14 +190,14 @@ Table Create Table servers CREATE TABLE `servers` ( `Server_name` char(64) NOT NULL DEFAULT '', - `Host` char(64) NOT NULL DEFAULT '', + `Host` varchar(2048) NOT NULL DEFAULT '', `Db` char(64) NOT NULL DEFAULT '', `Username` char(80) NOT NULL DEFAULT '', `Password` char(64) NOT NULL DEFAULT '', `Port` int(4) NOT NULL DEFAULT 0, `Socket` char(64) NOT NULL DEFAULT '', `Wrapper` char(64) NOT NULL DEFAULT '', - `Owner` char(64) NOT NULL DEFAULT '', + `Owner` varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (`Server_name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table' show create table proc; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/table_value_constr.result mariadb-10.3-10.3.22/mysql-test/main/table_value_constr.result --- mariadb-10.3-10.3.18/mysql-test/main/table_value_constr.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/table_value_constr.result 2020-01-26 18:37:27.000000000 +0000 @@ -2586,3 +2586,16 @@ union ( values (5), (7), (1), (3), (4) order by 2 limit 2 ); ERROR 42S22: Unknown column '2' in 'order clause' +# +# MDEV-20229: view defined as select using +# CTE with named columns defined as TVC +# +create view v1 as with t(a) as (values (2), (1)) select a from t; +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 with t(a) as (values (2),(1))select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci +select * from v1; +a +2 +1 +drop view v1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/table_value_constr.test mariadb-10.3-10.3.22/mysql-test/main/table_value_constr.test --- mariadb-10.3-10.3.18/mysql-test/main/table_value_constr.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/table_value_constr.test 2020-01-26 18:37:27.000000000 +0000 @@ -1316,3 +1316,13 @@ ( values (5), (7), (1), (3), (4) limit 2 offset 1 ) union ( values (5), (7), (1), (3), (4) order by 2 limit 2 ); + +--echo # +--echo # MDEV-20229: view defined as select using +--echo # CTE with named columns defined as TVC +--echo # + +create view v1 as with t(a) as (values (2), (1)) select a from t; +show create view v1; +select * from v1; +drop view v1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/type_bit.test mariadb-10.3-10.3.22/mysql-test/main/type_bit.test --- mariadb-10.3-10.3.18/mysql-test/main/type_bit.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/type_bit.test 2020-01-26 18:37:27.000000000 +0000 @@ -262,7 +262,7 @@ drop table t1; # -# type was not properly initalized, which caused key_copy to fail +# type was not properly initialized, which caused key_copy to fail # create table t1(bit_field bit(2), int_field int, key a(bit_field)); diff -Nru mariadb-10.3-10.3.18/mysql-test/main/type_datetime.result mariadb-10.3-10.3.22/mysql-test/main/type_datetime.result --- mariadb-10.3-10.3.18/mysql-test/main/type_datetime.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/type_datetime.result 2020-01-26 18:37:27.000000000 +0000 @@ -1198,6 +1198,87 @@ DROP VIEW v1; DROP TABLE t1; # +# MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +# +CREATE TABLE t1 +( +id INT NOT NULL PRIMARY KEY, +id2 INT, +k TINYINT, +j INT, +t DATETIME, +KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'2019-12-13 10:09:59'), +(54,54,1,0,'2019-12-13 16:28:41'), +(55,54,1,0,'2019-12-13 16:29:10'), +(56,54,1,0,'2019-12-13 16:29:43'), +(57,54,1,0,'2019-12-13 16:30:16'), +(58,54,1,0,'2019-12-13 16:30:49'), +(59,54,1,0,'2019-12-13 16:31:23'), +(60,54,1,0,'2019-12-13 16:31:55'), +(61,54,1,0,'2019-12-13 16:32:28'), +(62,54,1,0,'2019-12-13 16:33:01'), +(63,54,1,0,'2019-12-13 16:33:34'), +(64,54,1,0,'2019-12-13 16:34:07'), +(65,54,1,0,'2019-12-13 16:34:40'), +(66,54,1,0,'2019-12-13 16:35:13'), +(67,54,1,0,'2019-12-13 16:35:46'), +(68,54,1,0,'2019-12-13 16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=max(t); +t +2019-12-13 10:09:59 +2019-12-13 16:28:41 +2019-12-13 16:29:10 +2019-12-13 16:29:43 +2019-12-13 16:30:16 +2019-12-13 16:30:49 +2019-12-13 16:31:23 +2019-12-13 16:31:55 +2019-12-13 16:32:28 +2019-12-13 16:33:01 +2019-12-13 16:33:34 +2019-12-13 16:34:07 +2019-12-13 16:34:40 +2019-12-13 16:35:13 +2019-12-13 16:35:46 +2019-12-13 16:36:19 +SELECT t FROM t1 WHERE id2=54 and j=0 and k=1 GROUP BY t HAVING t=max(t); +t +2019-12-13 10:09:59 +2019-12-13 16:28:41 +2019-12-13 16:29:10 +2019-12-13 16:29:43 +2019-12-13 16:30:16 +2019-12-13 16:30:49 +2019-12-13 16:31:23 +2019-12-13 16:31:55 +2019-12-13 16:32:28 +2019-12-13 16:33:01 +2019-12-13 16:33:34 +2019-12-13 16:34:07 +2019-12-13 16:34:40 +2019-12-13 16:35:13 +2019-12-13 16:35:46 +2019-12-13 16:36:19 +DROP TABLE t1; +CREATE TABLE t1 (pk INT); +CREATE VIEW v1 AS SELECT * FROM t1; +INSERT INTO t1 VALUES (1); +SELECT pk 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal +# +CREATE TABLE t1 (d DECIMAL(1,0) ZEROFILL); +CREATE TABLE t2 AS SELECT 0 MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2; +CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED); +CREATE TABLE t2 AS SELECT 0 MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (d DECIMAL(1,0) ZEROFILL); +CREATE TABLE t2 AS SELECT CAST(0 AS UNSIGNED) MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f` decimal(1,0) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2; +CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED); +CREATE TABLE t2 AS SELECT CAST(0 AS UNSIGNED) MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f` decimal(1,0) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1,t2; +# +# MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal +# +CREATE TABLE t1 (a DECIMAL(1,0) UNSIGNED); +INSERT INTO t1 VALUES (1.0),(2.0); +SELECT DISTINCT 1 MOD a FROM t1; +1 MOD a +0 +1 +CREATE TABLE t2 AS SELECT DISTINCT 1 MOD a AS f FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f` decimal(1,0) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2; +CREATE TABLE t1 (a DECIMAL(1,0) UNSIGNED); +INSERT INTO t1 VALUES (1.0),(2.0); +SELECT DISTINCT 1 MOD a FROM t1; +1 MOD a +0 +1 +CREATE TABLE t2 AS SELECT DISTINCT CAST(1 AS UNSIGNED) MOD a AS f FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f` decimal(1,0) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2; +# # End of 5.5 tests # # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/type_newdecimal.test mariadb-10.3-10.3.22/mysql-test/main/type_newdecimal.test --- mariadb-10.3-10.3.18/mysql-test/main/type_newdecimal.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/type_newdecimal.test 2020-01-26 18:37:27.000000000 +0000 @@ -1628,6 +1628,49 @@ DROP TABLE t1; --echo # +--echo # MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE .. SELECT with zerofilled decimal +--echo # + +CREATE TABLE t1 (d DECIMAL(1,0) ZEROFILL); +CREATE TABLE t2 AS SELECT 0 MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + +CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED); +CREATE TABLE t2 AS SELECT 0 MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE IF EXISTS t1,t2; + +CREATE TABLE t1 (d DECIMAL(1,0) ZEROFILL); +CREATE TABLE t2 AS SELECT CAST(0 AS UNSIGNED) MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + +CREATE TABLE t1 (d DECIMAL(1,0) UNSIGNED); +CREATE TABLE t2 AS SELECT CAST(0 AS UNSIGNED) MOD d AS f FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1,t2; + +--echo # +--echo # MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal +--echo # + +CREATE TABLE t1 (a DECIMAL(1,0) UNSIGNED); +INSERT INTO t1 VALUES (1.0),(2.0); +SELECT DISTINCT 1 MOD a FROM t1; +CREATE TABLE t2 AS SELECT DISTINCT 1 MOD a AS f FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + +CREATE TABLE t1 (a DECIMAL(1,0) UNSIGNED); +INSERT INTO t1 VALUES (1.0),(2.0); +SELECT DISTINCT 1 MOD a FROM t1; +CREATE TABLE t2 AS SELECT DISTINCT CAST(1 AS UNSIGNED) MOD a AS f FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + + +--echo # --echo # End of 5.5 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/type_time.result mariadb-10.3-10.3.22/mysql-test/main/type_time.result --- mariadb-10.3-10.3.18/mysql-test/main/type_time.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/type_time.result 2020-01-26 18:37:27.000000000 +0000 @@ -1246,6 +1246,72 @@ SET @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; set @@old_mode= @save_old_mode; # +# MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +# +CREATE OR REPLACE TABLE t1 +( +id INT NOT NULL PRIMARY KEY, +id2 INT, +k TINYINT, +j INT, +t TIME, +KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'10:09:59'), +(54,54,1,0,'16:28:41'), +(55,54,1,0,'16:29:10'), +(56,54,1,0,'16:29:43'), +(57,54,1,0,'16:30:16'), +(58,54,1,0,'16:30:49'), +(59,54,1,0,'16:31:23'), +(60,54,1,0,'16:31:55'), +(61,54,1,0,'16:32:28'), +(62,54,1,0,'16:33:01'), +(63,54,1,0,'16:33:34'), +(64,54,1,0,'16:34:07'), +(65,54,1,0,'16:34:40'), +(66,54,1,0,'16:35:13'), +(67,54,1,0,'16:35:46'), +(68,54,1,0,'16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=MAX(t); +t +10:09:59 +16:28:41 +16:29:10 +16:29:43 +16:30:16 +16:30:49 +16:31:23 +16:31:55 +16:32:28 +16:33:01 +16:33:34 +16:34:07 +16:34:40 +16:35:13 +16:35:46 +16:36:19 +SELECT t FROM t1 WHERE id2=54 AND j=0 AND k=1 GROUP BY t HAVING t=MAX(t); +t +10:09:59 +16:28:41 +16:29:10 +16:29:43 +16:30:16 +16:30:49 +16:31:23 +16:31:55 +16:32:28 +16:33:01 +16:33:34 +16:34:07 +16:34:40 +16:35:13 +16:35:46 +16:36:19 +DROP TABLE t1; +# # End of 10.1 tests # # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/type_time.test mariadb-10.3-10.3.22/mysql-test/main/type_time.test --- mariadb-10.3-10.3.18/mysql-test/main/type_time.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/type_time.test 2020-01-26 18:37:27.000000000 +0000 @@ -747,6 +747,40 @@ set @@old_mode= @save_old_mode; --echo # +--echo # MDEV-21319 COUNT(*) returns 1, actual SELECT returns no result in 10.3.21, but 1 result in 10.1.41 +--echo # + +CREATE OR REPLACE TABLE t1 +( + id INT NOT NULL PRIMARY KEY, + id2 INT, + k TINYINT, + j INT, + t TIME, + KEY k1 (id2,k,j,t) +); +INSERT INTO t1 VALUES +(53,54,1,0,'10:09:59'), +(54,54,1,0,'16:28:41'), +(55,54,1,0,'16:29:10'), +(56,54,1,0,'16:29:43'), +(57,54,1,0,'16:30:16'), +(58,54,1,0,'16:30:49'), +(59,54,1,0,'16:31:23'), +(60,54,1,0,'16:31:55'), +(61,54,1,0,'16:32:28'), +(62,54,1,0,'16:33:01'), +(63,54,1,0,'16:33:34'), +(64,54,1,0,'16:34:07'), +(65,54,1,0,'16:34:40'), +(66,54,1,0,'16:35:13'), +(67,54,1,0,'16:35:46'), +(68,54,1,0,'16:36:19'); +SELECT t FROM t1 GROUP BY t HAVING t=MAX(t); +SELECT t FROM t1 WHERE id2=54 AND j=0 AND k=1 GROUP BY t HAVING t=MAX(t); +DROP TABLE t1; + +--echo # --echo # End of 10.1 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/union_crash-714.result mariadb-10.3-10.3.22/mysql-test/main/union_crash-714.result --- mariadb-10.3-10.3.18/mysql-test/main/union_crash-714.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/union_crash-714.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,5 +1,7 @@ create table t1 (i tinyint); -set debug_dbug='+d,bug11747970_raise_error'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,bug11747970_raise_error'; insert into t1 (i) select i from t1 union select i from t1; ERROR 70100: Query execution was interrupted drop table t1; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/union_crash-714.test mariadb-10.3-10.3.22/mysql-test/main/union_crash-714.test --- mariadb-10.3-10.3.18/mysql-test/main/union_crash-714.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/union_crash-714.test 2020-01-26 18:37:27.000000000 +0000 @@ -3,7 +3,9 @@ # --source include/have_debug.inc create table t1 (i tinyint); -set debug_dbug='+d,bug11747970_raise_error'; +SET @saved_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,bug11747970_raise_error'; --error ER_QUERY_INTERRUPTED insert into t1 (i) select i from t1 union select i from t1; drop table t1; +SET debug_dbug= @saved_dbug; \ No newline at end of file diff -Nru mariadb-10.3-10.3.18/mysql-test/main/uniques_crash-7912.result mariadb-10.3-10.3.22/mysql-test/main/uniques_crash-7912.result --- mariadb-10.3-10.3.18/mysql-test/main/uniques_crash-7912.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/uniques_crash-7912.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -call mtr.add_suppression("Out of memory"); -set sql_mode=""; -drop table if exists t1,t2; -create table `t1` (`a` datetime not null) engine=InnoDB; -create table `t2` (`a` int not null) engine=innodb; -replace into t1 values (),(); -insert into t2 values(0); -set session sort_buffer_size = 1024*1024*1024*1024; -delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; -drop table t2; -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/uniques_crash-7912.test mariadb-10.3-10.3.22/mysql-test/main/uniques_crash-7912.test --- mariadb-10.3-10.3.18/mysql-test/main/uniques_crash-7912.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/uniques_crash-7912.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -# -# MDEV-7912 -# -# multitable delete with wrongly set sort_buffer_size crashes in merge_buffers - ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/windows.inc - -call mtr.add_suppression("Out of memory"); - -set sql_mode=""; ---disable_warnings -drop table if exists t1,t2; -create table `t1` (`a` datetime not null) engine=InnoDB; -create table `t2` (`a` int not null) engine=innodb; -replace into t1 values (),(); -insert into t2 values(0); -set session sort_buffer_size = 1024*1024*1024*1024; -#Either fail with EE_OUTOFMEMORY, or succeed ---error 0 , 5 -delete d2 from t2 as d1, t1 as d2 where d1.a <=> d2.a; ---enable_warnings - -drop table t2; -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/warnings_debug.result mariadb-10.3-10.3.22/mysql-test/main/warnings_debug.result --- mariadb-10.3-10.3.18/mysql-test/main/warnings_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/warnings_debug.result 2020-01-26 18:37:27.000000000 +0000 @@ -1,5 +1,6 @@ drop table if exists t1; create table t1 (a int primary key) engine=innodb; +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; INSERT INTO t1 VALUES (1); Warnings: @@ -8,3 +9,4 @@ Level Code Message Warning 1196 Some non-transactional changed tables couldn't be rolled back drop table t1; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/warnings_debug.test mariadb-10.3-10.3.22/mysql-test/main/warnings_debug.test --- mariadb-10.3-10.3.18/mysql-test/main/warnings_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/warnings_debug.test 2020-01-26 18:37:27.000000000 +0000 @@ -9,6 +9,7 @@ # Test that warnings produced during autocommit (after calling # set_ok_status()) are still reported to the client. +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; INSERT INTO t1 VALUES (1); # The warning will be shown automatically by mysqltest; there was a bug where @@ -17,3 +18,4 @@ SHOW WARNINGS; drop table t1; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/main/win.result mariadb-10.3-10.3.22/mysql-test/main/win.result --- mariadb-10.3-10.3.18/mysql-test/main/win.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/win.result 2020-01-26 18:37:27.000000000 +0000 @@ -3634,6 +3634,96 @@ 1 drop table t1; # +# MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data +# +CREATE TABLE t1 (i int); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x; +x +foo +drop table t1; +# +# MDEV-16579: Wrong result of query using DISTINCT COUNT(*) OVER (*) +# +CREATE TABLE t1 (i int) ; +INSERT INTO t1 VALUES (1),(0),(1),(2),(0),(1),(2),(1),(2); +SELECT DISTINCT COUNT(*) OVER (), MOD(MIN(i),2) FROM t1 GROUP BY i ; +COUNT(*) OVER () MOD(MIN(i),2) +3 0 +3 1 +drop table t1; +# +# MDEV-21318: Wrong results with window functions and implicit grouping +# +CREATE TABLE t1 (a INT); +# +# With empty const table +# The expected result here is 1, NULL +# +explain +SELECT row_number() over(), sum(1) FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found; Using temporary +SELECT row_number() over(), sum(1) FROM t1; +row_number() over() sum(1) +1 NULL +insert into t1 values (2); +# +# Const table has 1 row, but still impossible where +# The expected result here is 1, NULL +# +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables +SELECT row_number() over(), sum(1) FROM t1 where a=1; +row_number() over() sum(1) +1 NULL +# +# Impossible HAVING +# Empty result is expected +# +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING +SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; +row_number() over() sum(1) +# +# const table has 1 row, no impossible where +# The expected result here is 1, 2 +# +EXPLAIN SELECT row_number() over(), sum(a) FROM t1 where a=2; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary +SELECT row_number() over(), sum(a) FROM t1 where a=2; +row_number() over() sum(a) +1 2 +drop table t1; +# +# Impossible Where +# +create table t1(a int); +insert into t1 values (1); +# +# Expected result is NULL, 0, NULL +# +EXPLAIN SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +MAX(a) OVER () COUNT(a) abs(a) +NULL 0 NULL +# +# Expected result is 1, 0, NULL +# +EXPLAIN +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +MAX(1) OVER () COUNT(a) abs(a) +1 0 NULL +drop table t1; +# # End of 10.2 tests # # diff -Nru mariadb-10.3-10.3.18/mysql-test/main/win.test mariadb-10.3-10.3.22/mysql-test/main/win.test --- mariadb-10.3-10.3.18/mysql-test/main/win.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/main/win.test 2020-01-26 18:37:27.000000000 +0000 @@ -2342,6 +2342,91 @@ drop table t1; --echo # +--echo # MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data +--echo # + +CREATE TABLE t1 (i int); +INSERT INTO t1 VALUES (1),(2),(3); + +SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x; +drop table t1; + +--echo # +--echo # MDEV-16579: Wrong result of query using DISTINCT COUNT(*) OVER (*) +--echo # + +CREATE TABLE t1 (i int) ; +INSERT INTO t1 VALUES (1),(0),(1),(2),(0),(1),(2),(1),(2); + +SELECT DISTINCT COUNT(*) OVER (), MOD(MIN(i),2) FROM t1 GROUP BY i ; +drop table t1; + +--echo # +--echo # MDEV-21318: Wrong results with window functions and implicit grouping +--echo # + +CREATE TABLE t1 (a INT); + +--echo # +--echo # With empty const table +--echo # The expected result here is 1, NULL +--echo # + +explain +SELECT row_number() over(), sum(1) FROM t1; +SELECT row_number() over(), sum(1) FROM t1; + +insert into t1 values (2); + +--echo # +--echo # Const table has 1 row, but still impossible where +--echo # The expected result here is 1, NULL +--echo # + +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1; +SELECT row_number() over(), sum(1) FROM t1 where a=1; + +--echo # +--echo # Impossible HAVING +--echo # Empty result is expected +--echo # + +EXPLAIN SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; +SELECT row_number() over(), sum(1) FROM t1 where a=1 having 1=0; + +--echo # +--echo # const table has 1 row, no impossible where +--echo # The expected result here is 1, 2 +--echo # + +EXPLAIN SELECT row_number() over(), sum(a) FROM t1 where a=2; +SELECT row_number() over(), sum(a) FROM t1 where a=2; +drop table t1; + +--echo # +--echo # Impossible Where +--echo # + +create table t1(a int); +insert into t1 values (1); + +--echo # +--echo # Expected result is NULL, 0, NULL +--echo # +EXPLAIN SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +SELECT MAX(a) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; + +--echo # +--echo # Expected result is 1, 0, NULL +--echo # + +EXPLAIN +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; +SELECT MAX(1) OVER (), COUNT(a), abs(a) FROM t1 WHERE FALSE; + +drop table t1; + +--echo # --echo # End of 10.2 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/mysql-test-run.pl mariadb-10.3-10.3.22/mysql-test/mysql-test-run.pl --- mariadb-10.3-10.3.18/mysql-test/mysql-test-run.pl 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/mysql-test-run.pl 2020-01-26 18:37:27.000000000 +0000 @@ -324,7 +324,8 @@ my $opt_valgrind_mysqltest= 0; my @valgrind_args; my $opt_strace= 0; -my $opt_strace_client; +my $opt_stracer; +my $opt_client_strace = 0; my @strace_args; my $opt_valgrind_path; my $valgrind_reports= 0; @@ -1329,9 +1330,10 @@ 'debugger=s' => \$opt_debugger, 'boot-dbx' => \$opt_boot_dbx, 'client-debugger=s' => \$opt_client_debugger, - 'strace' => \$opt_strace, - 'strace-client' => \$opt_strace_client, - 'strace-option=s' => \@strace_args, + 'strace' => \$opt_strace, + 'strace-option=s' => \@strace_args, + 'client-strace' => \$opt_client_strace, + 'stracer=s' => \$opt_stracer, 'max-save-core=i' => \$opt_max_save_core, 'max-save-datadir=i' => \$opt_max_save_datadir, 'max-test-fail=i' => \$opt_max_test_fail, @@ -1927,7 +1929,7 @@ join(" ", @valgrind_args), "\""); } - if (@strace_args) + if (@strace_args || $opt_stracer) { $opt_strace=1; } @@ -3051,15 +3053,43 @@ # Save this test case information, so next can examine it $mysqld->{'started_tinfo'}= $tinfo; } + + # If wsrep is on, we need to wait until the first + # server starts and bootstraps the cluster before + # starting other servers. The bootsrap server in the + # configuration should always be the first which has + # wsrep_on=ON + if (wsrep_on($mysqld) && wsrep_is_bootstrap_server($mysqld)) + { + mtr_verbose("Waiting for wsrep bootstrap server to start"); + if ($mysqld->{WAIT}->($mysqld)) + { + return 1; + } + } } sub mysql_server_wait { - my ($mysqld) = @_; + my ($mysqld, $tinfo) = @_; - return not sleep_until_file_created($mysqld->value('pid-file'), + if (!sleep_until_file_created($mysqld->value('pid-file'), $opt_start_timeout, $mysqld->{'proc'}, - $warn_seconds); + $warn_seconds)) + { + $tinfo->{comment}= "Failed to start ".$mysqld->name() . "\n"; + return 1; + } + + if (wsrep_on($mysqld)) + { + mtr_verbose("Waiting for wsrep server " . $mysqld->name() . " to be ready"); + if (!wait_wsrep_ready($tinfo, $mysqld)) + { + return 1; + } + } + return 0; } sub create_config_file_for_extern { @@ -4606,6 +4636,8 @@ qr/missing DBUG_RETURN/, qr/Attempting backtrace/, qr/Assertion .* failed/, + qr/Sanitizer/, + qr/runtime error:/, ); # These are taken from the include/mtr_warnings.sql global suppression # list. They occur delayed, so they can be parsed during shutdown rather @@ -5498,12 +5530,12 @@ { delete $server->{'restart_opts'}; my $use_dynamic_option_switch= 0; - delete $server->{'restart_opts'}; + my $restart_opts = delete $server->{'restart_opts'} || []; if (!$use_dynamic_option_switch) { mtr_verbose_restart($server, "running with different options '" . join(" ", @{$extra_opts}) . "' != '" . - join(" ", @{$started_opts}) . "'" ); + join(" ", @{$started_opts}, @{$restart_opts}) . "'" ); return 1; } @@ -5593,6 +5625,118 @@ } } +# +# run_query_output +# +# Run a query against a server using mysql client. The output of +# the query will be written into outfile. +# +sub run_query_output { + my ($mysqld, $query, $outfile)= @_; + my $args; + + mtr_init_args(\$args); + mtr_add_arg($args, "--defaults-file=%s", $path_config_file); + mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld')); + mtr_add_arg($args, "--silent"); + mtr_add_arg($args, "--execute=%s", $query); + + my $res= My::SafeProcess->run + ( + name => "run_query_output -> ".$mysqld->name(), + path => $exe_mysql, + args => \$args, + output => $outfile, + error => $outfile + ); + + return $res +} + + +# +# wsrep_wait_ready +# +# Wait until the server has been joined to the cluster and is +# ready for operation. +# +# RETURN +# 1 Server is ready +# 0 Server didn't transition to ready state within start timeout +# +sub wait_wsrep_ready($$) { + my ($tinfo, $mysqld)= @_; + + my $sleeptime= 100; # Milliseconds + my $loops= ($opt_start_timeout * 1000) / $sleeptime; + + my $name= $mysqld->name(); + my $outfile= "$opt_vardir/tmp/$name.wsrep_ready"; + my $query= "SET SESSION wsrep_sync_wait = 0; + SELECT VARIABLE_NAME, VARIABLE_VALUE + FROM INFORMATION_SCHEMA.GLOBAL_STATUS + WHERE VARIABLE_NAME = 'wsrep_ready'"; + + for (my $loop= 1; $loop <= $loops; $loop++) + { + # Careful... if MTR runs with option 'verbose' then the + # file contains also SafeProcess verbose output + if (run_query_output($mysqld, $query, $outfile) == 0 && + mtr_grab_file($outfile) =~ /WSREP_READY\s+ON/) + { + unlink($outfile); + return 1; + } + mtr_milli_sleep($sleeptime); + } + + $tinfo->{logfile}= "WSREP did not transition to state READY"; + return 0; +} + +# +# wsrep_is_bootstrap_server +# +# Check if the server is the first one to be started in the +# cluster. +# +# RETURN +# 1 The server is a bootstrap server +# 0 The server is not a bootstrap server +# +sub wsrep_is_bootstrap_server($) { + my $mysqld= shift; + + my $cluster_address= $mysqld->if_exist('wsrep-cluster-address') || + $mysqld->if_exist('wsrep_cluster_address'); + if (defined $cluster_address) + { + return $cluster_address eq "gcomm://" || $cluster_address eq "'gcomm://'"; + } + return 0; +} + +# +# wsrep_on +# +# Check if wsrep has been enabled for a server. +# +# RETURN +# 1 Wsrep has been enabled +# 0 Wsrep is not enabled +# +sub wsrep_on($) { + my $mysqld= shift; + #check if wsrep_on= is set in configuration + if ($mysqld->if_exist('wsrep-on')) { + my $on= "".$mysqld->value('wsrep-on'); + if ($on eq "1" || $on eq "ON") { + return 1; + } + } + return 0; +} + # # start_servers @@ -5612,7 +5756,7 @@ for (all_servers()) { next unless $_->{WAIT} and started($_); - if ($_->{WAIT}->($_)) { + if ($_->{WAIT}->($_, $tinfo)) { $tinfo->{comment}= "Failed to start ".$_->name() . "\n"; return 1; } @@ -5721,14 +5865,6 @@ mtr_add_arg($args, "--non-blocking-api"); } - if ( $opt_strace_client ) - { - $exe= $opt_strace_client || "strace"; - mtr_add_arg($args, "-o"); - mtr_add_arg($args, "%s/log/mysqltest.strace", $opt_vardir); - mtr_add_arg($args, "$exe_mysqltest"); - } - mtr_add_arg($args, "--timer-file=%s/log/timer", $opt_vardir); if ( $opt_compress ) @@ -5794,6 +5930,17 @@ mtr_add_arg($args, "%s", $_) for @args_saved; } + # ---------------------------------------------------------------------- + # Prefix the strace options to the argument list. + # ---------------------------------------------------------------------- + if ( $opt_client_strace ) + { + my @args_saved = @$args; + mtr_init_args(\$args); + strace_arguments($args, \$exe, "mysqltest"); + mtr_add_arg($args, "%s", $_) for @args_saved; + } + if ($opt_force > 1) { mtr_add_arg($args, "--continue-on-error"); @@ -6118,16 +6265,17 @@ my $args= shift; my $exe= shift; my $mysqld_name= shift; + my $output= sprintf("%s/log/%s.strace", $path_vardir_trace, $mysqld_name); mtr_add_arg($args, "-f"); - mtr_add_arg($args, "-o%s/var/log/%s.strace", $glob_mysql_test_dir, $mysqld_name); + mtr_add_arg($args, "-o%s", $output); - # Add strace options, can be overridden by user + # Add strace options mtr_add_arg($args, '%s', $_) for (@strace_args); mtr_add_arg($args, $$exe); - $$exe= "strace"; + $$exe= $opt_stracer || "strace"; if ($exe_libtool) { @@ -6403,11 +6551,11 @@ Options for strace strace Run the "mysqld" executables using strace. Default - options are -f -o var/log/'mysqld-name'.strace - strace-option=ARGS Option to give strace, replaces default option(s), - strace-client=[path] Create strace output for mysqltest client, optionally - specifying name and path to the trace program to use. - Example: $0 --strace-client=ktrace + options are -f -o 'vardir'/log/'mysqld-name'.strace. + client-strace Trace the "mysqltest". + strace-option=ARGS Option to give strace, appends to existing options. + stracer= Specify name and path to the trace program to use. + Default is "strace". Example: $0 --stracer=ktrace. Misc options user=USER User for connecting to mysqld(default: $opt_user) Binary files /srv/release.debian.org/tmp/2aH5s_tqx7/mariadb-10.3-10.3.18/mysql-test/std_data/binlog_before_20574.bin and /srv/release.debian.org/tmp/3aMEIt4tLu/mariadb-10.3-10.3.22/mysql-test/std_data/binlog_before_20574.bin differ diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/include/binlog_index.inc mariadb-10.3-10.3.22/mysql-test/suite/binlog/include/binlog_index.inc --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/include/binlog_index.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/include/binlog_index.inc 2020-01-26 18:37:28.000000000 +0000 @@ -22,7 +22,7 @@ call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; -let $old=`select @@debug`; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; @@ -273,6 +273,6 @@ -- replace_regex /\.[\\\/]master/master/ SELECT @index; -eval SET SESSION debug_dbug="$old"; +SET @@SESSION.debug_dbug = @saved_dbug; --echo End of tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/include/binlog_ioerr.inc mariadb-10.3-10.3.22/mysql-test/suite/binlog/include/binlog_ioerr.inc --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/include/binlog_ioerr.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/include/binlog_ioerr.inc 2020-01-26 18:37:28.000000000 +0000 @@ -15,12 +15,13 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; INSERT INTO t1 VALUES(0); +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug='+d,fail_binlog_write_1'; --error ER_ERROR_ON_WRITE INSERT INTO t1 VALUES(1); --error ER_ERROR_ON_WRITE INSERT INTO t1 VALUES(2); -SET SESSION debug_dbug=''; +SET SESSION debug_dbug=@saved_dbug; INSERT INTO t1 VALUES(3); SELECT * FROM t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_index.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_index.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_index.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_index.result 2020-01-26 18:37:28.000000000 +0000 @@ -5,6 +5,7 @@ call mtr.add_suppression('Could not use .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; flush logs; flush logs; @@ -183,5 +184,5 @@ master-bin.000012 master-bin.000013 -SET SESSION debug_dbug=""; +SET @@SESSION.debug_dbug = @saved_dbug; End of tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_invalid_read_in_rotate.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_invalid_read_in_rotate.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_invalid_read_in_rotate.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_invalid_read_in_rotate.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,18 @@ +RESET MASTER; +call mtr.add_suppression("Error in Log_event::read_log_event*"); +call mtr.add_suppression("Replication event checksum verification failed while reading from a log file*"); +DROP TABLE /*! IF EXISTS*/ t1; +Warnings: +Note 1051 Unknown table 'test.t1' +CREATE TABLE `t1` ( +`col_int` int, +pk integer auto_increment, +`col_char_12_key` char(12), +`col_int_key` int, +`col_char_12` char(12), +primary key (pk), +key (`col_char_12_key` ), +key (`col_int_key` )) ENGINE=InnoDB; +INSERT /*! IGNORE */ INTO t1 VALUES (183173120, NULL, 'abcd', 1, 'efghijk'), (1, NULL, 'lmno', 2, 'p'); +ALTER TABLE `t1` ENABLE KEYS; +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_ioerr.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_ioerr.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_ioerr.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_ioerr.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,12 +2,13 @@ RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; INSERT INTO t1 VALUES(0); +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug='+d,fail_binlog_write_1'; INSERT INTO t1 VALUES(1); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") INSERT INTO t1 VALUES(2); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") -SET SESSION debug_dbug=''; +SET SESSION debug_dbug=@saved_dbug; INSERT INTO t1 VALUES(3); SELECT * FROM t1; a diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result 2020-01-26 18:37:28.000000000 +0000 @@ -327,6 +327,14 @@ INSERT INTO t2 SET b=1; UPDATE t1, t2 SET t1.a=10, t2.a=20; DROP TABLE t1,t2; +# +# MDEV-20591 Wrong Number of rows in mysqlbinlog output. +# +CREATE TABLE t1(c_char_utf8 CHAR(10) , +c_varchar_utf8 char(10) , +c_text_utf8 blob ); +INSERT into t1 values("B", "B", REPEAT("#", 2000)); +drop table t1; flush logs; INSERT INTO t1dec102 VALUES (-999.99); INSERT INTO t1dec102 VALUES (0); @@ -5274,6 +5282,47 @@ DROP TABLE `t1`,`t2` /* generated by server */ /*!*/; # at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-317 ddl +/*!100001 SET @@session.gtid_seq_no=317*//*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; +CREATE TABLE t1(c_char_utf8 CHAR(10) , +c_varchar_utf8 char(10) , +c_text_utf8 blob ) +/*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-318 +/*!100001 SET @@session.gtid_seq_no=318*//*!*/; +BEGIN +/*!*/; +# at # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Annotate_rows: +#Q> INSERT into t1 values("B", "B", REPEAT("#", 2000)) +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number # +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F +### INSERT INTO `test`.`t1` +### SET +### @1='B' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @2='B' /* STRING(10) meta=65034 nullable=1 is_null=0 */ +### @3='################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################' /* BLOB/TEXT meta=2 nullable=1 is_null=0 */ +# Number of rows: 1 +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; +COMMIT +/*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-319 ddl +/*!100001 SET @@session.gtid_seq_no=319*//*!*/; +# at # +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 +SET TIMESTAMP=1000000000/*!*/; +DROP TABLE `t1` /* generated by server */ +/*!*/; +# at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4 DELIMITER ; # End of log file @@ -5287,17 +5336,17 @@ # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 # at # -#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list [0-1-316] +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list [0-1-319] # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 # at # -#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-317 +#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-320 /*!100101 SET @@session.skip_parallel_replication=0*//*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=317*//*!*/; +/*!100001 SET @@session.gtid_seq_no=320*//*!*/; BEGIN /*!*/; # at # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_show_binlog_event_random_pos.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_show_binlog_event_random_pos.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_show_binlog_event_random_pos.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_show_binlog_event_random_pos.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,12 @@ +RESET MASTER; +call mtr.add_suppression("Error in Log_event::read_log_event*"); +call mtr.add_suppression("Replication event checksum verification failed while reading from a log file*"); +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 'test.t1' +CREATE TABLE t1 (c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255), c5 CHAR(255)); +INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); +INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); +UPDATE t1 SET c1=repeat('b',255); +INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_write_error.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_write_error.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/binlog_write_error.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/binlog_write_error.result 2020-01-26 18:37:28.000000000 +0000 @@ -12,92 +12,109 @@ # # Test injecting binlog write error when executing queries # +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; INSERT INTO t1 VALUES (1),(2),(3); +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; INSERT INTO t1 VALUES (4),(5),(6); INSERT INTO t1 VALUES (4),(5),(6); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; UPDATE t1 set a=a+1; UPDATE t1 set a=a+1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DELETE FROM t1; DELETE FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TRIGGER tr1; DROP TRIGGER tr1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; ALTER TABLE t1 ADD (b INT); ALTER TABLE t1 ADD (b INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE VIEW v1 AS SELECT a FROM t1; CREATE VIEW v1 AS SELECT a FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP VIEW v1; DROP VIEW v1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP PROCEDURE p1; DROP PROCEDURE p1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TABLE t1; DROP TABLE t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE FUNCTION f1() RETURNS INT return 1; CREATE FUNCTION f1() RETURNS INT return 1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP FUNCTION f1; DROP FUNCTION f1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE USER user1; CREATE USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP USER user1; DROP USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; # # Cleanup # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/read_only.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/read_only.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/read_only.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/read_only.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,128 @@ +# +# MDEV-17863 DROP TEMPORARY TABLE creates a transaction in +# binary log on read only server +# MDEV-19074 Improved read_only mode for slaves with +# gtid_strict_mode enabled +# +create user test@localhost; +grant CREATE, DROP, INSERT, SELECT on *.* to test@localhost; +create table t1 (a int) engine=myisam; +insert into t1 values (1),(2); +reset master; +set global read_only=1; +# Ensure that optimize and analyze doesn't log to binary log +connect con1,localhost,test,,test; +insert into t1 values(3); +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair Error The MariaDB server is running with the --read-only option so it cannot execute this statement +test.t1 repair error Corrupt +optimize table t1; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +# Ensure that using temporary tables is not logged +create temporary table tmp1 (a int) engine=myisam; +insert into tmp1 values (1),(2); +update tmp1 set a=10 where a=2; +delete from tmp1 where a=1; +create temporary table tmp2 select * from t1; +select * from tmp1; +a +10 +select * from tmp2; +a +1 +2 +create temporary table tmp3 like t1; +create or replace temporary table tmp3 like t1; +alter table tmp2 add column (b int); +select * from tmp2; +a b +1 NULL +2 NULL +insert into t1 select a+100 from tmp2; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +drop table tmp1,tmp2,tmp3; +# Clean up test connection +disconnect con1; +connection default; +# Execute some commands as root that should not be logged +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status Table is already up to date +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +# Changes to temporary tables created under readonly should not +# be logged +create temporary table tmp4 (a int) engine=myisam; +insert into tmp4 values (1),(2); +create temporary table tmp5 (a int) engine=myisam; +insert into tmp5 select * from tmp4; +alter table tmp5 add column (b int); +set global read_only=0; +insert into tmp4 values (3),(4); +insert into tmp5 values (10,3),(11,4); +select * from tmp4; +a +1 +2 +3 +4 +select * from tmp5; +a b +1 NULL +2 NULL +10 3 +11 4 +update tmp4 set a=10 where a=2; +delete from tmp4 where a=1; +create table t2 select * from tmp4; +alter table tmp5 add column (c int); +insert into tmp5 values (20,5,1),(21,5,2); +select * from tmp5; +a b c +1 NULL NULL +2 NULL NULL +10 3 NULL +11 4 NULL +20 5 1 +21 5 2 +insert into t1 select a+200 from tmp5; +select * from t1; +a +1 +2 +201 +202 +210 +211 +220 +221 +drop table tmp4,tmp5; +# Check what is logged. Only last create select and the insert...select's should be +# row-logged +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # create table t2 select * from tmp4 +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select a+200 from tmp5 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +# Clean up +drop user test@localhost; +drop table t1,t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/read_only_statement.result mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/read_only_statement.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/r/read_only_statement.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/r/read_only_statement.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,128 @@ +# +# MDEV-17863 DROP TEMPORARY TABLE creates a transaction in +# binary log on read only server +# MDEV-19074 Improved read_only mode for slaves with +# gtid_strict_mode enabled +# +create user test@localhost; +grant CREATE, DROP, INSERT, SELECT on *.* to test@localhost; +create table t1 (a int) engine=myisam; +insert into t1 values (1),(2); +reset master; +set global read_only=1; +# Ensure that optimize and analyze doesn't log to binary log +connect con1,localhost,test,,test; +insert into t1 values(3); +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair Error The MariaDB server is running with the --read-only option so it cannot execute this statement +test.t1 repair error Corrupt +optimize table t1; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +# Ensure that using temporary tables is not logged +create temporary table tmp1 (a int) engine=myisam; +insert into tmp1 values (1),(2); +update tmp1 set a=10 where a=2; +delete from tmp1 where a=1; +create temporary table tmp2 select * from t1; +select * from tmp1; +a +10 +select * from tmp2; +a +1 +2 +create temporary table tmp3 like t1; +create or replace temporary table tmp3 like t1; +alter table tmp2 add column (b int); +select * from tmp2; +a b +1 NULL +2 NULL +insert into t1 select a+100 from tmp2; +ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement +drop table tmp1,tmp2,tmp3; +# Clean up test connection +disconnect con1; +connection default; +# Execute some commands as root that should not be logged +optimize table t1; +Table Op Msg_type Msg_text +test.t1 optimize status Table is already up to date +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +# Changes to temporary tables created under readonly should not +# be logged +create temporary table tmp4 (a int) engine=myisam; +insert into tmp4 values (1),(2); +create temporary table tmp5 (a int) engine=myisam; +insert into tmp5 select * from tmp4; +alter table tmp5 add column (b int); +set global read_only=0; +insert into tmp4 values (3),(4); +insert into tmp5 values (10,3),(11,4); +select * from tmp4; +a +1 +2 +3 +4 +select * from tmp5; +a b +1 NULL +2 NULL +10 3 +11 4 +update tmp4 set a=10 where a=2; +delete from tmp4 where a=1; +create table t2 select * from tmp4; +alter table tmp5 add column (c int); +insert into tmp5 values (20,5,1),(21,5,2); +select * from tmp5; +a b c +1 NULL NULL +2 NULL NULL +10 3 NULL +11 4 NULL +20 5 1 +21 5 2 +insert into t1 select a+200 from tmp5; +select * from t1; +a +1 +2 +201 +202 +210 +211 +220 +221 +drop table tmp4,tmp5; +# Check what is logged. Only last create select and the insert...select's should be +# row-logged +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Query # # use `test`; CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) +master-bin.000001 # Annotate_rows # # create table t2 select * from tmp4 +master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Gtid # # BEGIN GTID #-#-# +master-bin.000001 # Annotate_rows # # insert into t1 select a+200 from tmp5 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # COMMIT +# Clean up +drop user test@localhost; +drop table t1,t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.combinations mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.combinations --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.combinations 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.combinations 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,5 @@ +[enable_checksum] +binlog_checksum=1 + +[disable_checksum] +binlog_checksum=0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.test mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_invalid_read_in_rotate.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,48 @@ +# ==== Purpose ==== +# +# Test verifies that reading binary log by using "SHOW BINLOG EVENTS" command +# from various random positions doesn't lead to crash. It should exit +# gracefully with appropriate error. +# +# ==== References ==== +# +# MDEV-18046:Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events + +--source include/have_log_bin.inc +--source include/have_innodb.inc + +RESET MASTER; + +call mtr.add_suppression("Error in Log_event::read_log_event*"); +call mtr.add_suppression("Replication event checksum verification failed while reading from a log file*"); + +DROP TABLE /*! IF EXISTS*/ t1; +CREATE TABLE `t1` ( +`col_int` int, +pk integer auto_increment, +`col_char_12_key` char(12), +`col_int_key` int, +`col_char_12` char(12), +primary key (pk), +key (`col_char_12_key` ), +key (`col_int_key` )) ENGINE=InnoDB; + +INSERT /*! IGNORE */ INTO t1 VALUES (183173120, NULL, 'abcd', 1, 'efghijk'), (1, NULL, 'lmno', 2, 'p'); + +--disable_warnings +ALTER TABLE `t1` ENABLE KEYS; +--enable_warnings + +--let $max_pos= query_get_value(SHOW MASTER STATUS,Position,1) +--let $pos= 1 +while ($pos <= $max_pos) +{ + --disable_query_log + --disable_result_log + --error 0,1220 + eval SHOW BINLOG EVENTS FROM $pos; + --inc $pos + --enable_result_log + --enable_query_log +} +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test 2020-01-26 18:37:28.000000000 +0000 @@ -438,6 +438,18 @@ UPDATE t1, t2 SET t1.a=10, t2.a=20; DROP TABLE t1,t2; +--echo # +--echo # MDEV-20591 Wrong Number of rows in mysqlbinlog output. +--echo # + +CREATE TABLE t1(c_char_utf8 CHAR(10) , + c_varchar_utf8 char(10) , + c_text_utf8 blob ); + +INSERT into t1 values("B", "B", REPEAT("#", 2000)); + +drop table t1; + flush logs; let $MYSQLD_DATADIR= `select @@datadir`; @@ -462,3 +474,4 @@ --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/ --error 1 --exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000002 2>&1 + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.combinations mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.combinations --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.combinations 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.combinations 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,5 @@ +[enable_checksum] +binlog_checksum=1 + +[disable_checksum] +binlog_checksum=0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.test mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/binlog_show_binlog_event_random_pos.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,37 @@ +# ==== Purpose ==== +# +# Test verifies that reading binary log by using "SHOW BINLOG EVENTS" command +# from various random positions doesn't lead to crash. It should exit +# gracefully with appropriate error. +# +# ==== References ==== +# +# MDEV-18046:Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events + +--source include/have_log_bin.inc +--source include/have_innodb.inc + +RESET MASTER; +call mtr.add_suppression("Error in Log_event::read_log_event*"); +call mtr.add_suppression("Replication event checksum verification failed while reading from a log file*"); + +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 CHAR(255), c2 CHAR(255), c3 CHAR(255), c4 CHAR(255), c5 CHAR(255)); +INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); +INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); +UPDATE t1 SET c1=repeat('b',255); +INSERT INTO t1 VALUES (repeat('a', 255), repeat('a', 255),repeat('a', 255),repeat('a', 255),repeat('a', 255)); +--let $max_pos= query_get_value(SHOW MASTER STATUS,Position,1) +--let $pos= 1 +while ($pos <= $max_pos) +{ + --disable_query_log + --disable_result_log + --error 0,1220 + eval SHOW BINLOG EVENTS FROM $pos LIMIT 100; + --inc $pos + --enable_result_log + --enable_query_log +} + +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/read_only.inc mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only.inc --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/read_only.inc 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only.inc 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,79 @@ +--echo # +--echo # MDEV-17863 DROP TEMPORARY TABLE creates a transaction in +--echo # binary log on read only server +--echo # MDEV-19074 Improved read_only mode for slaves with +--echo # gtid_strict_mode enabled +--echo # + +create user test@localhost; +grant CREATE, DROP, INSERT, SELECT on *.* to test@localhost; +create table t1 (a int) engine=myisam; +insert into t1 values (1),(2); +reset master; + +set global read_only=1; +--echo # Ensure that optimize and analyze doesn't log to binary log +connect (con1,localhost,test,,test); +--error ER_OPTION_PREVENTS_STATEMENT +insert into t1 values(3); +analyze table t1; +check table t1; +repair table t1; +--error ER_OPTION_PREVENTS_STATEMENT +optimize table t1; + +--echo # Ensure that using temporary tables is not logged +create temporary table tmp1 (a int) engine=myisam; +insert into tmp1 values (1),(2); +update tmp1 set a=10 where a=2; +delete from tmp1 where a=1; +create temporary table tmp2 select * from t1; +select * from tmp1; +select * from tmp2; +create temporary table tmp3 like t1; +create or replace temporary table tmp3 like t1; +alter table tmp2 add column (b int); +select * from tmp2; +--error ER_OPTION_PREVENTS_STATEMENT +insert into t1 select a+100 from tmp2; +drop table tmp1,tmp2,tmp3; + +--echo # Clean up test connection +disconnect con1; +connection default; + +--echo # Execute some commands as root that should not be logged +optimize table t1; +repair table t1; + +--echo # Changes to temporary tables created under readonly should not +--echo # be logged +create temporary table tmp4 (a int) engine=myisam; +insert into tmp4 values (1),(2); +create temporary table tmp5 (a int) engine=myisam; +insert into tmp5 select * from tmp4; +alter table tmp5 add column (b int); + +set global read_only=0; + +insert into tmp4 values (3),(4); +insert into tmp5 values (10,3),(11,4); +select * from tmp4; +select * from tmp5; +update tmp4 set a=10 where a=2; +delete from tmp4 where a=1; +create table t2 select * from tmp4; +alter table tmp5 add column (c int); +insert into tmp5 values (20,5,1),(21,5,2); +select * from tmp5; +insert into t1 select a+200 from tmp5; +select * from t1; +drop table tmp4,tmp5; + +--echo # Check what is logged. Only last create select and the insert...select's should be +--echo # row-logged +source include/show_binlog_events.inc; + +--echo # Clean up +drop user test@localhost; +drop table t1,t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/read_only.test mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/read_only.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,2 @@ +--source include/have_binlog_format_mixed_or_row.inc +--source read_only.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/read_only_statement.test mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only_statement.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog/t/read_only_statement.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog/t/read_only_statement.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,2 @@ +--source include/have_binlog_format_statement.inc +--source read_only.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_index.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_index.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_index.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_index.result 2020-01-26 18:37:28.000000000 +0000 @@ -5,6 +5,7 @@ call mtr.add_suppression('Could not use .*'); call mtr.add_suppression('MYSQL_BIN_LOG::purge_logs failed to clean registers before purging logs.'); flush tables; +SET @saved_dbug = @@SESSION.debug_dbug; RESET MASTER; flush logs; flush logs; @@ -183,5 +184,5 @@ master-bin.000012 master-bin.000013 -SET SESSION debug_dbug=""; +SET @@SESSION.debug_dbug = @saved_dbug; End of tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_ioerr.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_ioerr.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_ioerr.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_ioerr.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,12 +2,13 @@ RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; INSERT INTO t1 VALUES(0); +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION debug_dbug='+d,fail_binlog_write_1'; INSERT INTO t1 VALUES(1); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") INSERT INTO t1 VALUES(2); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") -SET SESSION debug_dbug=''; +SET SESSION debug_dbug=@saved_dbug; INSERT INTO t1 VALUES(3); SELECT * FROM t1; a diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,27 @@ +include/master-slave.inc +[connection master] +connection slave; +include/stop_slave.inc +connection master; +include/rpl_stop_server.inc [server_number=1] +# Data in binlog +# CREATE TABLE t1 (a INT); +# INSERT INTO t1 VALUES (1),(2),(3); +# REPLACE INTO t1 VALUES (4); +include/rpl_start_server.inc [server_number=1] +connection slave; +RESET SLAVE; +RESET MASTER; +CHANGE MASTER TO master_host='127.0.0.1', master_port=SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4; +include/start_slave.inc +DESC t1; +Field Type Null Key Default Extra +a int(11) YES NULL +SELECT * FROM t1 ORDER BY a; +a +1 +2 +3 +4 +DROP TABLE t1; +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.test mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_mdev_20574_old_binlog.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,46 @@ +# MDEV-20574 Position of events reported by mysqlbinlog is wrong with encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. +# Test replicating off old master. +# Test case Desc:- When new server reads the data from old server binlog which +# does not send START_ENCRYPTION_EVENT to slave. +# We simulate old master by copying in pre-generated binlog files from earlier +# server versions with encrypted binlog. +--source include/have_binlog_format_row.inc +--source include/master-slave.inc +--source include/have_innodb.inc + +--connection slave +--source include/stop_slave.inc + +--connection master +--let $datadir= `SELECT @@datadir` + +--let $rpl_server_number= 1 +--source include/rpl_stop_server.inc + +--remove_file $datadir/master-bin.000001 +--remove_file $datadir/master-bin.state +--echo # Data in binlog +--echo # CREATE TABLE t1 (a INT); +--echo # INSERT INTO t1 VALUES (1),(2),(3); +--echo # REPLACE INTO t1 VALUES (4); + +--copy_file $MYSQL_TEST_DIR/std_data/binlog_before_20574.bin $datadir/master-bin.000001 + +--let $rpl_server_number= 1 +--source include/rpl_start_server.inc + +--source include/wait_until_connected_again.inc +--save_master_pos + +--connection slave +RESET SLAVE; +RESET MASTER; +--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1 +eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4; +--source include/start_slave.inc +--sync_with_master +DESC t1; +SELECT * FROM t1 ORDER BY a; + +DROP TABLE t1; +--source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_row_annotate.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_row_annotate.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_row_annotate.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_row_annotate.result 2020-01-26 18:37:28.000000000 +0000 @@ -104,6 +104,9 @@ #010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # +#010909 4:46:40 server id # end_log_pos # Ignorable +# Ignorable event type 164 (Start_encryption) +# at # #010909 4:46:40 server id # end_log_pos # Gtid list [] # at # #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 @@ -342,6 +345,9 @@ #010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # +#010909 4:46:40 server id # end_log_pos # Ignorable +# Ignorable event type 164 (Start_encryption) +# at # #010909 4:46:40 server id # end_log_pos # Gtid list [] # at # #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 @@ -502,6 +508,9 @@ #010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup ROLLBACK/*!*/; # at # +#010909 4:46:40 server id # end_log_pos # Ignorable +# Ignorable event type 164 (Start_encryption) +# at # #010909 4:46:40 server id # end_log_pos # Gtid list [] # at # #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_write_error.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_write_error.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/binlog_write_error.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/binlog_write_error.result 2020-01-26 18:37:28.000000000 +0000 @@ -12,92 +12,109 @@ # # Test injecting binlog write error when executing queries # +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; INSERT INTO t1 VALUES (1),(2),(3); +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; INSERT INTO t1 VALUES (4),(5),(6); INSERT INTO t1 VALUES (4),(5),(6); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; UPDATE t1 set a=a+1; UPDATE t1 set a=a+1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DELETE FROM t1; DELETE FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TRIGGER tr1; DROP TRIGGER tr1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; ALTER TABLE t1 ADD (b INT); ALTER TABLE t1 ADD (b INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE VIEW v1 AS SELECT a FROM t1; CREATE VIEW v1 AS SELECT a FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP VIEW v1; DROP VIEW v1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP PROCEDURE p1; DROP PROCEDURE p1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TABLE t1; DROP TABLE t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE FUNCTION f1() RETURNS INT return 1; CREATE FUNCTION f1() RETURNS INT return 1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP FUNCTION f1; DROP FUNCTION f1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE USER user1; CREATE USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP USER user1; DROP USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; # # Cleanup # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/mysqlbinlog.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/mysqlbinlog.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/mysqlbinlog.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/mysqlbinlog.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,3 +4,4 @@ REPLACE INTO t1 VALUES (4); DROP TABLE t1; FLUSH LOGS; +FOUND 1 /Ignorable event type 164.*/ in binlog_enc.sql diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/mysqlbinlog.test mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/mysqlbinlog.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/mysqlbinlog.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/mysqlbinlog.test 2020-01-26 18:37:28.000000000 +0000 @@ -17,5 +17,8 @@ exec $MYSQL_BINLOG $local > $outfile; exec $MYSQL_BINLOG $local --force-read >> $outfile; exec $MYSQL_BINLOG $remote >> $outfile; +--let SEARCH_FILE= $outfile +--let SEARCH_PATTERN= Ignorable event type 164.* +--source include/search_pattern_in_file.inc remove_file $outfile; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_checksum.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_checksum.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_checksum.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_checksum.result 2020-01-26 18:37:28.000000000 +0000 @@ -76,6 +76,7 @@ set @@global.binlog_checksum = CRC32; insert into t1 values (1) /* will not be applied on slave due to simulation */; connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; include/wait_for_slave_io_error.inc [errno=1236] @@ -83,15 +84,16 @@ select count(*) as zero from t1; zero 0 -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; connection slave; include/start_slave.inc connection master; set @@global.master_verify_checksum = 1; +set @save_dbug = @@session.debug_dbug; set @@session.debug_dbug='d,simulate_checksum_test_failure'; show binlog events; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error -set @@session.debug_dbug=''; +SET debug_dbug= @save_dbug; set @@global.master_verify_checksum = default; connection slave; connection slave; @@ -99,10 +101,11 @@ connection master; create table t2 (a int); connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave io_thread; include/wait_for_slave_io_error.inc [errno=1595,1913] -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; start slave io_thread; include/wait_for_slave_param.inc [Read_Master_Log_Pos] set @@global.slave_sql_verify_checksum = 1; @@ -110,7 +113,7 @@ start slave sql_thread; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Error initializing relay log position: I/O error reading event at position 4' -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; include/start_slave.inc connection master; connection slave; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_corruption.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_corruption.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_corruption.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_corruption.result 2020-01-26 18:37:28.000000000 +0000 @@ -13,6 +13,7 @@ CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c VARCHAR(100)); include/stop_slave.inc # 2. Corruption in master binlog and SHOW BINLOG EVENTS +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; SHOW BINLOG EVENTS; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error @@ -30,23 +31,24 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set"; connection slave; START SLAVE IO_THREAD; -include/wait_for_slave_io_error.inc [errno=1595,1913] +include/wait_for_slave_io_error.inc [errno=1595,1743] connection master; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network connection slave; +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; -include/wait_for_slave_io_error.inc [errno=1595,1913] +include/wait_for_slave_io_error.inc [errno=1595,1743] SET GLOBAL debug_dbug="-d,corrupt_queue_event"; # 6. Slave. Corruption in relay log SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # 7. Seek diff for tables on master and slave connection slave; include/start_slave.inc @@ -55,9 +57,8 @@ include/diff_tables.inc [master:test.t1, slave:test.t1] # 8. Clean up connection master; -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; connection slave; -SET GLOBAL debug_dbug= ""; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_incident.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_incident.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_incident.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_incident.result 2020-01-26 18:37:28.000000000 +0000 @@ -14,6 +14,7 @@ 1 2 3 +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,incident_database_resync_on_replace,*'; REPLACE INTO t1 VALUES (4); SELECT * FROM t1; @@ -22,6 +23,7 @@ 2 3 4 +set @@global.debug_dbug = @saved_dbug; connection slave; call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occurred on the master.* 1590"); include/wait_for_slave_sql_error.inc [errno=1590] diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,12 +4,13 @@ stop slave; reset slave; connection slave; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave.* thread initialization"); -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; connection slave; reset slave; SET GLOBAL init_slave= "garbage"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_parallel.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_parallel.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel.result 2020-01-26 18:37:28.000000000 +0000 @@ -1513,7 +1513,7 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10000; ANALYZE TABLE t2; @@ -1522,7 +1522,7 @@ INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; a b 120 0 @@ -1544,7 +1544,7 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @old_server_id= @@SESSION.server_id; SET SESSION server_id= 100; @@ -1554,7 +1554,7 @@ INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; a b 130 0 @@ -1580,7 +1580,7 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_mdev8031'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; INSERT INTO t3 VALUES (203, 1); @@ -1601,7 +1601,7 @@ UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 3 @@ -1631,11 +1631,11 @@ SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10210; Omit long queries that cause relaylog rotations and transaction retries... -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 6 @@ -1655,7 +1655,7 @@ 204 7 205 5 include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; include/start_slave.inc *** MDEV-8725: Assertion on ROLLBACK statement in the binary log *** diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,50 @@ +include/master-slave.inc +[connection master] +connection server_2; +include/stop_slave.inc +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; +SET @old_debug= @@GLOBAL.debug_dbug; +SET GLOBAL slave_parallel_mode='optimistic'; +SET GLOBAL slave_parallel_threads= 3; +CHANGE MASTER TO master_use_gtid=slave_pos; +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +include/start_slave.inc +connection server_1; +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=InnoDB; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,; +BEGIN; +INSERT INTO t1 VALUES (32); +connection server_1; +INSERT INTO t1 VALUES (32); +connection server_2; +SET GLOBAL debug_dbug="+d,hold_worker_on_schedule"; +SET debug_sync="debug_sync_action SIGNAL reached_pause WAIT_FOR continue_worker"; +connection server_1; +SET gtid_seq_no=100; +INSERT INTO t1 VALUES (33); +connection server_2; +SET debug_sync='now WAIT_FOR reached_pause'; +connection server_1; +INSERT INTO t1 VALUES (34); +connection server_2; +connection con_temp2; +COMMIT; +connection server_2; +include/stop_slave.inc +include/assert.inc [table t1 should have zero rows where a>32] +SELECT * FROM t1 WHERE a>32; +a +DELETE FROM t1 WHERE a=32; +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +SET GLOBAL slave_parallel_mode=@old_parallel_mode; +SET GLOBAL debug_dbug=@old_debug; +SET DEBUG_SYNC= 'RESET'; +include/start_slave.inc +connection server_1; +DROP TABLE t1; +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.test mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.test --- mariadb-10.3-10.3.18/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--source suite/rpl/include/rpl_parallel_ignored_errors.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/r/func_misc.result mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/func_misc.result --- mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/r/func_misc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/func_misc.result 2020-01-26 18:37:28.000000000 +0000 @@ -32,7 +32,7 @@ 1 1 'Error1: ' || SQLCODE || ' ' || SQLERRM -Error1: 0 normal, successful completition +Error1: 0 normal, successful completion CALL p1('xxx'); 'Error2: ' || SQLCODE || ' ' || SQLERRM Error2: 1064 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 @@ -40,7 +40,7 @@ 1 1 'Error1: ' || SQLCODE || ' ' || SQLERRM -Error1: 0 normal, successful completition +Error1: 0 normal, successful completion DROP PROCEDURE p1; # # SQLCODE and SQLERRM hidden by local variables @@ -219,7 +219,7 @@ Exception|1329 No data - zero rows fetched, selected, or processed SELECT f2() FROM DUAL; f2() -Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition +Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion DROP TABLE t1; DROP FUNCTION f2; DROP FUNCTION f1; @@ -246,7 +246,7 @@ Exception|1329 No data - zero rows fetched, selected, or processed SELECT f2() FROM DUAL; f2() -Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition +Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion DROP TABLE t1; DROP FUNCTION f2; DROP FUNCTION f1; @@ -274,7 +274,7 @@ $$ SELECT f2() FROM DUAL; f2() -Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition +Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion DROP FUNCTION f2; DROP PROCEDURE p1; DROP TABLE t1; @@ -299,7 +299,7 @@ $$ SELECT f2() FROM DUAL; f2() -Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition +Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion DROP FUNCTION f2; DROP PROCEDURE p1; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/r/sp-goto-debug.result mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/sp-goto-debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/r/sp-goto-debug.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/sp-goto-debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,236 @@ +SET sql_mode=ORACLE; +# +# MDEV-20667 Server crash on pop_cursor +# +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CURSOR cur1 IS SELECT a FROM t1 ; +BEGIN +GOTO iac_err; +END; +END; +END IF; +IF 1=1 THEN +GOTO iac_err; +END IF; +<< iac_err >> +RETURN; +END// +SHOW PROCEDURE CODE p1; +Pos Instruction +0 jump_if_not 5(5) 1 = 2 +1 cpush cur1@0 +2 jump 3 +3 cpop 1 +4 jump 7 +5 jump_if_not 7(7) 1 = 1 +6 jump 7 +7 preturn +DROP PROCEDURE p1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CURSOR cur1 IS SELECT a FROM t1 ; +BEGIN +GOTO iac_err; +END; +END; +END IF; +IF 1=1 THEN +GOTO iac_err; +END IF; +<< iac_err >> +RETURN ; +END// +SHOW PROCEDURE CODE p1; +Pos Instruction +0 jump_if_not 5(5) 1 = 2 +1 cpush cur1@0 +2 jump 3 +3 cpop 1 +4 jump 7 +5 jump_if_not 7(7) 1 = 1 +6 jump 7 +7 preturn +DROP PROCEDURE p1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CURSOR cur1 IS SELECT a FROM t1 ; +BEGIN +GOTO iac_err; +END; +END; +END IF; +GOTO iac_err; +<< iac_err >> +RETURN ; +END// +SHOW PROCEDURE CODE p1; +Pos Instruction +0 jump_if_not 5(5) 1 = 2 +1 cpush cur1@0 +2 jump 3 +3 cpop 1 +4 jump 5 +5 preturn +DROP PROCEDURE p1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=1 THEN +DECLARE +CURSOR cur2 IS SELECT 'cur2' FROM DUAL; +BEGIN +SELECT 'cur2'; +IF 1=1 THEN +DECLARE +CURSOR cur3 IS SELECT 'cur3' FROM DUAL; +BEGIN +SELECT 'cur3'; +IF 1=1 THEN +DECLARE +CURSOR cur4 IS SELECT 'cur4' FROM DUAL; +BEGIN +SELECT 'cur4'; +GOTO ret; +END; +END IF; +GOTO ret; +END; +END IF; +GOTO ret; +END; +END IF; +<> +RETURN; +END; +// +SHOW PROCEDURE CODE p1; +Pos Instruction +0 jump_if_not 15(15) 1 = 1 +1 cpush cur2@0 +2 stmt 0 "SELECT 'cur2'" +3 jump_if_not 13(13) 1 = 1 +4 cpush cur3@1 +5 stmt 0 "SELECT 'cur3'" +6 jump_if_not 11(11) 1 = 1 +7 cpush cur4@2 +8 stmt 0 "SELECT 'cur4'" +9 cpop 3 +10 jump 15 +11 cpop 2 +12 jump 15 +13 cpop 1 +14 jump 15 +15 preturn +DROP PROCEDURE p1; +CREATE PROCEDURE p1(lab VARCHAR(32)) IS +BEGIN +IF 1=1 THEN +DECLARE +CURSOR cur2 IS SELECT 'cur2' FROM DUAL; +BEGIN +IF 1=1 THEN +DECLARE +CURSOR cur3 IS SELECT 'cur3' FROM DUAL; +BEGIN +IF 1=1 THEN +DECLARE +CURSOR cur4 IS SELECT 'cur4' FROM DUAL; +BEGIN +IF lab = 'cur4' THEN +SELECT 'goto from cur4' AS comment; +GOTO ret; +END IF; +END; +END IF; +IF lab = 'cur3' THEN +SELECT 'goto from cur3' AS comment; +GOTO ret; +END IF; +END; +END IF; +IF lab = 'cur2' THEN +SELECT 'goto from cur2' AS comment; +GOTO ret; +END IF; +END; +END IF; +<> +RETURN; +END; +// +SHOW PROCEDURE CODE p1; +Pos Instruction +0 jump_if_not 21(21) 1 = 1 +1 cpush cur2@0 +2 jump_if_not 16(16) 1 = 1 +3 cpush cur3@1 +4 jump_if_not 11(11) 1 = 1 +5 cpush cur4@2 +6 jump_if_not 10(10) lab@0 = 'cur4' +7 stmt 0 "SELECT 'goto from cur4' AS comment" +8 cpop 3 +9 jump 21 +10 cpop 1 +11 jump_if_not 15(15) lab@0 = 'cur3' +12 stmt 0 "SELECT 'goto from cur3' AS comment" +13 cpop 2 +14 jump 21 +15 cpop 1 +16 jump_if_not 20(20) lab@0 = 'cur2' +17 stmt 0 "SELECT 'goto from cur2' AS comment" +18 cpop 1 +19 jump 21 +20 cpop 1 +21 preturn +CALL p1(''); +CALL p1('cur2'); +comment +goto from cur2 +CALL p1('cur3'); +comment +goto from cur3 +CALL p1('cur4'); +comment +goto from cur4 +DROP PROCEDURE p1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1; +BEGIN +GOTO iac_err; +END; +END; +END IF; +IF 1=1 THEN +GOTO iac_err; +END IF; +<> +RETURN; +END// +SHOW PROCEDURE CODE p1; +Pos Instruction +0 jump_if_not 9(9) 1 = 2 +1 hpush_jump 4 0 CONTINUE +2 stmt 31 "SET @x2 = 1" +3 hreturn 0 +4 hpop 1 +5 jump 11 +6 jump 11 +7 hpop 1 +8 jump 9 +9 jump_if_not 11(11) 1 = 1 +10 jump 11 +11 preturn +DROP PROCEDURE p1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/r/sp-goto.result mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/sp-goto.result --- mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/r/sp-goto.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/r/sp-goto.result 2020-01-26 18:37:28.000000000 +0000 @@ -832,3 +832,82 @@ 15 DROP TRIGGER trg1; DROP TABLE t1; +# +# MDEV-20667 Server crash on pop_cursor +# +CREATE TABLE t1 (a VARCHAR(6)); +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CURSOR cur1 IS SELECT a FROM t1 ; +BEGIN +GOTO iac_err; +END; +END; +END IF; +IF 1=1 THEN +GOTO iac_err; +END IF; +<< iac_err >> +RETURN; +END// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CURSOR cur1 IS SELECT a FROM t1 ; +BEGIN +GOTO iac_err; +END; +END; +END IF; +IF 1=1 THEN +GOTO iac_err; +END IF; +<< iac_err >> +RETURN ; +END// +CALL p1; +DROP PROCEDURE p1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CURSOR cur1 IS SELECT a FROM t1 ; +BEGIN +GOTO iac_err; +END; +END; +END IF; +GOTO iac_err; +<< iac_err >> +RETURN ; +END// +CALL p1; +DROP PROCEDURE p1; +CREATE PROCEDURE p1() IS +BEGIN +IF 1=2 THEN +BEGIN +DECLARE +CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1; +BEGIN +GOTO iac_err; +END; +END; +END IF; +IF 1=1 THEN +GOTO iac_err; +END IF; +<> +RETURN; +END// +CALL p1; +DROP PROCEDURE p1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/t/sp-goto-debug.test mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/t/sp-goto-debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/t/sp-goto-debug.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/t/sp-goto-debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,178 @@ +-- source include/have_debug.inc + +SET sql_mode=ORACLE; + +--echo # +--echo # MDEV-20667 Server crash on pop_cursor +--echo # + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CURSOR cur1 IS SELECT a FROM t1 ; + BEGIN + GOTO iac_err; + END; + END; + END IF; + IF 1=1 THEN + GOTO iac_err; + END IF; +<< iac_err >> + RETURN; +END// +DELIMITER ;// +SHOW PROCEDURE CODE p1; +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CURSOR cur1 IS SELECT a FROM t1 ; + BEGIN + GOTO iac_err; + END; + END; + END IF; + IF 1=1 THEN + GOTO iac_err; + END IF; +<< iac_err >> + RETURN ; +END// +DELIMITER ;// +SHOW PROCEDURE CODE p1; +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CURSOR cur1 IS SELECT a FROM t1 ; + BEGIN + GOTO iac_err; + END; + END; + END IF; + GOTO iac_err; +<< iac_err >> + RETURN ; +END// +DELIMITER ;// +SHOW PROCEDURE CODE p1; +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=1 THEN + DECLARE + CURSOR cur2 IS SELECT 'cur2' FROM DUAL; + BEGIN + SELECT 'cur2'; + IF 1=1 THEN + DECLARE + CURSOR cur3 IS SELECT 'cur3' FROM DUAL; + BEGIN + SELECT 'cur3'; + IF 1=1 THEN + DECLARE + CURSOR cur4 IS SELECT 'cur4' FROM DUAL; + BEGIN + SELECT 'cur4'; + GOTO ret; + END; + END IF; + GOTO ret; + END; + END IF; + GOTO ret; + END; + END IF; +<> + RETURN; +END; +// +DELIMITER ;// +SHOW PROCEDURE CODE p1; +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1(lab VARCHAR(32)) IS +BEGIN + IF 1=1 THEN + DECLARE + CURSOR cur2 IS SELECT 'cur2' FROM DUAL; + BEGIN + IF 1=1 THEN + DECLARE + CURSOR cur3 IS SELECT 'cur3' FROM DUAL; + BEGIN + IF 1=1 THEN + DECLARE + CURSOR cur4 IS SELECT 'cur4' FROM DUAL; + BEGIN + IF lab = 'cur4' THEN + SELECT 'goto from cur4' AS comment; + GOTO ret; + END IF; + END; + END IF; + IF lab = 'cur3' THEN + SELECT 'goto from cur3' AS comment; + GOTO ret; + END IF; + END; + END IF; + IF lab = 'cur2' THEN + SELECT 'goto from cur2' AS comment; + GOTO ret; + END IF; + END; + END IF; +<> + RETURN; +END; +// +DELIMITER ;// +SHOW PROCEDURE CODE p1; +CALL p1(''); +CALL p1('cur2'); +CALL p1('cur3'); +CALL p1('cur4'); +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1; + BEGIN + GOTO iac_err; + END; + END; + END IF; + IF 1=1 THEN + GOTO iac_err; + END IF; +<> + RETURN; +END// +DELIMITER ;// +SHOW PROCEDURE CODE p1; +DROP PROCEDURE p1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/t/sp-goto.test mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/t/sp-goto.test --- mariadb-10.3-10.3.18/mysql-test/suite/compat/oracle/t/sp-goto.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/compat/oracle/t/sp-goto.test 2020-01-26 18:37:28.000000000 +0000 @@ -869,4 +869,100 @@ insert into t1 values (null); SELECT * FROM t1; DROP TRIGGER trg1; -DROP TABLE t1; \ No newline at end of file +DROP TABLE t1; + + +--echo # +--echo # MDEV-20667 Server crash on pop_cursor +--echo # + +CREATE TABLE t1 (a VARCHAR(6)); +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CURSOR cur1 IS SELECT a FROM t1 ; + BEGIN + GOTO iac_err; + END; + END; + END IF; + IF 1=1 THEN + GOTO iac_err; + END IF; +<< iac_err >> + RETURN; +END// +DELIMITER ;// +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CURSOR cur1 IS SELECT a FROM t1 ; + BEGIN + GOTO iac_err; + END; + END; + END IF; + IF 1=1 THEN + GOTO iac_err; + END IF; +<< iac_err >> + RETURN ; +END// +DELIMITER ;// +CALL p1; +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CURSOR cur1 IS SELECT a FROM t1 ; + BEGIN + GOTO iac_err; + END; + END; + END IF; + GOTO iac_err; +<< iac_err >> + RETURN ; +END// +DELIMITER ;// +CALL p1; +DROP PROCEDURE p1; + + +DELIMITER //; +CREATE PROCEDURE p1() IS +BEGIN + IF 1=2 THEN + BEGIN + DECLARE + CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1; + BEGIN + GOTO iac_err; + END; + END; + END IF; + IF 1=1 THEN + GOTO iac_err; + END IF; +<> + RETURN; +END// +DELIMITER ;// +CALL p1; +DROP PROCEDURE p1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/encryption/disabled.def mariadb-10.3-10.3.22/mysql-test/suite/encryption/disabled.def --- mariadb-10.3-10.3.18/mysql-test/suite/encryption/disabled.def 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/encryption/disabled.def 2020-01-26 18:37:28.000000000 +0000 @@ -12,4 +12,3 @@ innodb_scrub : MDEV-8139 scrubbing does not work reliably innodb_scrub_background : MDEV-8139 scrubbing does not work reliably -innodb-redo-badkey : MDEV-13893/MDEV-12699 fix recovery of corrupted pages diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/encryption/r/innodb-redo-badkey.result mariadb-10.3-10.3.22/mysql-test/suite/encryption/r/innodb-redo-badkey.result --- mariadb-10.3-10.3.18/mysql-test/suite/encryption/r/innodb-redo-badkey.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/encryption/r/innodb-redo-badkey.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,9 +1,10 @@ call mtr.add_suppression("Plugin 'file_key_management'"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file .*test/t[1-4]\\.ibd cannot be decrypted"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test/t[1-4]\\.ibd' cannot be decrypted"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); -call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); -call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]"); +call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[12] page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]"); +call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*"); call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); # Restart mysqld --file-key-management-filename=keys2.txt diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/encryption/t/innodb-redo-badkey.test mariadb-10.3-10.3.22/mysql-test/suite/encryption/t/innodb-redo-badkey.test --- mariadb-10.3-10.3.18/mysql-test/suite/encryption/t/innodb-redo-badkey.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/encryption/t/innodb-redo-badkey.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,10 +5,11 @@ call mtr.add_suppression("Plugin 'file_key_management'"); call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file .*test/t[1-4]\\.ibd cannot be decrypted"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test/t[1-4]\\.ibd' cannot be decrypted"); call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]"); -call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t1\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); -call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t1 page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]"); +call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[12] page \\[page id: space=[1-9][0-9]*, page number=[0-9]*\\]"); +call mtr.add_suppression("InnoDB: Failed to read file '.*' at offset .*"); call mtr.add_suppression("InnoDB: Plugin initialization aborted"); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed"); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx.result mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx.result --- mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx.result 2020-01-26 18:37:28.000000000 +0000 @@ -2283,6 +2283,22 @@ connection master; CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:SLAVE_PORT/federated/t1'; ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: '' hostname: '127.0.0.1' +# +# MDEV-21049 Segfault in create federatedx table with empty hostname +# +connection master; +CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED +CONNECTION='mysql://root@:SLAVE_PORT/federated/t1'; +ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: 'root' hostname: 'localhost' +connection slave; +CREATE TABLE federated.t1(x int); +connection master; +CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED +CONNECTION='mysql://root@:SLAVE_PORT/federated/t1'; +DROP TABLE federated.t1; +connection slave; +DROP TABLE federated.t1; +connection default; connection master; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx.test mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx.test --- mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx.test 2020-01-26 18:37:28.000000000 +0000 @@ -2010,4 +2010,25 @@ --error ER_CANT_CREATE_FEDERATED_TABLE eval CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1'; +--echo # +--echo # MDEV-21049 Segfault in create federatedx table with empty hostname +--echo # +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +--error ER_CANT_CREATE_FEDERATED_TABLE +eval CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED + CONNECTION='mysql://root@:$SLAVE_MYPORT/federated/t1'; + +connection slave; +CREATE TABLE federated.t1(x int); +connection master; +--replace_result $SLAVE_MYPORT SLAVE_PORT +eval CREATE TABLE federated.t1 (x int) ENGINE=FEDERATED + CONNECTION='mysql://root@:$SLAVE_MYPORT/federated/t1'; + +DROP TABLE federated.t1; +connection slave; +DROP TABLE federated.t1; +connection default; + source include/federated_cleanup.inc; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx_versioning.result mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx_versioning.result --- mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx_versioning.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx_versioning.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,14 +4,14 @@ row_end SYS_TYPE as row end invisible, period for system_time (row_start, row_end)) with system versioning; -create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test2/t1'; +create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t1'; show create table tf; Table Create Table tf CREATE TABLE `tf` ( `x` int(11) DEFAULT NULL, `row_start` SYS_TYPE NOT NULL INVISIBLE DEFAULT 0, `row_end` SYS_TYPE NOT NULL INVISIBLE DEFAULT 0 -) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:MASTER_MYPORT/test2/t1' +) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:MASTER_MYPORT/test/t1' # INSERT insert into t1 values (1); select * from tf; @@ -57,7 +57,7 @@ row_end SYS_TYPE as row end invisible, period for system_time (row_start, row_end)) with system versioning; -create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test2/t2'; +create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:MASTER_MYPORT/test/t2'; insert t2f (id, y) values (1, 2); replace t2f (id, y) values (1, 3); select *, check_row(row_start, row_end) from t2 for system_time all @@ -96,3 +96,5 @@ id y check_row(row_start, row_end) 2 2 HISTORICAL ROW 2 22 CURRENT ROW +drop view vt1; +drop tables t1, t2, t2f, tf; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx_versioning.test mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx_versioning.test --- mariadb-10.3-10.3.18/mysql-test/suite/federated/federatedx_versioning.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/federated/federatedx_versioning.test 2020-01-26 18:37:28.000000000 +0000 @@ -11,7 +11,7 @@ period for system_time (row_start, row_end)) with system versioning; --replace_result $MASTER_MYPORT MASTER_MYPORT -eval create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test2/t1'; +eval create or replace table tf engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t1'; --replace_result $MASTER_MYPORT MASTER_MYPORT $sys_datatype_expl SYS_TYPE "'0000-00-00 00:00:00.000000'" 0 show create table tf; --echo # INSERT @@ -45,7 +45,7 @@ period for system_time (row_start, row_end)) with system versioning; --replace_result $MASTER_MYPORT MASTER_MYPORT -eval create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test2/t2'; +eval create or replace table t2f engine=FEDERATED connection='mysql://root@127.0.0.1:$MASTER_MYPORT/test/t2'; insert t2f (id, y) values (1, 2); replace t2f (id, y) values (1, 3); select *, check_row(row_start, row_end) from t2 for system_time all @@ -72,4 +72,7 @@ select *, check_row(row_start, row_end) from t2 for system_time all order by y; +drop view vt1; +drop tables t1, t2, t2f, tf; + --source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_basics_mixed.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_basics_mixed.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_basics_mixed.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_basics_mixed.result 2020-01-26 18:37:28.000000000 +0000 @@ -337,7 +337,7 @@ SELECT * FROM information_schema.schema_privileges WHERE table_schema = 'information_schema'; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -CREATE VIEW db_datadict.v2 AS +CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE FROM information_schema.tables WHERE table_schema = 'db_datadict'; SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_check_constraint.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_check_constraint.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_check_constraint.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_check_constraint.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -# -# MDEV-17323: Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS to 10.2 -# -CREATE user boo1; -GRANT select,create,alter,drop on foo.* to boo1; -SHOW GRANTS for boo1; -Grants for boo1@% -GRANT USAGE ON *.* TO 'boo1'@'%' -GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO 'boo1'@'%' -CREATE user boo2; -create database foo; -CONNECT con1,localhost, boo1,, foo; -SET check_constraint_checks=1; -CREATE TABLE t0 -( -t int, check (t>32) # table constraint -) ENGINE=myisam; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -ALTER TABLE t0 -ADD CONSTRAINT CHK_t0_t CHECK(t<100); -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_t0_t t0 `t` < 100 -def foo CONSTRAINT_1 t0 `t` > 32 -ALTER TABLE t0 -DROP CONSTRAINT CHK_t0_t; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -ALTER TABLE t0 -ADD CONSTRAINT CHECK(t<50); -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -CREATE TABLE t1 -( t int CHECK(t>2), # field constraint -tt int, -CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints -CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint -) ENGINE=InnoDB; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_tt t1 `tt` < 100 -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo t t1 `t` > 2 -ALTER TABLE t1 -DROP CONSTRAINT CHK_tt; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo t t1 `t` > 2 -CREATE TABLE t2 -( -name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint -start_date DATE, -end_date DATE, -CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint -)ENGINE=Innodb; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_dates t2 `start_date` is null -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo name t2 char_length(`name`) > 2 -def foo t t1 `t` > 2 -ALTER TABLE t1 -ADD CONSTRAINT CHK_new_ CHECK(t>tt); -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_dates t2 `start_date` is null -def foo CHK_new_ t1 `t` > `tt` -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo name t2 char_length(`name`) > 2 -def foo t t1 `t` > 2 -CREATE TABLE t3 -( -a int, -b int check (b>0), # field constraint named 'b' -CONSTRAINT b check (b>10) # table constraint -) ENGINE=InnoDB; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def foo CHK_dates t2 `start_date` is null -def foo CHK_new_ t1 `t` > `tt` -def foo CONSTRAINT_1 t0 `t` > 32 -def foo CONSTRAINT_1 t1 `tt` > 32 -def foo CONSTRAINT_2 t0 `t` < 50 -def foo CONSTRAINT_2 t1 `tt` < 50 -def foo b t3 `b` > 0 -def foo b t3 `b` > 10 -def foo name t2 char_length(`name`) > 2 -def foo t t1 `t` > 2 -disconnect con1; -CONNECT con2, localhost, boo2,, test; -SELECT * from information_schema.check_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -disconnect con2; -CONNECT con1, localhost, boo1,,foo; -DROP TABLE t0; -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP DATABASE foo; -disconnect con1; -connection default; -DROP USER boo1; -DROP USER boo2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_check_constraints.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_check_constraints.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_check_constraints.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_check_constraints.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,144 +1,147 @@ # # MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS # -set check_constraint_checks=1; -use test; -create table t0 +CREATE user boo1; +GRANT select,create,alter,drop on foo.* to boo1; +SHOW GRANTS for boo1; +Grants for boo1@% +GRANT USAGE ON *.* TO 'boo1'@'%' +GRANT SELECT, CREATE, DROP, ALTER ON `foo`.* TO 'boo1'@'%' +CREATE user boo2; +create database foo; +CONNECT con1,localhost, boo1,, foo; +SET check_constraint_checks=1; +CREATE TABLE t0 ( t int, check (t>32) # table constraint ) ENGINE=myisam; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 ALTER TABLE t0 ADD CONSTRAINT CHK_t0_t CHECK(t<100); -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_t0_t -TABLE_NAME t0 -CHECK_CLAUSE `t` < 100 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CHK_t0_t `t` < 100 +def foo t0 CONSTRAINT_1 `t` > 32 ALTER TABLE t0 DROP CONSTRAINT CHK_t0_t; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +ALTER TABLE t0 +ADD CONSTRAINT CHECK(t<50); +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 CREATE TABLE t1 ( t int CHECK(t>2), # field constraint -tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint +tt int, +CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints +CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint ) ENGINE=InnoDB; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_tt -TABLE_NAME t1 -CHECK_CLAUSE `tt` < 100 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CHK_tt `tt` < 100 +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 ALTER TABLE t1 DROP CONSTRAINT CHK_tt; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 -create table t2 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +CREATE TABLE t2 ( name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint start_date DATE, end_date DATE, CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint )ENGINE=Innodb; -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME name -TABLE_NAME t2 -CHECK_CLAUSE char_length(`name`) > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_dates -TABLE_NAME t2 -CHECK_CLAUSE `start_date` is null -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +def foo t2 CHK_dates `start_date` is null +def foo t2 name char_length(`name`) > 2 ALTER TABLE t1 ADD CONSTRAINT CHK_new_ CHECK(t>tt); -SELECT * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME name -TABLE_NAME t2 -CHECK_CLAUSE char_length(`name`) > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_dates -TABLE_NAME t2 -CHECK_CLAUSE `start_date` is null -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME t -TABLE_NAME t1 -CHECK_CLAUSE `t` > 2 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CONSTRAINT_1 -TABLE_NAME t0 -CHECK_CLAUSE `t` > 32 -CONSTRAINT_CATALOG def -CONSTRAINT_SCHEMA test -CONSTRAINT_NAME CHK_new_ -TABLE_NAME t1 -CHECK_CLAUSE `t` > `tt` -create table t3 +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CHK_new_ `t` > `tt` +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +def foo t2 CHK_dates `start_date` is null +def foo t2 name char_length(`name`) > 2 +CREATE TABLE t3 ( a int, b int check (b>0), # field constraint named 'b' CONSTRAINT b check (b>10) # table constraint ) ENGINE=InnoDB; -select * from information_schema.check_constraints order by check_clause; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE -def test name t2 char_length(`name`) > 2 -def test b t3 `b` > 0 -def test b t3 `b` > 10 -def test CHK_dates t2 `start_date` is null -def test t t1 `t` > 2 -def test CONSTRAINT_1 t0 `t` > 32 -def test CHK_new_ t1 `t` > `tt` -drop table t0; -drop table t1; -drop table t2; -drop table t3; +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def foo t0 CONSTRAINT_1 `t` > 32 +def foo t0 CONSTRAINT_2 `t` < 50 +def foo t1 CHK_new_ `t` > `tt` +def foo t1 CONSTRAINT_1 `tt` > 32 +def foo t1 CONSTRAINT_2 `tt` < 50 +def foo t1 t `t` > 2 +def foo t2 CHK_dates `start_date` is null +def foo t2 name char_length(`name`) > 2 +def foo t3 b `b` > 0 +def foo t3 b `b` > 10 +disconnect con1; +CONNECT con2, localhost, boo2,, test; +SELECT * from information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +disconnect con2; +CONNECT con1, localhost, boo1,,foo; +DROP TABLE t0; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP DATABASE foo; +disconnect con1; +connection default; +DROP USER boo1; +DROP USER boo2; +# +# MDEV-18440: Information_schema.check_constraints possible data leak +# +CREATE USER foo; +CREATE DATABASE db; +USE db; +CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0)); +INSERT INTO t1 VALUES (1, 2), (2, 3); +GRANT SELECT (a) ON t1 TO foo; +SHOW GRANTS FOR foo; +Grants for foo@% +GRANT USAGE ON *.* TO 'foo'@'%' +GRANT SELECT (a) ON `db`.`t1` TO 'foo'@'%' +SELECT * FROM information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +def db t1 CONSTRAINT_1 `b` > 0 +CONNECT con1,localhost, foo,, db; +SELECT a FROM t1; +a +1 +2 +SELECT * FROM information_schema.check_constraints; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE +connection default; +DROP USER foo; +DROP DATABASE db; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_is.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_is.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_is.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_is.result 2020-01-26 18:37:28.000000000 +0000 @@ -26,9 +26,9 @@ def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) select NEVER NULL def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL -def information_schema CHECK_CONSTRAINTS TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select NEVER NULL def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double select NEVER NULL @@ -564,8 +564,8 @@ NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64) NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result 2020-01-26 18:37:28.000000000 +0000 @@ -26,9 +26,9 @@ def information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(3) NEVER NULL def information_schema CHECK_CONSTRAINTS CHECK_CLAUSE 5 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG 1 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL -def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA 2 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL -def information_schema CHECK_CONSTRAINTS TABLE_NAME 4 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL +def information_schema CHECK_CONSTRAINTS TABLE_NAME 3 '' NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) NEVER NULL def information_schema CLIENT_STATISTICS ACCESS_DENIED 22 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema CLIENT_STATISTICS BINLOG_BYTES_WRITTEN 9 0 NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL def information_schema CLIENT_STATISTICS BUSY_TIME 5 0 NO double NULL NULL 21 NULL NULL NULL NULL double NEVER NULL @@ -564,8 +564,8 @@ NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHECK_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CHECK_CONSTRAINTS CHECK_CLAUSE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema CLIENT_STATISTICS CLIENT varchar 64 192 utf8 utf8_general_ci varchar(64) NULL information_schema CLIENT_STATISTICS TOTAL_CONNECTIONS bigint NULL NULL NULL NULL bigint(21) diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_mysql.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_mysql.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_mysql.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_mysql.result 2020-01-26 18:37:28.000000000 +0000 @@ -175,8 +175,8 @@ def mysql roles_mapping Role 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL def mysql roles_mapping User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI select,insert,update,references NEVER NULL def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL -def mysql servers Host 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL -def mysql servers Owner 9 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL +def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) select,insert,update,references NEVER NULL +def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references NEVER NULL def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NEVER NULL def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) select,insert,update,references NEVER NULL def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NEVER NULL @@ -518,14 +518,14 @@ 3.0000 mysql roles_mapping Role char 80 240 utf8 utf8_bin char(80) 3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Host varchar 2048 6144 utf8 utf8_general_ci varchar(2048) 3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Username char 80 240 utf8 utf8_general_ci char(80) 3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64) NULL mysql servers Port int NULL NULL NULL NULL int(4) 3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Owner varchar 512 1536 utf8 utf8_general_ci varchar(512) NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6) 1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql slow_log query_time time NULL NULL NULL NULL time(6) diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result 2020-01-26 18:37:28.000000000 +0000 @@ -161,8 +161,8 @@ def mysql roles_mapping Role 3 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL def mysql roles_mapping User 2 '' NO char 80 240 NULL NULL NULL utf8 utf8_bin char(80) PRI NEVER NULL def mysql servers Db 3 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL -def mysql servers Host 2 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL -def mysql servers Owner 9 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL +def mysql servers Host 2 '' NO varchar 2048 6144 NULL NULL NULL utf8 utf8_general_ci varchar(2048) NEVER NULL +def mysql servers Owner 9 '' NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) NEVER NULL def mysql servers Password 5 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) NEVER NULL def mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL NULL int(4) NEVER NULL def mysql servers Server_name 1 '' NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) PRI NEVER NULL @@ -501,14 +501,14 @@ 3.0000 mysql roles_mapping Role char 80 240 utf8 utf8_bin char(80) 3.0000 mysql roles_mapping Admin_option enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Host varchar 2048 6144 utf8 utf8_general_ci varchar(2048) 3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Username char 80 240 utf8 utf8_general_ci char(80) 3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64) NULL mysql servers Port int NULL NULL NULL NULL int(4) 3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Owner varchar 512 1536 utf8 utf8_general_ci varchar(512) NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp(6) 1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql slow_log query_time time NULL NULL NULL NULL time(6) diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_tables_mysql.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_tables_mysql.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_tables_mysql.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_tables_mysql.result 2020-01-26 18:37:28.000000000 +0000 @@ -516,7 +516,7 @@ TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result 2020-01-26 18:37:28.000000000 +0000 @@ -516,7 +516,7 @@ TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -1305,7 +1305,7 @@ TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT DYNAMIC_OR_PAGE TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/t/is_basics_mixed.test mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_basics_mixed.test --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/t/is_basics_mixed.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_basics_mixed.test 2020-01-26 18:37:28.000000000 +0000 @@ -281,8 +281,9 @@ # 2. This user (testuser1) is also able to GRANT the SELECT privilege # on this VIEW to another user (testuser2). # 3. The other user (testuser2) must be able to SELECT on this VIEW -# but gets a different result set than testuser1. -CREATE VIEW db_datadict.v2 AS +# but gets a different result set than testuser1, if the view +# has SQL SECURITY INVOKER. +CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE FROM information_schema.tables WHERE table_schema = 'db_datadict'; SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/t/is_check_constraint.test mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_check_constraint.test --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/t/is_check_constraint.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_check_constraint.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ ---source include/have_innodb.inc ---source include/not_embedded.inc ---echo # ---echo # MDEV-17323: Backport INFORMATION_SCHEMA.CHECK_CONSTRAINTS to 10.2 ---echo # -CREATE user boo1; -GRANT select,create,alter,drop on foo.* to boo1; -SHOW GRANTS for boo1; -CREATE user boo2; -create database foo; -# Connect with user boo1 -CONNECT(con1,localhost, boo1,, foo); - -SET check_constraint_checks=1; -CREATE TABLE t0 -( - t int, check (t>32) # table constraint -) ENGINE=myisam; ---sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t0 -ADD CONSTRAINT CHK_t0_t CHECK(t<100); ---sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t0 -DROP CONSTRAINT CHK_t0_t; ---sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t0 -ADD CONSTRAINT CHECK(t<50); ---sorted_result -SELECT * from information_schema.check_constraints; - -CREATE TABLE t1 -( t int CHECK(t>2), # field constraint - tt int, - CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints - CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint -) ENGINE=InnoDB; - --sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t1 -DROP CONSTRAINT CHK_tt; ---sorted_result -SELECT * from information_schema.check_constraints; - -CREATE TABLE t2 -( -name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint -start_date DATE, -end_date DATE, -CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint -)ENGINE=Innodb; - --sorted_result -SELECT * from information_schema.check_constraints; - -ALTER TABLE t1 -ADD CONSTRAINT CHK_new_ CHECK(t>tt); ---sorted_result -SELECT * from information_schema.check_constraints; - -# Create table with same field and table check constraint name -CREATE TABLE t3 -( -a int, -b int check (b>0), # field constraint named 'b' -CONSTRAINT b check (b>10) # table constraint -) ENGINE=InnoDB; - --sorted_result -SELECT * from information_schema.check_constraints; - -DISCONNECT con1; -CONNECT(con2, localhost, boo2,, test); - --sorted_result -SELECT * from information_schema.check_constraints; - -DISCONNECT con2; -CONNECT(con1, localhost, boo1,,foo); -DROP TABLE t0; -DROP TABLE t1; -DROP TABLE t2; -DROP TABLE t3; -DROP DATABASE foo; - -DISCONNECT con1; ---CONNECTION default -DROP USER boo1; -DROP USER boo2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/t/is_check_constraints.test mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_check_constraints.test --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/t/is_check_constraints.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/t/is_check_constraints.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,69 +1,118 @@ --source include/have_innodb.inc +--source include/not_embedded.inc --echo # --echo # MDEV-14474: Create INFORMATION_SCHEMA.CHECK_CONSTRAINTS --echo # -set check_constraint_checks=1; +CREATE user boo1; +GRANT select,create,alter,drop on foo.* to boo1; +SHOW GRANTS for boo1; +CREATE user boo2; +create database foo; +# Connect with user boo1 +CONNECT(con1,localhost, boo1,, foo); -use test; -create table t0 +SET check_constraint_checks=1; +CREATE TABLE t0 ( t int, check (t>32) # table constraint ) ENGINE=myisam; - ---vertical_results -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t0 ADD CONSTRAINT CHK_t0_t CHECK(t<100); - -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t0 DROP CONSTRAINT CHK_t0_t; +--sorted_result +SELECT * from information_schema.check_constraints; -SELECT * from information_schema.check_constraints order by check_clause; +ALTER TABLE t0 +ADD CONSTRAINT CHECK(t<50); +--sorted_result +SELECT * from information_schema.check_constraints; CREATE TABLE t1 ( t int CHECK(t>2), # field constraint - tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint + tt int, + CONSTRAINT CHECK (tt > 32), CONSTRAINT CHECK (tt <50),# autogenerated names table constraints + CONSTRAINT CHK_tt CHECK(tt<100) # named table constraint ) ENGINE=InnoDB; - -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t1 DROP CONSTRAINT CHK_tt; +--sorted_result +SELECT * from information_schema.check_constraints; -SELECT * from information_schema.check_constraints order by check_clause; - -create table t2 +CREATE TABLE t2 ( name VARCHAR(30) CHECK(CHAR_LENGTH(name)>2), #field constraint start_date DATE, end_date DATE, CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint )ENGINE=Innodb; - -SELECT * from information_schema.check_constraints order by check_clause; +--sorted_result +SELECT * from information_schema.check_constraints; ALTER TABLE t1 ADD CONSTRAINT CHK_new_ CHECK(t>tt); - -SELECT * from information_schema.check_constraints order by check_clause; - +--sorted_result +SELECT * from information_schema.check_constraints; # Create table with same field and table check constraint name -create table t3 +CREATE TABLE t3 ( a int, b int check (b>0), # field constraint named 'b' CONSTRAINT b check (b>10) # table constraint ) ENGINE=InnoDB; +--sorted_result +SELECT * from information_schema.check_constraints; + +DISCONNECT con1; +CONNECT(con2, localhost, boo2,, test); +--sorted_result +SELECT * from information_schema.check_constraints; + +DISCONNECT con2; +CONNECT(con1, localhost, boo1,,foo); +DROP TABLE t0; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP DATABASE foo; + +DISCONNECT con1; +--CONNECTION default +DROP USER boo1; +DROP USER boo2; + +--echo # +--echo # MDEV-18440: Information_schema.check_constraints possible data leak +--echo # + +CREATE USER foo; +CREATE DATABASE db; +USE db; +CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0)); +INSERT INTO t1 VALUES (1, 2), (2, 3); +GRANT SELECT (a) ON t1 TO foo; + +SHOW GRANTS FOR foo; +--sorted_result +SELECT * FROM information_schema.check_constraints; + +CONNECT(con1,localhost, foo,, db); +SELECT a FROM t1; +--sorted_result +SELECT * FROM information_schema.check_constraints; ---horizontal_results -select * from information_schema.check_constraints order by check_clause; +--CONNECTION default -drop table t0; -drop table t1; -drop table t2; -drop table t3; +DROP USER foo; +DROP DATABASE db; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/views/views_master.inc mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/views/views_master.inc --- mariadb-10.3-10.3.18/mysql-test/suite/funcs_1/views/views_master.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/funcs_1/views/views_master.inc 2020-01-26 18:37:28.000000000 +0000 @@ -764,7 +764,7 @@ CREATE VIEW test2.v2 AS SELECT * FROM test2.t0; # Some additional tests on the just created objects to show that they are -# accessable and do have the expected content. +# accessible and do have the expected content. # INSERTs with full qualified table INSERT INTO test.t1 VALUES('test.t1 - 1'); INSERT INTO test2.t1 VALUES('test2.t1 - 1'); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/disabled.def mariadb-10.3-10.3.22/mysql-test/suite/galera/disabled.def --- mariadb-10.3-10.3.18/mysql-test/suite/galera/disabled.def 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/disabled.def 2020-01-26 18:37:28.000000000 +0000 @@ -10,30 +10,37 @@ # ############################################################################## -MW-286 : MDEV-19992 Galera test failure on MW-286 +MW-286 : MDEV-18464 Killing thread can cause mutex deadlock if done concurrently with Galera/replication victim kill +MW-328A : MDEV-21483 galera.MW-328A galera.MW-328B +MW-328B : MDEV-21483 galera.MW-328A galera.MW-328B MW-329 : MDEV-19962 Galera test failure on MW-329 -MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388 +galera.galera_defaults : MDEV-21494 Galera test sporadic failure on galera.galera_defaults galera_account_management : MariaDB 10.0 does not support ALTER USER galera_as_master_gtid : Requires MySQL GTID galera_as_master_gtid_change_master : Requires MySQL GTID +galera_as_slave_gtid_myisam : MDEV-21421 galera.galera_as_slave_gtid_myisam galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event() -galera_autoinc_sst_mariabackup : MDEV-19926 Galera SST tests fail +galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events -galera_binlog_stmt_autoinc: MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc +galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc galera_flush : MariaDB does not have global.thread_statistics galera_gcache_recover_manytrx : MDEV-18834 Galera test failure galera_ist_mariabackup : MDEV-18829 test leaves port open galera_ist_progress : MDEV-15236 fails when trying to read transfer status +galera_load_data : MDEV-19968 galera.galera_load_data galera_migrate : MariaDB does not support START SLAVE USER -galera_pc_ignore_sb : MDEV-15811/MDEV-17357 Test failure -galera_ssl_upgrade : MDEV-13549 Galera test failures -galera_sst_mysqldump_with_key : MDEV-16890 Galera test failure -galera_var_node_address : MDEV-17151 Galera test failure -galera_var_notify_cmd : MDEV-13549 Galera test failures -galera_var_slave_threads : MDEV-19746 Galera test failures because of wsrep_slave_threads identification -galera_sst_mariabackup_encrypt_with_key : MDEV-19926 Galera SST tests fail -galera_var_node_address : MDEV-20485 Galera test failure on galera.galera_var_node_address +galera_parallel_autoinc_largetrx : MDEV-20916 galera.galera_parallel_autoinc_largetrx +galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails +galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim +galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade +galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encrypt_with_key +galera_sst_mariabackup_table_options: MDEV-19741 Galera test failure on galera.galera_sst_mariabackup_table_options +galera_var_innodb_disallow_writes : MDEV-20928 galera.galera_var_innodb_disallow_writes +galera_var_node_address : MDEV-20485 Galera test failure +galera_var_notify_cmd : MDEV-21488 galera.galera_var_notify_cmd galera_wan : MDEV-17259 Test failure on galera.galera_wan +mysql-wsrep#33 : MDEV-21420 galera.mysql-wsrep#33 partition : MDEV-19958 Galera test failure on galera.partition -query_cache: MDEV-15805 Test failure on galera.query_cache \ No newline at end of file +query_cache: MDEV-15805 Test failure on galera.query_cache +sql_log_bin : MDEV-21491 galera.sql_log_bin diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/galera_2nodes.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/galera_2nodes.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/galera_2nodes.cnf 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/galera_2nodes.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -2,7 +2,7 @@ !include include/default_mysqld.cnf [mysqld] -wsrep-on=1 +loose-innodb binlog-format=row innodb-autoinc-lock-mode=2 default-storage-engine=innodb @@ -12,18 +12,26 @@ wsrep-sync-wait=15 [mysqld.1] +loose-innodb #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep-cluster-address=gcomm:// wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port' +# enforce read-committed characteristics across the cluster +wsrep_causal_reads=ON +wsrep_sync_wait = 15 + [mysqld.2] +loose-innodb #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S' @@ -36,7 +44,6 @@ wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' - [ENV] NODE_MYPORT_1= @mysqld.1.port NODE_MYSOCK_1= @mysqld.1.socket diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/galera_4nodes.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/galera_4nodes.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/galera_4nodes.cnf 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/galera_4nodes.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -16,6 +16,7 @@ #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep-cluster-address=gcomm:// wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port @@ -25,6 +26,7 @@ #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port @@ -35,6 +37,7 @@ #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port @@ -45,6 +48,7 @@ #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port +wsrep-on=1 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M' wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-284.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-284.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-284.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-284.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,6 @@ connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("WSREP has not yet prepared node for application use"); connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; @@ -6,6 +8,9 @@ SET SESSION wsrep_on = ON; SET global wsrep_sync_wait=0; connection node_3; +SELECT @@wsrep_on; +@@wsrep_on +0 START SLAVE; include/wait_for_slave_param.inc [Slave_IO_Running] connection node_1; @@ -22,9 +27,3 @@ STOP SLAVE; RESET SLAVE ALL; CALL mtr.add_suppression('failed registering on master'); -CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work'); -connection node_1; -RESET MASTER; -CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member'); -connection node_2; -CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member'); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-328C.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-328C.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-328C.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-328C.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; -INSERT INTO t1 (f1) VALUES (1); -CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB; -CREATE PROCEDURE proc_update () -BEGIN -DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END; -SET SESSION wsrep_sync_wait = 0; -WHILE 1 DO -UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4); -END WHILE; -END| -connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1; -connection node_1X; -CALL proc_update();; -connection node_2; -SET SESSION wsrep_retry_autocommit = 10000; -connection node_1; -connection node_1X; -Got one of the listed errors -connection node_1; -DROP PROCEDURE proc_update; -DROP TABLE t1, t2; -CALL mtr.add_suppression("conflict state ABORTED after post commit"); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-336.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-336.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-336.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-336.result 2020-01-26 18:37:28.000000000 +0000 @@ -6,10 +6,6 @@ connection node_2; INSERT INTO t1 VALUES (1); connection node_1; -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) FROM t1; -COUNT(*) -1 SET GLOBAL wsrep_slave_threads = 10; # Set slave threads to 10 step 2 SET GLOBAL wsrep_slave_threads = 20; @@ -43,9 +39,11 @@ INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (19); INSERT INTO t1 VALUES (20); +INSERT INTO t1 VALUES (21); +INSERT INTO t1 VALUES (22); connection node_1; SELECT COUNT(*) FROM t1; COUNT(*) -21 +23 SET GLOBAL wsrep_slave_threads = 1; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-369.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-369.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-369.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-369.result 2020-01-26 18:37:28.000000000 +0000 @@ -3,23 +3,32 @@ CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (2, 0); +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; DELETE FROM p WHERE f1 = 1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; INSERT INTO c VALUES (1, 1); +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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 +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction +connection node_2; SELECT * FROM p; f1 f2 1 0 @@ -29,6 +38,7 @@ 1 1 DROP TABLE c; DROP TABLE p; +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, @@ -36,22 +46,30 @@ INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (2, 0); INSERT INTO c VALUES (1, 1, 0); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE p SET f2 = 1 WHERE f1 = 1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; UPDATE c SET f2 = 1 WHERE f1 = 1; +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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='; +connection node_1; +connection node_2; SELECT * FROM p; f1 f2 1 1 @@ -61,28 +79,37 @@ 1 1 1 DROP TABLE c; DROP TABLE p; +connection node_1; CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f1)) ; INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (2, 0); INSERT INTO c VALUES (1, 1); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE p SET f2 = 1 WHERE f1 = 1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; DELETE FROM c WHERE f1 = 1; +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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='; +connection node_1; +connection node_2; SELECT * FROM p; f1 f2 1 1 @@ -95,23 +122,31 @@ CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER, CONSTRAINT fk_1 FOREIGN KEY (p_id) REFERENCES p (f2)) ; INSERT INTO p VALUES (1, 0); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE p SET f2 = 1 WHERE f1 = 1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; INSERT INTO c VALUES (1, 0);; +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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 +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction +connection node_2; SELECT * FROM p; f1 f2 1 0 @@ -127,23 +162,31 @@ INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (2, 0); INSERT INTO c VALUES (1, 1, 0); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; DELETE FROM p WHERE f1 = 1; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; UPDATE c SET f2 = 1 WHERE f1 = 1; +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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 +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction +connection node_2; SELECT * FROM p; f1 f2 1 0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-388.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-388.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-388.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-388.result 2020-01-26 18:37:28.000000000 +0000 @@ -18,12 +18,10 @@ 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'; CALL insert_proc ();; connection node_1a; -SET SESSION DEBUG_SYNC = "now WAIT_FOR wsrep_after_replication_reached"; +SET SESSION wsrep_sync_wait = 0; SET GLOBAL DEBUG_DBUG = ""; -SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; connection node_2; connection node_1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-402.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-402.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-402.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-402.result 2020-01-26 18:37:28.000000000 +0000 @@ -30,7 +30,7 @@ SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +ERROR 40001: Deadlock: wsrep aborted transaction connection node_2; SELECT * FROM p; f1 f2 @@ -70,7 +70,7 @@ SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +ERROR 40001: Deadlock: wsrep aborted transaction connection node_2; SELECT * FROM p; f1 f2 @@ -112,7 +112,7 @@ SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +ERROR 40001: Deadlock: wsrep aborted transaction connection node_2; SELECT * FROM p; f1 f2 @@ -145,7 +145,7 @@ SET GLOBAL wsrep_provider_options = 'signal=local_monitor_enter_sync'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +ERROR 40001: Deadlock: wsrep aborted transaction connection node_2; SELECT * FROM p; f1 f2 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-44.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-44.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/MW-44.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/MW-44.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,24 +1,11 @@ connection node_1; TRUNCATE TABLE mysql.general_log; connection node_2; -TRUNCATE TABLE mysql.general_log; connection node_1; -SELECT Argument FROM mysql.general_log; -Argument -SET GLOBAL general_log='ON'; SET SESSION wsrep_osu_method=TOI; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET SESSION wsrep_osu_method=RSU; ALTER TABLE t1 ADD COLUMN f2 INTEGER; SET SESSION wsrep_osu_method=TOI; -SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; -argument -CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB -ALTER TABLE t1 ADD COLUMN f2 INTEGER connection node_2; -SELECT Argument FROM mysql.general_log; -Argument DROP TABLE t1; -SET GLOBAL general_log='OFF'; -connection node_1; -SET GLOBAL general_log='OFF'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera#500.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera#500.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera#500.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera#500.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,10 +1,14 @@ +connection node_2; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options="gmcast.isolate=2"; +connection node_1; SET SESSION wsrep_sync_wait = 0; SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status non-Primary SET SESSION wsrep_sync_wait = default; SET GLOBAL wsrep_provider_options="pc.bootstrap=1"; +connection node_2; SET SESSION wsrep_on=0; +connection node_2; CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2."); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_as_slave_ctas.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_as_slave_ctas.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_as_slave_ctas.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_as_slave_ctas.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,28 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connection node_2; +START SLAVE; +connection node_1; +SHOW VARIABLES LIKE 'binlog_format'; +Variable_name Value +binlog_format ROW +connection node_1; +CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE target AS SELECT * FROM source; +connection node_2; +connection node_3; +connection node_1; +DROP TABLE target; +INSERT INTO source VALUES(1); +CREATE TABLE target AS SELECT * FROM source; +connection node_2; +connection node_3; +connection node_1; +DROP TABLE source; +DROP TABLE target; +connection node_3; +connection node_2; +STOP SLAVE; +RESET SLAVE ALL; +connection node_1; +RESET MASTER; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,29 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; +connection node_2; +ALTER TABLE mysql.gtid_slave_pos engine = InnoDB; +START SLAVE; +connection node_1; +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES(1); +SELECT LENGTH(@@global.gtid_binlog_state) > 1; +LENGTH(@@global.gtid_binlog_state) > 1 +1 +connection node_2; +gtid_binlog_state_equal +0 +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +SELECT COUNT(*) = 0 FROM t1; +COUNT(*) = 0 +1 +gtid_binlog_state_equal +0 +#cleanup +connection node_1; +DROP TABLE t1; +reset master; +connection node_2; +STOP SLAVE; +RESET SLAVE ALL; +reset master; +connection node_3; +reset master; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_events2.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_events2.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_events2.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_events2.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,123 @@ +connection node_1; +connection node_2; +connection node_1; +CREATE TABLE event_table(a int) engine=innodb; +CREATE EVENT event_2 ON SCHEDULE EVERY 1 SECOND +ENDS NOW() + INTERVAL 6 SECOND +ON COMPLETION NOT PRESERVE +DO +INSERT INTO event_table VALUES (1); +Warnings: +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. +# node_1 event should be there +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def test event_2 root@localhost SQL INSERT INTO event_table VALUES (1) RECURRING NULL 1 SECOND ENABLED NOT PRESERVE +connection node_2; +set global wsrep_sync_wait=15; +# node_2 event should be there +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def test event_2 root@localhost SQL INSERT INTO event_table VALUES (1) RECURRING NULL 1 SECOND SLAVESIDE_DISABLED NOT PRESERVE +connection node_1; +SET GLOBAL event_scheduler=ON; +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler ON +# node_1 event should be removed +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +connection node_2; +# node_2 event should be removed +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +connection node_1; +SET GLOBAL event_scheduler=OFF; +DROP TABLE event_table; +connection node_1; +CREATE DATABASE IF NOT EXISTS events_test; +use events_test; +CREATE USER ev_test@localhost; +GRANT ALL ON events_test.* to ev_test@localhost; +connect ev_con1,localhost,ev_test,,events_test; +CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123; +Warnings: +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation +events_test one_event ev_test@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def events_test one_event ev_test@localhost SQL SELECT 123 RECURRING NULL 10 SECOND ENABLED NOT PRESERVE +ALTER EVENT one_event ON SCHEDULE EVERY 10 SECOND; +"The definer should be ev_test@localhost" +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def events_test one_event ev_test@localhost SQL SELECT 123 RECURRING NULL 10 SECOND ENABLED NOT PRESERVE +connection node_2; +use events_test; +"The definer should be ev_test@localhost" +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def events_test one_event ev_test@localhost SQL SELECT 123 RECURRING NULL 10 SECOND SLAVESIDE_DISABLED NOT PRESERVE +connection node_1; +disconnect ev_con1; +use test; +DROP EVENT events_test.one_event; +DROP USER ev_test@localhost; +DROP DATABASE events_test; +connection node_1; +use test; +CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123; +Warnings: +Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it. +# node_1 Event should be enabled +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def test one_event root@localhost SQL SELECT 123 RECURRING NULL 10 SECOND ENABLED NOT PRESERVE +connection node_2; +use test; +# node_2 Event should be SERVERSIDE_DISABLED +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def test one_event root@localhost SQL SELECT 123 RECURRING NULL 10 SECOND SLAVESIDE_DISABLED NOT PRESERVE +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=InnoDB; +INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'); +SELECT * FROM t1; +f1 f2 +1 a +2 a +3 a +Shutting down server ... +connection node_1; +UPDATE t1 SET f2 = 'b' WHERE f1 > 1; +UPDATE t1 SET f2 = 'c' WHERE f1 > 2; +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +connection node_2; +# Force SST from node_1 to node_2 +Starting server ... +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +# node_2 Event should be SERVERSIDE_DISABLED +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def test one_event root@localhost SQL SELECT 123 RECURRING NULL 10 SECOND SLAVESIDE_DISABLED NOT PRESERVE +connection node_1; +SELECT * FROM t1; +f1 f2 +1 a +2 b +3 c +# node_1 Event should be ENABLED +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT +def test one_event root@localhost SQL SELECT 123 RECURRING NULL 10 SECOND ENABLED NOT PRESERVE +DROP TABLE t1; +DROP EVENT one_event; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_forced_binlog_format.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_forced_binlog_format.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_forced_binlog_format.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_forced_binlog_format.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,13 +1,11 @@ connection node_1; +SET SESSION wsrep_on=OFF; RESET MASTER; +SET SESSION wsrep_on=ON; SET SESSION binlog_format = 'STATEMENT'; -Warnings: -Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); SET SESSION binlog_format = 'MIXED'; -Warnings: -Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED INSERT INTO t1 VALUES (2); SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256; Log_name Pos Event_type Server_id End_log_pos Info diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_gcs_fragment.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_gcs_fragment.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_gcs_fragment.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_gcs_fragment.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,24 +1,35 @@ +connection node_1; +connection node_2; CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT); +connection node_2; SET GLOBAL wsrep_cluster_address=''; +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; SET SESSION wsrep_sync_wait=0; SET GLOBAL wsrep_provider_options = 'dbug=d,gcs_core_after_frag_send'; +connection node_1; SET SESSION wsrep_retry_autocommit=0; INSERT INTO t1 VALUES (1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); +connection node_1a; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; SET GLOBAL wsrep_provider_options = 'dbug='; +connection node_2; SET SESSION wsrep_on = 0; SET SESSION wsrep_on = 1; INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); +connection node_1a; SET GLOBAL wsrep_provider_options = 'signal=gcs_core_after_frag_send'; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); SELECT * FROM t1; f1 f2 2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +connection node_2; SELECT * FROM t1; f1 f2 2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +connection node_1; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_gtid.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_gtid.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_gtid.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_gtid.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,14 +1,12 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY); INSERT INTO t1 VALUES (1); connection node_2; -SELECT COUNT(*) = 1 FROM t1; -COUNT(*) = 1 -1 UPDATE t1 SET f1 = 2; connection node_1; -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; -COUNT(*) = 1 -1 +SET SESSION wsrep_sync_wait = 15; +SELECT * from t1; +f1 +2 gtid_binlog_state_equal 1 DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_ist_restart_joiner.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_ist_restart_joiner.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_ist_restart_joiner.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_ist_restart_joiner.result 2020-01-26 18:37:28.000000000 +0000 @@ -13,7 +13,6 @@ SET SESSION wsrep_on=OFF; SET SESSION wsrep_on=ON; connection node_1; -connection node_1; UPDATE t1 SET f2 = 'd' WHERE f1 > 3; connection node_2; connection node_1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_log_bin.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_log_bin.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_log_bin.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_log_bin.result 2020-01-26 18:37:28.000000000 +0000 @@ -71,5 +71,3 @@ #cleanup connection node_1; RESET MASTER; -connection node_2; -reset master; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_partition.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_partition.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_partition.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_partition.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,424 @@ +connection node_1; +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; +connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; +connection node_1; +CREATE TABLE t1( +id bigint unsigned NOT NULL AUTO_INCREMENT, +dt datetime NOT NULL, +PRIMARY KEY (id,dt), +KEY dt_idx (dt) +) ENGINE=InnoDB +PARTITION BY RANGE( TO_DAYS(dt) ) ( +PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ), +PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ), +PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ), +PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ), +PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ), +PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ), +PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ), +PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ), +PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ), +PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ), +PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ), +PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ), +PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ), +PARTITION rx2011 VALUES LESS THAN MAXVALUE); +CREATE PROCEDURE p1 (repeat_count int) +BEGIN +DECLARE current_num int; +SET current_num = 0; +WHILE current_num < repeat_count do +INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-02-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-03-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-04-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-06-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); +INSERT INTO t1 VALUES (NULL, '2012-02-21 00:00:00'); +COMMIT; +SET current_num = current_num + 1; +END WHILE; +END| +insert into t1 (id, dt) values (1, '2010-01-02 00:00:00'); +insert into t1 (id, dt) values (2, '2010-01-03 00:00:00'); +insert into t1 (id, dt) values (3, '2010-01-04 00:00:00'); +insert into t1 (id, dt) values (4, '2010-01-05 00:00:00'); +insert into t1 (id, dt) values (5, '2010-01-06 00:00:00'); +insert into t1 (id, dt) values (6, '2010-01-07 00:00:00'); +insert into t1 (id, dt) values (7, '2010-01-08 00:00:00'); +insert into t1 (id, dt) values (8, '2010-01-09 00:00:00'); +insert into t1 (id, dt) values (9, '2010-01-10 00:00:00'); +insert into t1 (id, dt) values (10, '2010-01-11 00:00:00'); +insert into t1 (id, dt) values (11, '2010-01-12 00:00:00'); +insert into t1 (id, dt) values (12, '2010-01-13 00:00:00'); +insert into t1 (id, dt) values (13, '2010-01-14 00:00:00'); +insert into t1 (id, dt) values (14, '2010-01-15 00:00:00'); +insert into t1 (id, dt) values (15, '2010-01-16 00:00:00'); +insert into t1 (id, dt) values (16, '2010-01-17 00:00:00'); +insert into t1 (id, dt) values (17, '2010-01-18 00:00:00'); +insert into t1 (id, dt) values (18, '2010-01-19 00:00:00'); +insert into t1 (id, dt) values (19, '2010-01-20 00:00:00'); +insert into t1 (id, dt) values (20, '2010-01-21 00:00:00'); +insert into t1 (id, dt) values (21, '2010-01-22 00:00:00'); +insert into t1 (id, dt) values (22, '2010-01-23 00:00:00'); +insert into t1 (id, dt) values (23, '2010-01-24 00:00:00'); +insert into t1 (id, dt) values (24, '2010-01-25 00:00:00'); +insert into t1 (id, dt) values (25, '2010-01-26 00:00:00'); +insert into t1 (id, dt) values (26, '2010-01-27 00:00:00'); +insert into t1 (id, dt) values (27, '2010-01-28 00:00:00'); +insert into t1 (id, dt) values (28, '2010-01-29 00:00:00'); +insert into t1 (id, dt) values (29, '2010-01-30 00:00:00'); +insert into t1 (id, dt) values (30, '2010-01-31 00:00:00'); +insert into t1 (id, dt) values (31, '2010-02-01 00:00:00'); +insert into t1 (id, dt) values (32, '2010-02-02 00:00:00'); +insert into t1 (id, dt) values (33, '2010-02-03 00:00:00'); +insert into t1 (id, dt) values (34, '2010-02-04 00:00:00'); +insert into t1 (id, dt) values (35, '2010-02-05 00:00:00'); +insert into t1 (id, dt) values (36, '2010-02-06 00:00:00'); +insert into t1 (id, dt) values (37, '2010-02-07 00:00:00'); +insert into t1 (id, dt) values (38, '2010-02-08 00:00:00'); +insert into t1 (id, dt) values (39, '2010-02-09 00:00:00'); +insert into t1 (id, dt) values (40, '2010-02-10 00:00:00'); +insert into t1 (id, dt) values (41, '2010-02-11 00:00:00'); +insert into t1 (id, dt) values (42, '2010-02-12 00:00:00'); +insert into t1 (id, dt) values (43, '2010-02-13 00:00:00'); +insert into t1 (id, dt) values (44, '2010-02-14 00:00:00'); +insert into t1 (id, dt) values (45, '2010-02-15 00:00:00'); +insert into t1 (id, dt) values (46, '2010-02-16 00:00:00'); +insert into t1 (id, dt) values (47, '2010-02-17 00:00:00'); +insert into t1 (id, dt) values (48, '2010-02-18 00:00:00'); +insert into t1 (id, dt) values (49, '2010-02-19 00:00:00'); +insert into t1 (id, dt) values (50, '2010-02-20 00:00:00'); +insert into t1 (id, dt) values (51, '2010-02-21 00:00:00'); +insert into t1 (id, dt) values (52, '2010-02-22 00:00:00'); +insert into t1 (id, dt) values (53, '2010-02-23 00:00:00'); +insert into t1 (id, dt) values (54, '2010-02-24 00:00:00'); +insert into t1 (id, dt) values (55, '2010-02-25 00:00:00'); +insert into t1 (id, dt) values (56, '2010-02-26 00:00:00'); +insert into t1 (id, dt) values (57, '2010-02-27 00:00:00'); +insert into t1 (id, dt) values (58, '2010-02-28 00:00:00'); +insert into t1 (id, dt) values (59, '2010-03-01 00:00:00'); +insert into t1 (id, dt) values (60, '2010-03-02 00:00:00'); +insert into t1 (id, dt) values (61, '2010-03-03 00:00:00'); +insert into t1 (id, dt) values (62, '2010-03-04 00:00:00'); +insert into t1 (id, dt) values (63, '2010-03-05 00:00:00'); +insert into t1 (id, dt) values (64, '2010-03-06 00:00:00'); +insert into t1 (id, dt) values (65, '2010-03-07 00:00:00'); +insert into t1 (id, dt) values (66, '2010-03-08 00:00:00'); +insert into t1 (id, dt) values (67, '2010-03-09 00:00:00'); +insert into t1 (id, dt) values (68, '2010-03-10 00:00:00'); +insert into t1 (id, dt) values (69, '2010-03-11 00:00:00'); +insert into t1 (id, dt) values (70, '2010-03-12 00:00:00'); +insert into t1 (id, dt) values (71, '2010-03-13 00:00:00'); +insert into t1 (id, dt) values (72, '2010-03-14 00:00:00'); +insert into t1 (id, dt) values (73, '2010-03-15 00:00:00'); +insert into t1 (id, dt) values (74, '2010-03-16 00:00:00'); +insert into t1 (id, dt) values (75, '2010-03-17 00:00:00'); +insert into t1 (id, dt) values (76, '2010-03-18 00:00:00'); +insert into t1 (id, dt) values (77, '2010-03-19 00:00:00'); +insert into t1 (id, dt) values (78, '2010-03-20 00:00:00'); +insert into t1 (id, dt) values (79, '2010-03-21 00:00:00'); +insert into t1 (id, dt) values (80, '2010-03-22 00:00:00'); +insert into t1 (id, dt) values (81, '2010-03-23 00:00:00'); +insert into t1 (id, dt) values (82, '2010-03-24 00:00:00'); +insert into t1 (id, dt) values (83, '2010-03-25 00:00:00'); +insert into t1 (id, dt) values (84, '2010-03-26 00:00:00'); +insert into t1 (id, dt) values (85, '2010-03-27 00:00:00'); +insert into t1 (id, dt) values (86, '2010-03-28 00:00:00'); +insert into t1 (id, dt) values (87, '2010-03-29 00:00:00'); +insert into t1 (id, dt) values (88, '2010-03-30 00:00:00'); +insert into t1 (id, dt) values (89, '2010-03-31 00:00:00'); +insert into t1 (id, dt) values (90, '2010-04-01 00:00:00'); +insert into t1 (id, dt) values (91, '2010-04-02 00:00:00'); +insert into t1 (id, dt) values (92, '2010-04-03 00:00:00'); +insert into t1 (id, dt) values (93, '2010-04-04 00:00:00'); +insert into t1 (id, dt) values (94, '2010-04-05 00:00:00'); +insert into t1 (id, dt) values (95, '2010-04-06 00:00:00'); +insert into t1 (id, dt) values (96, '2010-04-07 00:00:00'); +insert into t1 (id, dt) values (97, '2010-04-08 00:00:00'); +insert into t1 (id, dt) values (98, '2010-04-09 00:00:00'); +insert into t1 (id, dt) values (99, '2010-04-10 00:00:00'); +insert into t1 (id, dt) values (100, '2010-04-11 00:00:00'); +insert into t1 (id, dt) values (101, '2010-04-12 00:00:00'); +insert into t1 (id, dt) values (102, '2010-04-13 00:00:00'); +insert into t1 (id, dt) values (103, '2010-04-14 00:00:00'); +insert into t1 (id, dt) values (104, '2010-04-15 00:00:00'); +insert into t1 (id, dt) values (105, '2010-04-16 00:00:00'); +insert into t1 (id, dt) values (106, '2010-04-17 00:00:00'); +insert into t1 (id, dt) values (107, '2010-04-18 00:00:00'); +insert into t1 (id, dt) values (108, '2010-04-19 00:00:00'); +insert into t1 (id, dt) values (109, '2010-04-20 00:00:00'); +insert into t1 (id, dt) values (110, '2010-04-21 00:00:00'); +insert into t1 (id, dt) values (111, '2010-04-22 00:00:00'); +insert into t1 (id, dt) values (112, '2010-04-23 00:00:00'); +insert into t1 (id, dt) values (113, '2010-04-24 00:00:00'); +insert into t1 (id, dt) values (114, '2010-04-25 00:00:00'); +insert into t1 (id, dt) values (115, '2010-04-26 00:00:00'); +insert into t1 (id, dt) values (116, '2010-04-27 00:00:00'); +insert into t1 (id, dt) values (117, '2010-04-28 00:00:00'); +insert into t1 (id, dt) values (118, '2010-04-29 00:00:00'); +insert into t1 (id, dt) values (119, '2010-04-30 00:00:00'); +insert into t1 (id, dt) values (120, '2010-05-01 00:00:00'); +insert into t1 (id, dt) values (121, '2010-05-02 00:00:00'); +insert into t1 (id, dt) values (122, '2010-05-03 00:00:00'); +insert into t1 (id, dt) values (123, '2010-05-04 00:00:00'); +insert into t1 (id, dt) values (124, '2010-05-05 00:00:00'); +insert into t1 (id, dt) values (125, '2010-05-06 00:00:00'); +insert into t1 (id, dt) values (126, '2010-05-07 00:00:00'); +insert into t1 (id, dt) values (127, '2010-05-08 00:00:00'); +insert into t1 (id, dt) values (128, '2010-05-09 00:00:00'); +insert into t1 (id, dt) values (129, '2010-05-10 00:00:00'); +insert into t1 (id, dt) values (130, '2010-05-11 00:00:00'); +insert into t1 (id, dt) values (131, '2010-05-12 00:00:00'); +insert into t1 (id, dt) values (132, '2010-05-13 00:00:00'); +insert into t1 (id, dt) values (133, '2010-05-14 00:00:00'); +insert into t1 (id, dt) values (134, '2010-05-15 00:00:00'); +insert into t1 (id, dt) values (135, '2010-05-16 00:00:00'); +insert into t1 (id, dt) values (136, '2010-05-17 00:00:00'); +insert into t1 (id, dt) values (137, '2010-05-18 00:00:00'); +insert into t1 (id, dt) values (138, '2010-05-19 00:00:00'); +insert into t1 (id, dt) values (139, '2010-05-20 00:00:00'); +insert into t1 (id, dt) values (140, '2010-05-21 00:00:00'); +insert into t1 (id, dt) values (141, '2010-05-22 00:00:00'); +insert into t1 (id, dt) values (142, '2010-05-23 00:00:00'); +insert into t1 (id, dt) values (143, '2010-05-24 00:00:00'); +insert into t1 (id, dt) values (144, '2010-05-25 00:00:00'); +insert into t1 (id, dt) values (145, '2010-05-26 00:00:00'); +insert into t1 (id, dt) values (146, '2010-05-27 00:00:00'); +insert into t1 (id, dt) values (147, '2010-05-28 00:00:00'); +insert into t1 (id, dt) values (148, '2010-05-29 00:00:00'); +insert into t1 (id, dt) values (149, '2010-05-30 00:00:00'); +insert into t1 (id, dt) values (150, '2010-05-31 00:00:00'); +insert into t1 (id, dt) values (151, '2010-06-01 00:00:00'); +insert into t1 (id, dt) values (152, '2010-06-02 00:00:00'); +insert into t1 (id, dt) values (153, '2010-06-03 00:00:00'); +insert into t1 (id, dt) values (154, '2010-06-04 00:00:00'); +insert into t1 (id, dt) values (155, '2010-06-05 00:00:00'); +insert into t1 (id, dt) values (156, '2010-06-06 00:00:00'); +insert into t1 (id, dt) values (157, '2010-06-07 00:00:00'); +insert into t1 (id, dt) values (158, '2010-06-08 00:00:00'); +insert into t1 (id, dt) values (159, '2010-06-09 00:00:00'); +insert into t1 (id, dt) values (160, '2010-06-10 00:00:00'); +insert into t1 (id, dt) values (161, '2010-06-11 00:00:00'); +insert into t1 (id, dt) values (162, '2010-06-12 00:00:00'); +insert into t1 (id, dt) values (163, '2010-06-13 00:00:00'); +insert into t1 (id, dt) values (164, '2010-06-14 00:00:00'); +insert into t1 (id, dt) values (165, '2010-06-15 00:00:00'); +insert into t1 (id, dt) values (166, '2010-06-16 00:00:00'); +insert into t1 (id, dt) values (167, '2010-06-17 00:00:00'); +insert into t1 (id, dt) values (168, '2010-06-18 00:00:00'); +insert into t1 (id, dt) values (169, '2010-06-19 00:00:00'); +insert into t1 (id, dt) values (170, '2010-06-20 00:00:00'); +insert into t1 (id, dt) values (171, '2010-06-21 00:00:00'); +insert into t1 (id, dt) values (172, '2010-06-22 00:00:00'); +insert into t1 (id, dt) values (173, '2010-06-23 00:00:00'); +insert into t1 (id, dt) values (174, '2010-06-24 00:00:00'); +insert into t1 (id, dt) values (175, '2010-06-25 00:00:00'); +insert into t1 (id, dt) values (176, '2010-06-26 00:00:00'); +insert into t1 (id, dt) values (177, '2010-06-27 00:00:00'); +insert into t1 (id, dt) values (178, '2010-06-28 00:00:00'); +insert into t1 (id, dt) values (179, '2010-06-29 00:00:00'); +insert into t1 (id, dt) values (180, '2010-06-30 00:00:00'); +insert into t1 (id, dt) values (181, '2010-07-01 00:00:00'); +insert into t1 (id, dt) values (182, '2010-07-02 00:00:00'); +insert into t1 (id, dt) values (183, '2010-07-03 00:00:00'); +insert into t1 (id, dt) values (184, '2010-07-04 00:00:00'); +insert into t1 (id, dt) values (185, '2010-07-05 00:00:00'); +insert into t1 (id, dt) values (186, '2010-07-06 00:00:00'); +insert into t1 (id, dt) values (187, '2010-07-07 00:00:00'); +insert into t1 (id, dt) values (188, '2010-07-08 00:00:00'); +insert into t1 (id, dt) values (189, '2010-07-09 00:00:00'); +insert into t1 (id, dt) values (190, '2010-07-10 00:00:00'); +insert into t1 (id, dt) values (191, '2010-07-11 00:00:00'); +insert into t1 (id, dt) values (192, '2010-07-12 00:00:00'); +insert into t1 (id, dt) values (193, '2010-07-13 00:00:00'); +insert into t1 (id, dt) values (194, '2010-07-14 00:00:00'); +insert into t1 (id, dt) values (195, '2010-07-15 00:00:00'); +insert into t1 (id, dt) values (196, '2010-07-16 00:00:00'); +insert into t1 (id, dt) values (197, '2010-07-17 00:00:00'); +insert into t1 (id, dt) values (198, '2010-07-18 00:00:00'); +insert into t1 (id, dt) values (199, '2010-07-19 00:00:00'); +insert into t1 (id, dt) values (200, '2010-07-20 00:00:00'); +insert into t1 (id, dt) values (201, '2010-07-21 00:00:00'); +insert into t1 (id, dt) values (202, '2010-07-22 00:00:00'); +insert into t1 (id, dt) values (203, '2010-07-23 00:00:00'); +insert into t1 (id, dt) values (204, '2010-07-24 00:00:00'); +insert into t1 (id, dt) values (205, '2010-07-25 00:00:00'); +insert into t1 (id, dt) values (206, '2010-07-26 00:00:00'); +insert into t1 (id, dt) values (207, '2010-07-27 00:00:00'); +insert into t1 (id, dt) values (208, '2010-07-28 00:00:00'); +insert into t1 (id, dt) values (209, '2010-07-29 00:00:00'); +insert into t1 (id, dt) values (210, '2010-07-30 00:00:00'); +insert into t1 (id, dt) values (211, '2010-07-31 00:00:00'); +insert into t1 (id, dt) values (212, '2010-08-01 00:00:00'); +insert into t1 (id, dt) values (213, '2010-08-02 00:00:00'); +insert into t1 (id, dt) values (214, '2010-08-03 00:00:00'); +insert into t1 (id, dt) values (215, '2010-08-04 00:00:00'); +insert into t1 (id, dt) values (216, '2010-08-05 00:00:00'); +insert into t1 (id, dt) values (217, '2010-08-06 00:00:00'); +insert into t1 (id, dt) values (218, '2010-08-07 00:00:00'); +insert into t1 (id, dt) values (219, '2010-08-08 00:00:00'); +insert into t1 (id, dt) values (220, '2010-08-09 00:00:00'); +insert into t1 (id, dt) values (221, '2010-08-10 00:00:00'); +insert into t1 (id, dt) values (222, '2010-08-11 00:00:00'); +insert into t1 (id, dt) values (223, '2010-08-12 00:00:00'); +insert into t1 (id, dt) values (224, '2010-08-13 00:00:00'); +insert into t1 (id, dt) values (225, '2010-08-14 00:00:00'); +insert into t1 (id, dt) values (226, '2010-08-15 00:00:00'); +insert into t1 (id, dt) values (227, '2010-08-16 00:00:00'); +insert into t1 (id, dt) values (228, '2010-08-17 00:00:00'); +insert into t1 (id, dt) values (229, '2010-08-18 00:00:00'); +insert into t1 (id, dt) values (230, '2010-08-19 00:00:00'); +insert into t1 (id, dt) values (231, '2010-08-20 00:00:00'); +insert into t1 (id, dt) values (232, '2010-08-21 00:00:00'); +insert into t1 (id, dt) values (233, '2010-08-22 00:00:00'); +insert into t1 (id, dt) values (234, '2010-08-23 00:00:00'); +insert into t1 (id, dt) values (235, '2010-08-24 00:00:00'); +insert into t1 (id, dt) values (236, '2010-08-25 00:00:00'); +insert into t1 (id, dt) values (237, '2010-08-26 00:00:00'); +insert into t1 (id, dt) values (238, '2010-08-27 00:00:00'); +insert into t1 (id, dt) values (239, '2010-08-28 00:00:00'); +insert into t1 (id, dt) values (240, '2010-08-29 00:00:00'); +insert into t1 (id, dt) values (241, '2010-08-30 00:00:00'); +insert into t1 (id, dt) values (242, '2010-08-31 00:00:00'); +insert into t1 (id, dt) values (243, '2010-09-01 00:00:00'); +insert into t1 (id, dt) values (244, '2010-09-02 00:00:00'); +insert into t1 (id, dt) values (245, '2010-09-03 00:00:00'); +insert into t1 (id, dt) values (246, '2010-09-04 00:00:00'); +insert into t1 (id, dt) values (247, '2010-09-05 00:00:00'); +insert into t1 (id, dt) values (248, '2010-09-06 00:00:00'); +insert into t1 (id, dt) values (249, '2010-09-07 00:00:00'); +insert into t1 (id, dt) values (250, '2010-09-08 00:00:00'); +insert into t1 (id, dt) values (251, '2010-09-09 00:00:00'); +insert into t1 (id, dt) values (252, '2010-09-10 00:00:00'); +insert into t1 (id, dt) values (253, '2010-09-11 00:00:00'); +insert into t1 (id, dt) values (254, '2010-09-12 00:00:00'); +insert into t1 (id, dt) values (255, '2010-09-13 00:00:00'); +insert into t1 (id, dt) values (256, '2010-09-14 00:00:00'); +insert into t1 (id, dt) values (257, '2010-09-15 00:00:00'); +insert into t1 (id, dt) values (258, '2010-09-16 00:00:00'); +insert into t1 (id, dt) values (259, '2010-09-17 00:00:00'); +insert into t1 (id, dt) values (260, '2010-09-18 00:00:00'); +insert into t1 (id, dt) values (261, '2010-09-19 00:00:00'); +insert into t1 (id, dt) values (262, '2010-09-20 00:00:00'); +insert into t1 (id, dt) values (263, '2010-09-21 00:00:00'); +insert into t1 (id, dt) values (264, '2010-09-22 00:00:00'); +insert into t1 (id, dt) values (265, '2010-09-23 00:00:00'); +insert into t1 (id, dt) values (266, '2010-09-24 00:00:00'); +insert into t1 (id, dt) values (267, '2010-09-25 00:00:00'); +insert into t1 (id, dt) values (268, '2010-09-26 00:00:00'); +insert into t1 (id, dt) values (269, '2010-09-27 00:00:00'); +insert into t1 (id, dt) values (270, '2010-09-28 00:00:00'); +insert into t1 (id, dt) values (271, '2010-09-29 00:00:00'); +insert into t1 (id, dt) values (272, '2010-09-30 00:00:00'); +insert into t1 (id, dt) values (273, '2010-10-01 00:00:00'); +insert into t1 (id, dt) values (274, '2010-10-02 00:00:00'); +insert into t1 (id, dt) values (275, '2010-10-03 00:00:00'); +insert into t1 (id, dt) values (276, '2010-10-04 00:00:00'); +insert into t1 (id, dt) values (277, '2010-10-05 00:00:00'); +insert into t1 (id, dt) values (278, '2010-10-06 00:00:00'); +insert into t1 (id, dt) values (279, '2010-10-07 00:00:00'); +insert into t1 (id, dt) values (280, '2010-10-08 00:00:00'); +insert into t1 (id, dt) values (281, '2010-10-09 00:00:00'); +insert into t1 (id, dt) values (282, '2010-10-10 00:00:00'); +insert into t1 (id, dt) values (283, '2010-10-11 00:00:00'); +insert into t1 (id, dt) values (284, '2010-10-12 00:00:00'); +insert into t1 (id, dt) values (285, '2010-10-13 00:00:00'); +insert into t1 (id, dt) values (286, '2010-10-14 00:00:00'); +insert into t1 (id, dt) values (287, '2010-10-15 00:00:00'); +insert into t1 (id, dt) values (288, '2010-10-16 00:00:00'); +insert into t1 (id, dt) values (289, '2010-10-17 00:00:00'); +insert into t1 (id, dt) values (290, '2010-10-18 00:00:00'); +insert into t1 (id, dt) values (291, '2010-10-19 00:00:00'); +insert into t1 (id, dt) values (292, '2010-10-20 00:00:00'); +insert into t1 (id, dt) values (293, '2010-10-21 00:00:00'); +insert into t1 (id, dt) values (294, '2010-10-22 00:00:00'); +insert into t1 (id, dt) values (295, '2010-10-23 00:00:00'); +insert into t1 (id, dt) values (296, '2010-10-24 00:00:00'); +insert into t1 (id, dt) values (297, '2010-10-25 00:00:00'); +insert into t1 (id, dt) values (298, '2010-10-26 00:00:00'); +insert into t1 (id, dt) values (299, '2010-10-27 00:00:00'); +insert into t1 (id, dt) values (300, '2010-10-28 00:00:00'); +insert into t1 (id, dt) values (301, '2010-10-29 00:00:00'); +insert into t1 (id, dt) values (302, '2010-10-30 00:00:00'); +insert into t1 (id, dt) values (303, '2010-10-31 00:00:00'); +insert into t1 (id, dt) values (304, '2010-11-01 00:00:00'); +insert into t1 (id, dt) values (305, '2010-11-02 00:00:00'); +insert into t1 (id, dt) values (306, '2010-11-03 00:00:00'); +insert into t1 (id, dt) values (307, '2010-11-04 00:00:00'); +insert into t1 (id, dt) values (308, '2010-11-05 00:00:00'); +insert into t1 (id, dt) values (309, '2010-11-06 00:00:00'); +insert into t1 (id, dt) values (310, '2010-11-07 00:00:00'); +insert into t1 (id, dt) values (311, '2010-11-08 00:00:00'); +insert into t1 (id, dt) values (312, '2010-11-09 00:00:00'); +insert into t1 (id, dt) values (313, '2010-11-10 00:00:00'); +insert into t1 (id, dt) values (314, '2010-11-11 00:00:00'); +insert into t1 (id, dt) values (315, '2010-11-12 00:00:00'); +insert into t1 (id, dt) values (316, '2010-11-13 00:00:00'); +insert into t1 (id, dt) values (317, '2010-11-14 00:00:00'); +insert into t1 (id, dt) values (318, '2010-11-15 00:00:00'); +insert into t1 (id, dt) values (319, '2010-11-16 00:00:00'); +insert into t1 (id, dt) values (320, '2010-11-17 00:00:00'); +insert into t1 (id, dt) values (321, '2010-11-18 00:00:00'); +insert into t1 (id, dt) values (322, '2010-11-19 00:00:00'); +insert into t1 (id, dt) values (323, '2010-11-20 00:00:00'); +insert into t1 (id, dt) values (324, '2010-11-21 00:00:00'); +insert into t1 (id, dt) values (325, '2010-11-22 00:00:00'); +insert into t1 (id, dt) values (326, '2010-11-23 00:00:00'); +insert into t1 (id, dt) values (327, '2010-11-24 00:00:00'); +insert into t1 (id, dt) values (328, '2010-11-25 00:00:00'); +insert into t1 (id, dt) values (329, '2010-11-26 00:00:00'); +insert into t1 (id, dt) values (330, '2010-11-27 00:00:00'); +insert into t1 (id, dt) values (331, '2010-11-28 00:00:00'); +insert into t1 (id, dt) values (332, '2010-11-29 00:00:00'); +insert into t1 (id, dt) values (333, '2010-11-30 00:00:00'); +insert into t1 (id, dt) values (334, '2010-12-01 00:00:00'); +insert into t1 (id, dt) values (335, '2010-12-02 00:00:00'); +insert into t1 (id, dt) values (336, '2010-12-03 00:00:00'); +insert into t1 (id, dt) values (337, '2010-12-04 00:00:00'); +insert into t1 (id, dt) values (338, '2010-12-05 00:00:00'); +insert into t1 (id, dt) values (339, '2010-12-06 00:00:00'); +insert into t1 (id, dt) values (340, '2010-12-07 00:00:00'); +insert into t1 (id, dt) values (341, '2010-12-08 00:00:00'); +insert into t1 (id, dt) values (342, '2010-12-09 00:00:00'); +insert into t1 (id, dt) values (343, '2010-12-10 00:00:00'); +insert into t1 (id, dt) values (344, '2010-12-11 00:00:00'); +insert into t1 (id, dt) values (345, '2010-12-12 00:00:00'); +insert into t1 (id, dt) values (346, '2010-12-13 00:00:00'); +insert into t1 (id, dt) values (347, '2010-12-14 00:00:00'); +insert into t1 (id, dt) values (348, '2010-12-15 00:00:00'); +insert into t1 (id, dt) values (349, '2010-12-16 00:00:00'); +insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); +SELECT COUNT(*) FROM t1; +COUNT(*) +350 +connection node_2; +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +call p1(100);; +connection node_3; +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +call p1(100);; +connection node_4; +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +call p1(100);; +connection node_1; +SET SESSION wsrep_OSU_method='RSU'; +SELECT @@wsrep_OSU_method; +@@wsrep_OSU_method +RSU +SET SESSION sql_log_bin = 0; +ALTER TABLE t1 DROP PARTITION rx2009xx; +ALTER TABLE t1 DROP PARTITION rx201004; +ALTER TABLE t1 DROP PARTITION rx201008; +SET SESSION wsrep_OSU_METHOD='TOI'; +SELECT @@wsrep_OSU_method; +@@wsrep_OSU_method +TOI +connection node_2; +connection node_3; +connection node_4; +connection node_1; +DROP TABLE t1; +DROP PROCEDURE p1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_rsu_drop_pk.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_rsu_drop_pk.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_rsu_drop_pk.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_rsu_drop_pk.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,5 +1,5 @@ connection node_1; -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO t1 (f1) SELECT 000000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; @@ -9,19 +9,19 @@ ALTER TABLE t1 DROP PRIMARY KEY; SET SESSION wsrep_OSU_method = "TOI"; INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) as expect_300000 FROM t1; +expect_300000 +300000 +SELECT MAX(f1) as expect_299999 FROM t1; +expect_299999 +299999 connection node_1; -SELECT COUNT(*) = 300000 FROM t1; -COUNT(*) = 300000 -1 -SELECT MAX(f1) = 299999 FROM t1; -MAX(f1) = 299999 -1 +SELECT COUNT(*) as expect_300000 FROM t1; +expect_300000 +300000 +SELECT MAX(f1) as expect_299999 FROM t1; +expect_299999 +299999 SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 DROP PRIMARY KEY; SET SESSION wsrep_OSU_method = "TOI"; @@ -29,20 +29,20 @@ INSERT INTO t1 (f1) VALUES (1); INSERT INTO t1 (f1) VALUES (10); connection node_1; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 10; -COUNT(*) = 2 -1 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1; +expect_2 +2 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 10; +expect_2 +2 INSERT INTO t1 (f1) VALUES (100); INSERT INTO t1 (f1) VALUES (1000); connection node_2; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 100; -COUNT(*) = 2 -1 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1000; -COUNT(*) = 2 -1 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 100; +expect_2 +2 +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1000; +expect_2 +2 DROP TABLE t1; DROP TABLE ten; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_shutdown_nonprim.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_shutdown_nonprim.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_shutdown_nonprim.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_shutdown_nonprim.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +connection node_1; +connection node_2; +connection node_1; +SET GLOBAL wsrep_provider_options = 'pc.weight=2'; +connection node_2; +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; +SET SESSION wsrep_sync_wait = 0; +connection node_1; +SET GLOBAL wsrep_provider_options = 'pc.weight = 1'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_dirty_reads.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_dirty_reads.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_dirty_reads.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_dirty_reads.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +call mtr.add_suppression("WSREP has not yet prepared node for application use"); connection node_1; connection node_2; connection node_2; @@ -16,9 +17,9 @@ Variable_name Value wsrep_cluster_status non-Primary SELECT * FROM t1; -ERROR 08S01: WSREP has not yet prepared node for application use +Got one of the listed errors SELECT 1 FROM t1; -ERROR 08S01: WSREP has not yet prepared node for application use +Got one of the listed errors SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i @@ -31,7 +32,7 @@ 1 WSREP_DIRTY_READS ON SET @@session.wsrep_dirty_reads=OFF; SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1; -ERROR 08S01: WSREP has not yet prepared node for application use +Got one of the listed errors SELECT 1; 1 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_node_address.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_node_address.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_node_address.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_node_address.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,17 +1,20 @@ -call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*"); -call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored."); -call mtr.add_suppression("WSREP: Sending JOIN failed: -[0-9]+ (Transport endpoint is not connected). Will retry in new primary component."); -SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; -VARIABLE_VALUE = 4 -1 +call mtr.add_suppression("WSREP: Stray state UUID msg: .*"); +call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .*"); +call mtr.add_suppression("WSREP: Sending JOIN failed: .*"); +flush tables; +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +VARIABLE_VALUE +4 connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB; connection node_2; +set global wsrep_sync_wait=15; INSERT INTO t1 VALUES (1); connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connection node_3; -SELECT COUNT(*) = 1 FROM t1; -COUNT(*) = 1 +set global wsrep_sync_wait=15; +SELECT COUNT(*) FROM t1; +COUNT(*) 1 connection node_1; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_notify_cmd.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_notify_cmd.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_notify_cmd.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_notify_cmd.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,10 +1,11 @@ connection node_1; -SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership; -COUNT(DISTINCT uuid) = 2 -1 -SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status; -MAX(size) = 2 -1 -SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status; -COUNT(DISTINCT idx) = 2 +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; +COUNT(DISTINCT uuid) +2 +SELECT MAX(size) FROM mtr_wsrep_notify.status; +MAX(size) +2 +SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; +COUNT(DISTINCT idx) 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_reject_queries.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_reject_queries.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_var_reject_queries.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_var_reject_queries.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +call mtr.add_suppression("WSREP has not yet prepared node for application use"); CREATE TABLE t1 (f1 INTEGER); connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; connection node_1; @@ -5,14 +6,14 @@ ERROR HY000: Variable 'wsrep_reject_queries' is a GLOBAL variable and should be set with SET GLOBAL SET GLOBAL wsrep_reject_queries = ALL; SELECT * FROM t1; -ERROR 08S01: WSREP has not yet prepared node for application use +Got one of the listed errors SET GLOBAL wsrep_reject_queries = ALL_KILL; connection node_1a; SELECT * FROM t1; Got one of the listed errors connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1; SELECT * FROM t1; -ERROR 08S01: WSREP has not yet prepared node for application use +Got one of the listed errors connection node_2; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/galera_wsrep_new_cluster.result 2020-01-26 18:37:28.000000000 +0000 @@ -25,7 +25,7 @@ 1 SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index'; VARIABLE_VALUE = 0 -1 +0 SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'; VARIABLE_VALUE = 'ON' 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/r/mysql-wsrep#332.result mariadb-10.3-10.3.22/mysql-test/suite/galera/r/mysql-wsrep#332.result --- mariadb-10.3-10.3.18/mysql-test/suite/galera/r/mysql-wsrep#332.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/r/mysql-wsrep#332.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,26 +1,36 @@ +connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; +connection node_1; CREATE TABLE p (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=INNODB; CREATE TABLE c (f1 INTEGER PRIMARY KEY, p_id INTEGER) ENGINE=INNODB; INSERT INTO p VALUES (1, 0); INSERT INTO p VALUES (2, 0); INSERT INTO c VALUES (1, 1); INSERT INTO c VALUES (2, 2); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE p SET f1 = f1 + 100; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; ALTER TABLE c ADD FOREIGN KEY (p_id) REFERENCES p(f1); +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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 +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction +connection node_2; SELECT * FROM p; f1 f2 1 0 @@ -31,6 +41,7 @@ 2 2 DROP TABLE c; DROP TABLE p; +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, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB; @@ -38,23 +49,31 @@ INSERT INTO p2 VALUES (1, 0), (2, 0); INSERT INTO c VALUES (1, 1, 1); INSERT INTO c VALUES (2, 2, 2); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE p1 SET f1 = f1 + 100; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1); +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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 +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction +connection node_2; SELECT * FROM p1; f1 f2 1 0 @@ -70,6 +89,7 @@ DROP TABLE c; DROP TABLE p1; DROP TABLE p2; +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, p_id1 INTEGER, p_id2 INTEGER) ENGINE=INNODB; @@ -77,23 +97,31 @@ INSERT INTO p2 VALUES (1, 0), (2, 0); INSERT INTO c VALUES (1, 1, 1); INSERT INTO c VALUES (2, 2, 2); +connection node_1; SET AUTOCOMMIT=ON; START TRANSACTION; UPDATE p2 SET f1 = f1 + 100; +connection node_1a; SET SESSION wsrep_sync_wait = 0; SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync'; +connection node_2; ALTER TABLE c ADD FOREIGN KEY (p_id1) REFERENCES p1(f1), ADD FOREIGN KEY (p_id2) REFERENCES p2(f1); +connection node_1a; 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'; +connection node_1; COMMIT; +connection node_1a; 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 +connection node_1; +ERROR 40001: Deadlock: wsrep aborted transaction +connection node_2; SELECT * FROM p1; f1 f2 1 0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-284.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-284.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-284.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-284.test 2020-01-26 18:37:28.000000000 +0000 @@ -2,10 +2,13 @@ # MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR # +--source include/have_log_bin.inc --source include/galera_cluster.inc ---source include/have_innodb.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("WSREP has not yet prepared node for application use"); + --disable_query_log --eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1; --enable_query_log @@ -18,11 +21,14 @@ --let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status' --source include/wait_condition.inc SET SESSION wsrep_on = ON; + #wsrep_sync_wait is set to zero because when slave tries to connect it it ask for queries like SELECT UNIX_TIMESTAMP() on node 1 which will fail, causing #a warning in slave error log. SET global wsrep_sync_wait=0; --connection node_3 +SELECT @@wsrep_on; +--sleep 1 START SLAVE; --let $slave_param= Slave_IO_Running --let $slave_param_value= Connecting @@ -50,8 +56,8 @@ --connection node_1 DROP TABLE t1; - --eval SET global wsrep_sync_wait=$wsrep_sync_wait_state + --connection node_3 --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' --source include/wait_condition.inc @@ -60,11 +66,5 @@ RESET SLAVE ALL; CALL mtr.add_suppression('failed registering on master'); -CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work'); ---connection node_1 -RESET MASTER; -CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member'); ---connection node_2 -CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member'); \ No newline at end of file diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-313-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-313-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-313-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-313-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-313.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-313.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-313.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-313.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-328B.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-328B.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-328B.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-328B.test 2020-01-26 18:37:28.000000000 +0000 @@ -8,6 +8,7 @@ # --source include/galera_cluster.inc +--source include/big_test.inc --source suite/galera/t/MW-328-header.inc --connection node_2 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-328C.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-328C.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-328C.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-328C.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -# -# MW-328 Fix unnecessary/silent BF aborts -# - -# -# Make sure that a high value of wsrep_retry_autocommit -# masks all deadlock errors -# - ---source include/galera_cluster.inc ---source include/big_test.inc ---source suite/galera/t/MW-328-header.inc - ---connection node_2 ---let $count = 100 - -SET SESSION wsrep_retry_autocommit = 10000; - ---disable_query_log - -while ($count) -{ - --error 0 - INSERT IGNORE INTO t2 SELECT f2 FROM t1; - - --disable_result_log - --error 0 - SELECT 1 FROM DUAL; - --enable_result_log - - --dec $count -} - ---enable_query_log - ---source suite/galera/t/MW-328-footer.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-329-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-329-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-329-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-329-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep-retry-autocommit=0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-329.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-329.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-329.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-329.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep-retry-autocommit=0 + +[mysqld.2] + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-336.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-336.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-336.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-336.test 2020-01-26 18:37:28.000000000 +0000 @@ -13,7 +13,7 @@ # ensure that the threads have actually started running --echo # Set slave threads to 10 step 1 ---let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; +--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; --let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist --source include/wait_condition_with_debug.inc @@ -23,20 +23,18 @@ INSERT INTO t1 VALUES (1); --connection node_1 -SET SESSION wsrep_sync_wait=15; -SELECT COUNT(*) FROM t1; - SET GLOBAL wsrep_slave_threads = 10; +# Note that above insert could be handled by one of the slave threads --echo # Set slave threads to 10 step 2 ---let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; ---let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist +--let $wait_condition = SELECT VARIABLE_VALUE >= 9 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; +--let $wait_condition_on_error_output = SELECT COUNT(*), 9 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist --source include/wait_condition_with_debug.inc SET GLOBAL wsrep_slave_threads = 20; --echo # Set slave threads to 20 ---let $wait_condition = SELECT COUNT(*) = 20 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; +--let $wait_condition = SELECT VARIABLE_VALUE = 20 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; --let $wait_condition_on_error_output = SELECT COUNT(*), 20 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist --source include/wait_condition_with_debug.inc @@ -58,7 +56,7 @@ SET GLOBAL wsrep_slave_threads = 10; SELECT COUNT(*) FROM t1; --echo # Set slave threads to 10 step 3 ---let $wait_condition = SELECT COUNT(*) = 10 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; +--let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; --let $wait_condition_on_error_output = SELECT COUNT(*), 10 as EXPECTED_VALUE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle'; show processlist --source include/wait_condition_with_debug.inc @@ -73,6 +71,8 @@ INSERT INTO t1 VALUES (18); INSERT INTO t1 VALUES (19); INSERT INTO t1 VALUES (20); +INSERT INTO t1 VALUES (21); +INSERT INTO t1 VALUES (22); --connection node_1 SELECT COUNT(*) FROM t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-388.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-388.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-388.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-388.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,8 @@ SET GLOBAL wsrep_slave_threads = 2; SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb"; +--let $expected_cert_failures = `SELECT VARIABLE_VALUE + 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures'` + --connection node_2 --send INSERT INTO t1 VALUES (1, 'node 2'); @@ -40,15 +42,15 @@ --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 SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT VARIABLE_VALUE = $expected_cert_failures FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_cert_failures' +--source include/wait_condition.inc SET GLOBAL DEBUG_DBUG = ""; -SET DEBUG_SYNC = "now SIGNAL wsrep_after_replication_continue"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; --connection node_2 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-44-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-44-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-44-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-44-master.opt 2020-01-26 18:37:28.000000000 +0000 @@ -1,2 +1 @@ --log-output=TABLE ---general-log=OFF diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-44.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-44.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-44.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-44.test 2020-01-26 18:37:28.000000000 +0000 @@ -3,40 +3,30 @@ # --source include/galera_cluster.inc ---source include/have_innodb.inc --connection node_1 TRUNCATE TABLE mysql.general_log; ---sleep 1 --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log; ---source include/wait_condition.inc -TRUNCATE TABLE mysql.general_log; +--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE '%mysql.general_log%' +--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log +--source include/wait_condition_with_debug.inc ---sleep 1 --connection node_1 ---let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log; ---source include/wait_condition.inc -SELECT Argument FROM mysql.general_log; - -SET GLOBAL general_log='ON'; SET SESSION wsrep_osu_method=TOI; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; SET SESSION wsrep_osu_method=RSU; ALTER TABLE t1 ADD COLUMN f2 INTEGER; SET SESSION wsrep_osu_method=TOI; ---let $wait_condition = SELECT COUNT(argument) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; ---source include/wait_condition.inc - -SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%'; +--let $wait_condition = SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%" +--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log +--source include/wait_condition_with_debug.inc --connection node_2 -SELECT Argument FROM mysql.general_log; -DROP TABLE t1; -SET GLOBAL general_log='OFF'; ---connection node_1 -SET GLOBAL general_log='OFF'; +--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%" +--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log +--source include/wait_condition_with_debug.inc +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-86-wait1-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait1-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-86-wait1-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait1-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-86-wait8-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait8-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-86-wait8-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait8-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-86-wait8.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait8.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/MW-86-wait8.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/MW-86-wait8.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/enforce_storage_engine2.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/enforce_storage_engine2.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/enforce_storage_engine2.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/enforce_storage_engine2.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +enforce_storage_engine=innodb +sql_mode='' + +[mysqld.2] +enforce_storage_engine=innodb +sql_mode='' + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/enforce_storage_engine2.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/enforce_storage_engine2.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/enforce_storage_engine2.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/enforce_storage_engine2.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ ---enforce_storage_engine=innodb --sql_mode='' - diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---lock_wait_timeout=5 --innodb_lock_wait_timeout=5 --wait_timeout=5 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,14 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +lock_wait_timeout=5 +innodb_lock_wait_timeout=5 +wait_timeout=5 + +[mysqld.2] +lock_wait_timeout=5 +innodb_lock_wait_timeout=5 +wait_timeout=5 + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_ctas.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,5 @@ +!include ../galera_2nodes_as_slave.cnf + +# make sure master server uses ROW format for replication +[mysqld] +binlog-format=row diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_ctas.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_ctas.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_ctas.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_ctas.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,75 @@ +# +# Test Galera as a slave to a MySQL master +# +# The galera/galera_2node_slave.cnf describes the setup of the nodes +# also, for this test, master server must have binlog_format=ROW +# + +--source include/have_innodb.inc + +# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--source include/galera_cluster.inc + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 + +--connection node_2 +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE; + + +# make sure master server has binlog_format=ROW +--connection node_1 +SHOW VARIABLES LIKE 'binlog_format'; + +# +# test phase one, issue CTAS with empty source table +# +--connection node_1 +CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; + +CREATE TABLE target AS SELECT * FROM source; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; +--source include/wait_condition.inc + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; +--source include/wait_condition.inc + +# +# test phase two, issue CTAS with populated source table +# +--connection node_1 +DROP TABLE target; +INSERT INTO source VALUES(1); + +CREATE TABLE target AS SELECT * FROM source; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM target; +--source include/wait_condition.inc + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 1 FROM target; +--source include/wait_condition.inc + +--connection node_1 +DROP TABLE source; +DROP TABLE target; + +--connection node_3 +--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target'; +--source include/wait_condition.inc + + +--connection node_2 +STOP SLAVE; +RESET SLAVE ALL; + +--connection node_1 +RESET MASTER; + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,6 @@ +!include ../galera_2nodes_as_slave.cnf + +[mysqld] +log-bin=mysqld-bin +log-slave-updates +binlog-format=ROW diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,65 @@ +# +# Test Galera as a slave to a MariaDB master using GTIDs +# +# suite/galera/galera_2nodes_as_slave.cnf describes the setup of the nodes +# suite/galera/t/galera_as_slave_gtid.cnf has the GTID options +# +# This test will replicate writes to MyISAM table and check that slave node is able +# to apply them. +# mysql.gtid_slave_pos table should be defined as innodb engine, original problem +# by writes to mysql.gtid_slave_pos, whereas the replicated transaction contained +# no innodb writes +# + +--source include/have_innodb.inc + +# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc +--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 +--source include/galera_cluster.inc + +--connection node_2 +# make sure gtid_slave_pos is of innodb engine, mtr does not currently provide that +ALTER TABLE mysql.gtid_slave_pos engine = InnoDB; + +--disable_query_log +--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1; +--enable_query_log +START SLAVE; + +--connection node_1 +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM; +INSERT INTO t1 VALUES(1); + +SELECT LENGTH(@@global.gtid_binlog_state) > 1; +--let $gtid_binlog_state_node1 = `SELECT @@global.gtid_binlog_state;` + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; +--source include/wait_condition.inc + +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--source include/wait_condition.inc + +--disable_query_log +--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal; +--enable_query_log + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +SELECT COUNT(*) = 0 FROM t1; + +--disable_query_log +--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal; +--enable_query_log + +--echo #cleanup +--connection node_1 +DROP TABLE t1; +reset master; + +--connection node_2 +STOP SLAVE; +RESET SLAVE ALL; +reset master; + +--connection node_3 +reset master; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_bf_background_statistics.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +innodb_stats_persistent=ON + +[mysqld.2] +innodb_stats_persistent=ON + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_bf_background_statistics.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_bf_background_statistics.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_bf_background_statistics.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_bf_background_statistics.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---innodb_stats_persistent=ON diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_checksum-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---binlog-checksum=CRC32 --master-verify-checksum=1 --slave-sql-verify-checksum=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_checksum.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_checksum.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_checksum.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_checksum.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +binlog-checksum=CRC32 +master-verify-checksum=1 +slave-sql-verify-checksum=1 + +[mysqld.2] +binlog-checksum=CRC32 +master-verify-checksum=1 +slave-sql-verify-checksum=1 + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---binlog-row-event-max-size=4294967040 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_max.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +binlog-row-event-max-size=4294967040 + +[mysqld.2] + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_min-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---binlog-row-event-max-size=256 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_binlog_event_max_size_min.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +binlog-row-event-max-size=256 + +[mysqld.2] + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_events2.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_events2.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_events2.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_events2.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,148 @@ +--source include/galera_cluster.inc + +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc + +# +# Test case 1: "ONE TIME" events should be dropped on slave nodes after expiring on master (event creator node) +# + +--connection node_1 + +CREATE TABLE event_table(a int) engine=innodb; + +CREATE EVENT event_2 ON SCHEDULE EVERY 1 SECOND +ENDS NOW() + INTERVAL 6 SECOND +ON COMPLETION NOT PRESERVE +DO + INSERT INTO event_table VALUES (1); + +--echo # node_1 event should be there +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; + +--connection node_2 +set global wsrep_sync_wait=15; +--echo # node_2 event should be there +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; + +--connection node_1 +SET GLOBAL event_scheduler=ON; +SHOW VARIABLES LIKE 'event_scheduler'; + +# Let event_2 reach the end of its execution interval +let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_2'; +--source include/wait_condition.inc + +--echo # node_1 event should be removed +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; + +--connection node_2 +--echo # node_2 event should be removed +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_2'; + +--connection node_1 +SET GLOBAL event_scheduler=OFF; +DROP TABLE event_table; + +# +# Test case 2: After doing ALTER EVENT, slave nodes should have same definer as master +# + +--connection node_1 + +CREATE DATABASE IF NOT EXISTS events_test; +use events_test; +CREATE USER ev_test@localhost; +GRANT ALL ON events_test.* to ev_test@localhost; +connect (ev_con1,localhost,ev_test,,events_test); + +CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123; +--replace_column 8 # 9 # +SHOW EVENTS; +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME; +ALTER EVENT one_event ON SCHEDULE EVERY 10 SECOND; +--echo "The definer should be ev_test@localhost" +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; + +--connection node_2 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; +--source include/wait_condition.inc + +use events_test; +--echo "The definer should be ev_test@localhost" +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; + +--connection node_1 +--disconnect ev_con1 +use test; +DROP EVENT events_test.one_event; +DROP USER ev_test@localhost; +DROP DATABASE events_test; + +# +# Test case 3: After SST from master node (the one where event is ENABLED) , slave event status should be 'SLAVESIDE_DISABLED' +# + +--connection node_1 +use test; +CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123; + +--echo # node_1 Event should be enabled +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; + +--connection node_2 +use test; +--echo # node_2 Event should be SERVERSIDE_DISABLED +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; + +CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1)) engine=InnoDB; +INSERT INTO t1 VALUES (1, 'a'), (2, 'a'), (3, 'a'); + +SELECT * FROM t1; + +# Initiate normal shutdown on the node 2 and wait until shutdown has been completed: + +--echo Shutting down server ... +--source include/shutdown_mysqld.inc + +--connection node_1 + +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +UPDATE t1 SET f2 = 'b' WHERE f1 > 1; +UPDATE t1 SET f2 = 'c' WHERE f1 > 2; + +SELECT * FROM t1; + +--connection node_2 + +# Remove the "grastate.dat" file (to initiate new SST) and restart node 2 + +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat + +--echo # Force SST from node_1 to node_2 +--let $start_mysqld_params= +--echo Starting server ... +--source include/start_mysqld.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' +--source include/wait_condition.inc + +# Sanity check (node 2 is running now and can perform SQL operators): + +SELECT * FROM t1; +--echo # node_2 Event should be SERVERSIDE_DISABLED +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; + +--connection node_1 +SELECT * FROM t1; +--echo # node_1 Event should be ENABLED +SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; + +DROP TABLE t1; +DROP EVENT one_event; + +--source include/auto_increment_offset_restore.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---query_cache_type=1 --query_cache_size=1000000 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1000000 + +[mysqld.2] +query_cache_type=1 +query_cache_size=1000000 + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush_local.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush_local.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush_local.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush_local.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1000000 +wsrep_replicate_myisam=ON + +[mysqld.2] +query_cache_type=1 +query_cache_size=1000000 +wsrep_replicate_myisam=ON + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush_local.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush_local.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_flush_local.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_flush_local.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ ---query_cache_type=1 ---query_cache_size=1000000 ---wsrep_replicate_myisam=ON diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_forced_binlog_format.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_forced_binlog_format.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_forced_binlog_format.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_forced_binlog_format.test 2020-01-26 18:37:28.000000000 +0000 @@ -7,14 +7,20 @@ --source include/galera_cluster.inc --connection node_1 +SET SESSION wsrep_on=OFF; RESET MASTER; +SET SESSION wsrep_on=ON; +--disable_warnings SET SESSION binlog_format = 'STATEMENT'; +--enable_warnings CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); +--disable_warnings SET SESSION binlog_format = 'MIXED'; +--enable_warnings INSERT INTO t1 VALUES (2); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_gtid-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_gtid-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_gtid.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_gtid.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_gtid.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_gtid.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_gtid.test 2020-01-26 18:37:28.000000000 +0000 @@ -11,14 +11,18 @@ INSERT INTO t1 VALUES (1); --connection node_2 -SELECT COUNT(*) = 1 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 +--source include/wait_condition.inc UPDATE t1 SET f1 = 2; --let $gtid_binlog_state_node2 = `SELECT @@global.gtid_binlog_state;` --connection node_1 -SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2; +SET SESSION wsrep_sync_wait = 15; +--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2 +--source include/wait_condition.inc +SELECT * from t1; --disable_query_log --eval SELECT '$gtid_binlog_state_node2' = @@global.gtid_binlog_state AS gtid_binlog_state_equal; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_load_data.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_load_data.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_load_data.cnf 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_load_data.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,15 @@ !include ../galera_2nodes.cnf -[mysqld] +[mysqld.1] +secure-file-priv = "" +innodb_file_format ='Barracuda' +innodb_file_per_table = ON +innodb_stats_persistent=ON +innodb_stats_auto_recalc=ON +innodb_stats_persistent_sample_pages=20 +innodb_stats_sample_pages=8 + +[mysqld.2] secure-file-priv = "" innodb_file_format ='Barracuda' innodb_file_per_table = ON diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_log_bin-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_log_bin-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin --log-slave-updates diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_log_bin.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_log_bin.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin +log-slave-updates + +[mysqld.2] +log-bin +log-slave-updates + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_log_bin.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_log_bin.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_log_bin.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,5 +1,5 @@ --source include/galera_cluster.inc ---source include/have_innodb.inc +--source include/force_restart.inc --connection node_1 reset master; @@ -39,5 +39,4 @@ --echo #cleanup --connection node_1 RESET MASTER; ---connection node_2 -reset master; + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_mdev_13787.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_mdev_13787.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_mdev_13787.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_mdev_13787.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +innodb-stats-persistent=1 + +[mysqld.2] +innodb-stats-persistent=1 + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_mdev_13787.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_mdev_13787.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_mdev_13787.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_mdev_13787.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---innodb-stats-persistent=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_partition.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_partition.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_partition.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_partition.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,18 @@ +!include ../galera_4nodes.cnf + +[mysqld.1] +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1' +wsrep_slave_threads=10 + +[mysqld.2] +wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1' +wsrep_slave_threads=10 + +[mysqld.3] +wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2' +wsrep_slave_threads=10 + +[mysqld.4] +wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3' +wsrep_slave_threads=10 + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_partition.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_partition.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_partition.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_partition.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,450 @@ +--source include/galera_cluster.inc +--source include/have_partition.inc + +--connection node_1 + +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); + +--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 +--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 + +--connection node_1 + +CREATE TABLE t1( + id bigint unsigned NOT NULL AUTO_INCREMENT, + dt datetime NOT NULL, + PRIMARY KEY (id,dt), + KEY dt_idx (dt) +) ENGINE=InnoDB +PARTITION BY RANGE( TO_DAYS(dt) ) ( +PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ), +PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ), +PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ), +PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ), +PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ), +PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ), +PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ), +PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ), +PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ), +PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ), +PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ), +PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ), +PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ), +PARTITION rx2011 VALUES LESS THAN MAXVALUE); + +DELIMITER |; +CREATE PROCEDURE p1 (repeat_count int) +BEGIN + DECLARE current_num int; + SET current_num = 0; + WHILE current_num < repeat_count do + INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-02-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-03-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-04-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-06-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00'); + INSERT INTO t1 VALUES (NULL, '2012-02-21 00:00:00'); + COMMIT; + SET current_num = current_num + 1; + END WHILE; +END| +DELIMITER ;| + +insert into t1 (id, dt) values (1, '2010-01-02 00:00:00'); +insert into t1 (id, dt) values (2, '2010-01-03 00:00:00'); +insert into t1 (id, dt) values (3, '2010-01-04 00:00:00'); +insert into t1 (id, dt) values (4, '2010-01-05 00:00:00'); +insert into t1 (id, dt) values (5, '2010-01-06 00:00:00'); +insert into t1 (id, dt) values (6, '2010-01-07 00:00:00'); +insert into t1 (id, dt) values (7, '2010-01-08 00:00:00'); +insert into t1 (id, dt) values (8, '2010-01-09 00:00:00'); +insert into t1 (id, dt) values (9, '2010-01-10 00:00:00'); +insert into t1 (id, dt) values (10, '2010-01-11 00:00:00'); +insert into t1 (id, dt) values (11, '2010-01-12 00:00:00'); +insert into t1 (id, dt) values (12, '2010-01-13 00:00:00'); +insert into t1 (id, dt) values (13, '2010-01-14 00:00:00'); +insert into t1 (id, dt) values (14, '2010-01-15 00:00:00'); +insert into t1 (id, dt) values (15, '2010-01-16 00:00:00'); +insert into t1 (id, dt) values (16, '2010-01-17 00:00:00'); +insert into t1 (id, dt) values (17, '2010-01-18 00:00:00'); +insert into t1 (id, dt) values (18, '2010-01-19 00:00:00'); +insert into t1 (id, dt) values (19, '2010-01-20 00:00:00'); +insert into t1 (id, dt) values (20, '2010-01-21 00:00:00'); +insert into t1 (id, dt) values (21, '2010-01-22 00:00:00'); +insert into t1 (id, dt) values (22, '2010-01-23 00:00:00'); +insert into t1 (id, dt) values (23, '2010-01-24 00:00:00'); +insert into t1 (id, dt) values (24, '2010-01-25 00:00:00'); +insert into t1 (id, dt) values (25, '2010-01-26 00:00:00'); +insert into t1 (id, dt) values (26, '2010-01-27 00:00:00'); +insert into t1 (id, dt) values (27, '2010-01-28 00:00:00'); +insert into t1 (id, dt) values (28, '2010-01-29 00:00:00'); +insert into t1 (id, dt) values (29, '2010-01-30 00:00:00'); +insert into t1 (id, dt) values (30, '2010-01-31 00:00:00'); +insert into t1 (id, dt) values (31, '2010-02-01 00:00:00'); +insert into t1 (id, dt) values (32, '2010-02-02 00:00:00'); +insert into t1 (id, dt) values (33, '2010-02-03 00:00:00'); +insert into t1 (id, dt) values (34, '2010-02-04 00:00:00'); +insert into t1 (id, dt) values (35, '2010-02-05 00:00:00'); +insert into t1 (id, dt) values (36, '2010-02-06 00:00:00'); +insert into t1 (id, dt) values (37, '2010-02-07 00:00:00'); +insert into t1 (id, dt) values (38, '2010-02-08 00:00:00'); +insert into t1 (id, dt) values (39, '2010-02-09 00:00:00'); +insert into t1 (id, dt) values (40, '2010-02-10 00:00:00'); +insert into t1 (id, dt) values (41, '2010-02-11 00:00:00'); +insert into t1 (id, dt) values (42, '2010-02-12 00:00:00'); +insert into t1 (id, dt) values (43, '2010-02-13 00:00:00'); +insert into t1 (id, dt) values (44, '2010-02-14 00:00:00'); +insert into t1 (id, dt) values (45, '2010-02-15 00:00:00'); +insert into t1 (id, dt) values (46, '2010-02-16 00:00:00'); +insert into t1 (id, dt) values (47, '2010-02-17 00:00:00'); +insert into t1 (id, dt) values (48, '2010-02-18 00:00:00'); +insert into t1 (id, dt) values (49, '2010-02-19 00:00:00'); +insert into t1 (id, dt) values (50, '2010-02-20 00:00:00'); +insert into t1 (id, dt) values (51, '2010-02-21 00:00:00'); +insert into t1 (id, dt) values (52, '2010-02-22 00:00:00'); +insert into t1 (id, dt) values (53, '2010-02-23 00:00:00'); +insert into t1 (id, dt) values (54, '2010-02-24 00:00:00'); +insert into t1 (id, dt) values (55, '2010-02-25 00:00:00'); +insert into t1 (id, dt) values (56, '2010-02-26 00:00:00'); +insert into t1 (id, dt) values (57, '2010-02-27 00:00:00'); +insert into t1 (id, dt) values (58, '2010-02-28 00:00:00'); +insert into t1 (id, dt) values (59, '2010-03-01 00:00:00'); +insert into t1 (id, dt) values (60, '2010-03-02 00:00:00'); +insert into t1 (id, dt) values (61, '2010-03-03 00:00:00'); +insert into t1 (id, dt) values (62, '2010-03-04 00:00:00'); +insert into t1 (id, dt) values (63, '2010-03-05 00:00:00'); +insert into t1 (id, dt) values (64, '2010-03-06 00:00:00'); +insert into t1 (id, dt) values (65, '2010-03-07 00:00:00'); +insert into t1 (id, dt) values (66, '2010-03-08 00:00:00'); +insert into t1 (id, dt) values (67, '2010-03-09 00:00:00'); +insert into t1 (id, dt) values (68, '2010-03-10 00:00:00'); +insert into t1 (id, dt) values (69, '2010-03-11 00:00:00'); +insert into t1 (id, dt) values (70, '2010-03-12 00:00:00'); +insert into t1 (id, dt) values (71, '2010-03-13 00:00:00'); +insert into t1 (id, dt) values (72, '2010-03-14 00:00:00'); +insert into t1 (id, dt) values (73, '2010-03-15 00:00:00'); +insert into t1 (id, dt) values (74, '2010-03-16 00:00:00'); +insert into t1 (id, dt) values (75, '2010-03-17 00:00:00'); +insert into t1 (id, dt) values (76, '2010-03-18 00:00:00'); +insert into t1 (id, dt) values (77, '2010-03-19 00:00:00'); +insert into t1 (id, dt) values (78, '2010-03-20 00:00:00'); +insert into t1 (id, dt) values (79, '2010-03-21 00:00:00'); +insert into t1 (id, dt) values (80, '2010-03-22 00:00:00'); +insert into t1 (id, dt) values (81, '2010-03-23 00:00:00'); +insert into t1 (id, dt) values (82, '2010-03-24 00:00:00'); +insert into t1 (id, dt) values (83, '2010-03-25 00:00:00'); +insert into t1 (id, dt) values (84, '2010-03-26 00:00:00'); +insert into t1 (id, dt) values (85, '2010-03-27 00:00:00'); +insert into t1 (id, dt) values (86, '2010-03-28 00:00:00'); +insert into t1 (id, dt) values (87, '2010-03-29 00:00:00'); +insert into t1 (id, dt) values (88, '2010-03-30 00:00:00'); +insert into t1 (id, dt) values (89, '2010-03-31 00:00:00'); +insert into t1 (id, dt) values (90, '2010-04-01 00:00:00'); +insert into t1 (id, dt) values (91, '2010-04-02 00:00:00'); +insert into t1 (id, dt) values (92, '2010-04-03 00:00:00'); +insert into t1 (id, dt) values (93, '2010-04-04 00:00:00'); +insert into t1 (id, dt) values (94, '2010-04-05 00:00:00'); +insert into t1 (id, dt) values (95, '2010-04-06 00:00:00'); +insert into t1 (id, dt) values (96, '2010-04-07 00:00:00'); +insert into t1 (id, dt) values (97, '2010-04-08 00:00:00'); +insert into t1 (id, dt) values (98, '2010-04-09 00:00:00'); +insert into t1 (id, dt) values (99, '2010-04-10 00:00:00'); +insert into t1 (id, dt) values (100, '2010-04-11 00:00:00'); +insert into t1 (id, dt) values (101, '2010-04-12 00:00:00'); +insert into t1 (id, dt) values (102, '2010-04-13 00:00:00'); +insert into t1 (id, dt) values (103, '2010-04-14 00:00:00'); +insert into t1 (id, dt) values (104, '2010-04-15 00:00:00'); +insert into t1 (id, dt) values (105, '2010-04-16 00:00:00'); +insert into t1 (id, dt) values (106, '2010-04-17 00:00:00'); +insert into t1 (id, dt) values (107, '2010-04-18 00:00:00'); +insert into t1 (id, dt) values (108, '2010-04-19 00:00:00'); +insert into t1 (id, dt) values (109, '2010-04-20 00:00:00'); +insert into t1 (id, dt) values (110, '2010-04-21 00:00:00'); +insert into t1 (id, dt) values (111, '2010-04-22 00:00:00'); +insert into t1 (id, dt) values (112, '2010-04-23 00:00:00'); +insert into t1 (id, dt) values (113, '2010-04-24 00:00:00'); +insert into t1 (id, dt) values (114, '2010-04-25 00:00:00'); +insert into t1 (id, dt) values (115, '2010-04-26 00:00:00'); +insert into t1 (id, dt) values (116, '2010-04-27 00:00:00'); +insert into t1 (id, dt) values (117, '2010-04-28 00:00:00'); +insert into t1 (id, dt) values (118, '2010-04-29 00:00:00'); +insert into t1 (id, dt) values (119, '2010-04-30 00:00:00'); +insert into t1 (id, dt) values (120, '2010-05-01 00:00:00'); +insert into t1 (id, dt) values (121, '2010-05-02 00:00:00'); +insert into t1 (id, dt) values (122, '2010-05-03 00:00:00'); +insert into t1 (id, dt) values (123, '2010-05-04 00:00:00'); +insert into t1 (id, dt) values (124, '2010-05-05 00:00:00'); +insert into t1 (id, dt) values (125, '2010-05-06 00:00:00'); +insert into t1 (id, dt) values (126, '2010-05-07 00:00:00'); +insert into t1 (id, dt) values (127, '2010-05-08 00:00:00'); +insert into t1 (id, dt) values (128, '2010-05-09 00:00:00'); +insert into t1 (id, dt) values (129, '2010-05-10 00:00:00'); +insert into t1 (id, dt) values (130, '2010-05-11 00:00:00'); +insert into t1 (id, dt) values (131, '2010-05-12 00:00:00'); +insert into t1 (id, dt) values (132, '2010-05-13 00:00:00'); +insert into t1 (id, dt) values (133, '2010-05-14 00:00:00'); +insert into t1 (id, dt) values (134, '2010-05-15 00:00:00'); +insert into t1 (id, dt) values (135, '2010-05-16 00:00:00'); +insert into t1 (id, dt) values (136, '2010-05-17 00:00:00'); +insert into t1 (id, dt) values (137, '2010-05-18 00:00:00'); +insert into t1 (id, dt) values (138, '2010-05-19 00:00:00'); +insert into t1 (id, dt) values (139, '2010-05-20 00:00:00'); +insert into t1 (id, dt) values (140, '2010-05-21 00:00:00'); +insert into t1 (id, dt) values (141, '2010-05-22 00:00:00'); +insert into t1 (id, dt) values (142, '2010-05-23 00:00:00'); +insert into t1 (id, dt) values (143, '2010-05-24 00:00:00'); +insert into t1 (id, dt) values (144, '2010-05-25 00:00:00'); +insert into t1 (id, dt) values (145, '2010-05-26 00:00:00'); +insert into t1 (id, dt) values (146, '2010-05-27 00:00:00'); +insert into t1 (id, dt) values (147, '2010-05-28 00:00:00'); +insert into t1 (id, dt) values (148, '2010-05-29 00:00:00'); +insert into t1 (id, dt) values (149, '2010-05-30 00:00:00'); +insert into t1 (id, dt) values (150, '2010-05-31 00:00:00'); +insert into t1 (id, dt) values (151, '2010-06-01 00:00:00'); +insert into t1 (id, dt) values (152, '2010-06-02 00:00:00'); +insert into t1 (id, dt) values (153, '2010-06-03 00:00:00'); +insert into t1 (id, dt) values (154, '2010-06-04 00:00:00'); +insert into t1 (id, dt) values (155, '2010-06-05 00:00:00'); +insert into t1 (id, dt) values (156, '2010-06-06 00:00:00'); +insert into t1 (id, dt) values (157, '2010-06-07 00:00:00'); +insert into t1 (id, dt) values (158, '2010-06-08 00:00:00'); +insert into t1 (id, dt) values (159, '2010-06-09 00:00:00'); +insert into t1 (id, dt) values (160, '2010-06-10 00:00:00'); +insert into t1 (id, dt) values (161, '2010-06-11 00:00:00'); +insert into t1 (id, dt) values (162, '2010-06-12 00:00:00'); +insert into t1 (id, dt) values (163, '2010-06-13 00:00:00'); +insert into t1 (id, dt) values (164, '2010-06-14 00:00:00'); +insert into t1 (id, dt) values (165, '2010-06-15 00:00:00'); +insert into t1 (id, dt) values (166, '2010-06-16 00:00:00'); +insert into t1 (id, dt) values (167, '2010-06-17 00:00:00'); +insert into t1 (id, dt) values (168, '2010-06-18 00:00:00'); +insert into t1 (id, dt) values (169, '2010-06-19 00:00:00'); +insert into t1 (id, dt) values (170, '2010-06-20 00:00:00'); +insert into t1 (id, dt) values (171, '2010-06-21 00:00:00'); +insert into t1 (id, dt) values (172, '2010-06-22 00:00:00'); +insert into t1 (id, dt) values (173, '2010-06-23 00:00:00'); +insert into t1 (id, dt) values (174, '2010-06-24 00:00:00'); +insert into t1 (id, dt) values (175, '2010-06-25 00:00:00'); +insert into t1 (id, dt) values (176, '2010-06-26 00:00:00'); +insert into t1 (id, dt) values (177, '2010-06-27 00:00:00'); +insert into t1 (id, dt) values (178, '2010-06-28 00:00:00'); +insert into t1 (id, dt) values (179, '2010-06-29 00:00:00'); +insert into t1 (id, dt) values (180, '2010-06-30 00:00:00'); +insert into t1 (id, dt) values (181, '2010-07-01 00:00:00'); +insert into t1 (id, dt) values (182, '2010-07-02 00:00:00'); +insert into t1 (id, dt) values (183, '2010-07-03 00:00:00'); +insert into t1 (id, dt) values (184, '2010-07-04 00:00:00'); +insert into t1 (id, dt) values (185, '2010-07-05 00:00:00'); +insert into t1 (id, dt) values (186, '2010-07-06 00:00:00'); +insert into t1 (id, dt) values (187, '2010-07-07 00:00:00'); +insert into t1 (id, dt) values (188, '2010-07-08 00:00:00'); +insert into t1 (id, dt) values (189, '2010-07-09 00:00:00'); +insert into t1 (id, dt) values (190, '2010-07-10 00:00:00'); +insert into t1 (id, dt) values (191, '2010-07-11 00:00:00'); +insert into t1 (id, dt) values (192, '2010-07-12 00:00:00'); +insert into t1 (id, dt) values (193, '2010-07-13 00:00:00'); +insert into t1 (id, dt) values (194, '2010-07-14 00:00:00'); +insert into t1 (id, dt) values (195, '2010-07-15 00:00:00'); +insert into t1 (id, dt) values (196, '2010-07-16 00:00:00'); +insert into t1 (id, dt) values (197, '2010-07-17 00:00:00'); +insert into t1 (id, dt) values (198, '2010-07-18 00:00:00'); +insert into t1 (id, dt) values (199, '2010-07-19 00:00:00'); +insert into t1 (id, dt) values (200, '2010-07-20 00:00:00'); +insert into t1 (id, dt) values (201, '2010-07-21 00:00:00'); +insert into t1 (id, dt) values (202, '2010-07-22 00:00:00'); +insert into t1 (id, dt) values (203, '2010-07-23 00:00:00'); +insert into t1 (id, dt) values (204, '2010-07-24 00:00:00'); +insert into t1 (id, dt) values (205, '2010-07-25 00:00:00'); +insert into t1 (id, dt) values (206, '2010-07-26 00:00:00'); +insert into t1 (id, dt) values (207, '2010-07-27 00:00:00'); +insert into t1 (id, dt) values (208, '2010-07-28 00:00:00'); +insert into t1 (id, dt) values (209, '2010-07-29 00:00:00'); +insert into t1 (id, dt) values (210, '2010-07-30 00:00:00'); +insert into t1 (id, dt) values (211, '2010-07-31 00:00:00'); +insert into t1 (id, dt) values (212, '2010-08-01 00:00:00'); +insert into t1 (id, dt) values (213, '2010-08-02 00:00:00'); +insert into t1 (id, dt) values (214, '2010-08-03 00:00:00'); +insert into t1 (id, dt) values (215, '2010-08-04 00:00:00'); +insert into t1 (id, dt) values (216, '2010-08-05 00:00:00'); +insert into t1 (id, dt) values (217, '2010-08-06 00:00:00'); +insert into t1 (id, dt) values (218, '2010-08-07 00:00:00'); +insert into t1 (id, dt) values (219, '2010-08-08 00:00:00'); +insert into t1 (id, dt) values (220, '2010-08-09 00:00:00'); +insert into t1 (id, dt) values (221, '2010-08-10 00:00:00'); +insert into t1 (id, dt) values (222, '2010-08-11 00:00:00'); +insert into t1 (id, dt) values (223, '2010-08-12 00:00:00'); +insert into t1 (id, dt) values (224, '2010-08-13 00:00:00'); +insert into t1 (id, dt) values (225, '2010-08-14 00:00:00'); +insert into t1 (id, dt) values (226, '2010-08-15 00:00:00'); +insert into t1 (id, dt) values (227, '2010-08-16 00:00:00'); +insert into t1 (id, dt) values (228, '2010-08-17 00:00:00'); +insert into t1 (id, dt) values (229, '2010-08-18 00:00:00'); +insert into t1 (id, dt) values (230, '2010-08-19 00:00:00'); +insert into t1 (id, dt) values (231, '2010-08-20 00:00:00'); +insert into t1 (id, dt) values (232, '2010-08-21 00:00:00'); +insert into t1 (id, dt) values (233, '2010-08-22 00:00:00'); +insert into t1 (id, dt) values (234, '2010-08-23 00:00:00'); +insert into t1 (id, dt) values (235, '2010-08-24 00:00:00'); +insert into t1 (id, dt) values (236, '2010-08-25 00:00:00'); +insert into t1 (id, dt) values (237, '2010-08-26 00:00:00'); +insert into t1 (id, dt) values (238, '2010-08-27 00:00:00'); +insert into t1 (id, dt) values (239, '2010-08-28 00:00:00'); +insert into t1 (id, dt) values (240, '2010-08-29 00:00:00'); +insert into t1 (id, dt) values (241, '2010-08-30 00:00:00'); +insert into t1 (id, dt) values (242, '2010-08-31 00:00:00'); +insert into t1 (id, dt) values (243, '2010-09-01 00:00:00'); +insert into t1 (id, dt) values (244, '2010-09-02 00:00:00'); +insert into t1 (id, dt) values (245, '2010-09-03 00:00:00'); +insert into t1 (id, dt) values (246, '2010-09-04 00:00:00'); +insert into t1 (id, dt) values (247, '2010-09-05 00:00:00'); +insert into t1 (id, dt) values (248, '2010-09-06 00:00:00'); +insert into t1 (id, dt) values (249, '2010-09-07 00:00:00'); +insert into t1 (id, dt) values (250, '2010-09-08 00:00:00'); +insert into t1 (id, dt) values (251, '2010-09-09 00:00:00'); +insert into t1 (id, dt) values (252, '2010-09-10 00:00:00'); +insert into t1 (id, dt) values (253, '2010-09-11 00:00:00'); +insert into t1 (id, dt) values (254, '2010-09-12 00:00:00'); +insert into t1 (id, dt) values (255, '2010-09-13 00:00:00'); +insert into t1 (id, dt) values (256, '2010-09-14 00:00:00'); +insert into t1 (id, dt) values (257, '2010-09-15 00:00:00'); +insert into t1 (id, dt) values (258, '2010-09-16 00:00:00'); +insert into t1 (id, dt) values (259, '2010-09-17 00:00:00'); +insert into t1 (id, dt) values (260, '2010-09-18 00:00:00'); +insert into t1 (id, dt) values (261, '2010-09-19 00:00:00'); +insert into t1 (id, dt) values (262, '2010-09-20 00:00:00'); +insert into t1 (id, dt) values (263, '2010-09-21 00:00:00'); +insert into t1 (id, dt) values (264, '2010-09-22 00:00:00'); +insert into t1 (id, dt) values (265, '2010-09-23 00:00:00'); +insert into t1 (id, dt) values (266, '2010-09-24 00:00:00'); +insert into t1 (id, dt) values (267, '2010-09-25 00:00:00'); +insert into t1 (id, dt) values (268, '2010-09-26 00:00:00'); +insert into t1 (id, dt) values (269, '2010-09-27 00:00:00'); +insert into t1 (id, dt) values (270, '2010-09-28 00:00:00'); +insert into t1 (id, dt) values (271, '2010-09-29 00:00:00'); +insert into t1 (id, dt) values (272, '2010-09-30 00:00:00'); +insert into t1 (id, dt) values (273, '2010-10-01 00:00:00'); +insert into t1 (id, dt) values (274, '2010-10-02 00:00:00'); +insert into t1 (id, dt) values (275, '2010-10-03 00:00:00'); +insert into t1 (id, dt) values (276, '2010-10-04 00:00:00'); +insert into t1 (id, dt) values (277, '2010-10-05 00:00:00'); +insert into t1 (id, dt) values (278, '2010-10-06 00:00:00'); +insert into t1 (id, dt) values (279, '2010-10-07 00:00:00'); +insert into t1 (id, dt) values (280, '2010-10-08 00:00:00'); +insert into t1 (id, dt) values (281, '2010-10-09 00:00:00'); +insert into t1 (id, dt) values (282, '2010-10-10 00:00:00'); +insert into t1 (id, dt) values (283, '2010-10-11 00:00:00'); +insert into t1 (id, dt) values (284, '2010-10-12 00:00:00'); +insert into t1 (id, dt) values (285, '2010-10-13 00:00:00'); +insert into t1 (id, dt) values (286, '2010-10-14 00:00:00'); +insert into t1 (id, dt) values (287, '2010-10-15 00:00:00'); +insert into t1 (id, dt) values (288, '2010-10-16 00:00:00'); +insert into t1 (id, dt) values (289, '2010-10-17 00:00:00'); +insert into t1 (id, dt) values (290, '2010-10-18 00:00:00'); +insert into t1 (id, dt) values (291, '2010-10-19 00:00:00'); +insert into t1 (id, dt) values (292, '2010-10-20 00:00:00'); +insert into t1 (id, dt) values (293, '2010-10-21 00:00:00'); +insert into t1 (id, dt) values (294, '2010-10-22 00:00:00'); +insert into t1 (id, dt) values (295, '2010-10-23 00:00:00'); +insert into t1 (id, dt) values (296, '2010-10-24 00:00:00'); +insert into t1 (id, dt) values (297, '2010-10-25 00:00:00'); +insert into t1 (id, dt) values (298, '2010-10-26 00:00:00'); +insert into t1 (id, dt) values (299, '2010-10-27 00:00:00'); +insert into t1 (id, dt) values (300, '2010-10-28 00:00:00'); +insert into t1 (id, dt) values (301, '2010-10-29 00:00:00'); +insert into t1 (id, dt) values (302, '2010-10-30 00:00:00'); +insert into t1 (id, dt) values (303, '2010-10-31 00:00:00'); +insert into t1 (id, dt) values (304, '2010-11-01 00:00:00'); +insert into t1 (id, dt) values (305, '2010-11-02 00:00:00'); +insert into t1 (id, dt) values (306, '2010-11-03 00:00:00'); +insert into t1 (id, dt) values (307, '2010-11-04 00:00:00'); +insert into t1 (id, dt) values (308, '2010-11-05 00:00:00'); +insert into t1 (id, dt) values (309, '2010-11-06 00:00:00'); +insert into t1 (id, dt) values (310, '2010-11-07 00:00:00'); +insert into t1 (id, dt) values (311, '2010-11-08 00:00:00'); +insert into t1 (id, dt) values (312, '2010-11-09 00:00:00'); +insert into t1 (id, dt) values (313, '2010-11-10 00:00:00'); +insert into t1 (id, dt) values (314, '2010-11-11 00:00:00'); +insert into t1 (id, dt) values (315, '2010-11-12 00:00:00'); +insert into t1 (id, dt) values (316, '2010-11-13 00:00:00'); +insert into t1 (id, dt) values (317, '2010-11-14 00:00:00'); +insert into t1 (id, dt) values (318, '2010-11-15 00:00:00'); +insert into t1 (id, dt) values (319, '2010-11-16 00:00:00'); +insert into t1 (id, dt) values (320, '2010-11-17 00:00:00'); +insert into t1 (id, dt) values (321, '2010-11-18 00:00:00'); +insert into t1 (id, dt) values (322, '2010-11-19 00:00:00'); +insert into t1 (id, dt) values (323, '2010-11-20 00:00:00'); +insert into t1 (id, dt) values (324, '2010-11-21 00:00:00'); +insert into t1 (id, dt) values (325, '2010-11-22 00:00:00'); +insert into t1 (id, dt) values (326, '2010-11-23 00:00:00'); +insert into t1 (id, dt) values (327, '2010-11-24 00:00:00'); +insert into t1 (id, dt) values (328, '2010-11-25 00:00:00'); +insert into t1 (id, dt) values (329, '2010-11-26 00:00:00'); +insert into t1 (id, dt) values (330, '2010-11-27 00:00:00'); +insert into t1 (id, dt) values (331, '2010-11-28 00:00:00'); +insert into t1 (id, dt) values (332, '2010-11-29 00:00:00'); +insert into t1 (id, dt) values (333, '2010-11-30 00:00:00'); +insert into t1 (id, dt) values (334, '2010-12-01 00:00:00'); +insert into t1 (id, dt) values (335, '2010-12-02 00:00:00'); +insert into t1 (id, dt) values (336, '2010-12-03 00:00:00'); +insert into t1 (id, dt) values (337, '2010-12-04 00:00:00'); +insert into t1 (id, dt) values (338, '2010-12-05 00:00:00'); +insert into t1 (id, dt) values (339, '2010-12-06 00:00:00'); +insert into t1 (id, dt) values (340, '2010-12-07 00:00:00'); +insert into t1 (id, dt) values (341, '2010-12-08 00:00:00'); +insert into t1 (id, dt) values (342, '2010-12-09 00:00:00'); +insert into t1 (id, dt) values (343, '2010-12-10 00:00:00'); +insert into t1 (id, dt) values (344, '2010-12-11 00:00:00'); +insert into t1 (id, dt) values (345, '2010-12-12 00:00:00'); +insert into t1 (id, dt) values (346, '2010-12-13 00:00:00'); +insert into t1 (id, dt) values (347, '2010-12-14 00:00:00'); +insert into t1 (id, dt) values (348, '2010-12-15 00:00:00'); +insert into t1 (id, dt) values (349, '2010-12-16 00:00:00'); +insert into t1 (id, dt) values (350, '2010-12-17 00:00:00'); + +SELECT COUNT(*) FROM t1; + +--connection node_2 +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +--send call p1(100); + +--connection node_3 +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +--send call p1(100); + +--connection node_4 +call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +--send call p1(100); + +--connection node_1 +SET SESSION wsrep_OSU_method='RSU'; +SELECT @@wsrep_OSU_method; +SET SESSION sql_log_bin = 0; + +--error 0,ER_LOCK_DEADLOCK +ALTER TABLE t1 DROP PARTITION rx2009xx; +--error 0,ER_LOCK_DEADLOCK +ALTER TABLE t1 DROP PARTITION rx201004; +--error 0,ER_LOCK_DEADLOCK +ALTER TABLE t1 DROP PARTITION rx201008; + +SET SESSION wsrep_OSU_METHOD='TOI'; +SELECT @@wsrep_OSU_method; + +--connection node_2 +--error 0,ER_LOCK_DEADLOCK +reap; + +--connection node_3 +--error 0,ER_LOCK_DEADLOCK +reap; + +--connection node_4 +--error 0,ER_LOCK_DEADLOCK +reap; + +--connection node_1 +DROP TABLE t1; +DROP PROCEDURE p1; + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---query_cache_type=1 --query_cache_size=1355776 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1355776 + +[mysqld.2] +query_cache_type=1 +query_cache_size=1355776 + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache_sync_wait-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---query_cache_type=1 --query_cache_size=1355776 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 +query_cache_size=1355776 + +[mysqld.2] +query_cache_type=1 +query_cache_size=1355776 + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_rsu_drop_pk.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_rsu_drop_pk.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_rsu_drop_pk.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_rsu_drop_pk.test 2020-01-26 18:37:28.000000000 +0000 @@ -4,10 +4,9 @@ --source include/big_test.inc --source include/galera_cluster.inc ---source include/have_innodb.inc --connection node_1 -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; @@ -26,13 +25,18 @@ # Insert even more data after the ALTER has completed INSERT INTO t1 (f1) SELECT 200000 + (10000 * a1.f1) + (1000 * a2.f1) + (100 * a3.f1) + (10 * a4.f1) + a5.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) as expect_300000 FROM t1; +SELECT MAX(f1) as expect_299999 FROM t1; --connection node_1 --reap -SELECT COUNT(*) = 300000 FROM t1; -SELECT MAX(f1) = 299999 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 300000 FROM t1; +--source include/wait_condition.inc +SELECT COUNT(*) as expect_300000 FROM t1; +SELECT MAX(f1) as expect_299999 FROM t1; SET SESSION wsrep_OSU_method = "RSU"; ALTER TABLE t1 DROP PRIMARY KEY; @@ -44,15 +48,19 @@ INSERT INTO t1 (f1) VALUES (10); --connection node_1 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 10; +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1 where f1 = 10; +--source include/wait_condition.inc +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1; +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 10; INSERT INTO t1 (f1) VALUES (100); INSERT INTO t1 (f1) VALUES (1000); --connection node_2 -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 100; -SELECT COUNT(*) = 2 FROM t1 WHERE f1 = 1000; +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1 where f1 = 1000; +--source include/wait_condition.inc +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 100; +SELECT COUNT(*) as expect_2 FROM t1 WHERE f1 = 1000; DROP TABLE t1; DROP TABLE ten; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sbr_binlog-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_sbr_binlog.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sbr_binlog.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_sbr_binlog.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sbr_binlog.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,7 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin + +[mysqld.2] +log-bin diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_shutdown_nonprim.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_shutdown_nonprim.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_shutdown_nonprim.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_shutdown_nonprim.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,36 @@ +# +# Check that server can be shut down in non-primary configuration. +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--let $node_1 = node_1 +--let $node_2 = node_2 +--source include/auto_increment_offset_save.inc + +--connection node_1 +# Set higher weight for node_1 to keep it in primary +# while node_2 is isolated. +SET GLOBAL wsrep_provider_options = 'pc.weight=2'; + +--connection node_2 +# Isolate node_2 from the group and wait until wsrep_ready becomes OFF. +SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; +SET SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT VARIABLE_VALUE = 'OFF' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' +--source include/wait_condition.inc + +# Verify that graceful shutdown succeeds. +--source include/shutdown_mysqld.inc +--source include/start_mysqld.inc + +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_1 +--source include/wait_condition.inc + +# Restore original settings. +SET GLOBAL wsrep_provider_options = 'pc.weight = 1'; +--source include/auto_increment_offset_restore.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_sst_mariabackup_table_options.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -4,6 +4,8 @@ wsrep_sst_method=mariabackup wsrep_sst_auth="root:" wsrep_debug=ON +innodb-file-format='Barracuda' +innodb-file-per-table=ON [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_udf-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_udf-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_udf-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_udf-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT ---query_cache_type=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_udf.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_udf.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_udf.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_udf.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,15 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +$UDF_EXAMPLE_LIB_OPT +query_cache_type=1 + +[mysqld.2] +query_cache_type=1 + + + + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_v1_row_events-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_v1_row_events-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_v1_row_events-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_v1_row_events-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---log-bin-use-v1-row-events=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_v1_row_events.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_v1_row_events.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_v1_row_events.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_v1_row_events.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +log-bin-use-v1-row-events=1 + +[mysqld.2] + + + + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep-auto-increment-control=ON + +[mysqld.2] +wsrep-auto-increment-control=ON + + + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_auto_inc_control_on.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep-auto-increment-control=ON diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_dirty_reads.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_dirty_reads.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_dirty_reads.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_dirty_reads.test 2020-01-26 18:37:28.000000000 +0000 @@ -3,9 +3,10 @@ # --source include/galera_cluster.inc ---source include/have_innodb.inc --source include/have_perfschema.inc +call mtr.add_suppression("WSREP has not yet prepared node for application use"); + # Save original auto_increment_offset values. --let $node_1=node_1 --let $node_2=node_2 @@ -30,10 +31,10 @@ # Must return 'Non-primary' SHOW STATUS LIKE 'wsrep_cluster_status'; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT * FROM t1; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT 1 FROM t1; SET @@session.wsrep_dirty_reads=ON; @@ -45,7 +46,7 @@ SET @@session.wsrep_dirty_reads=OFF; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1; SELECT 1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_node_address.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_node_address.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_node_address.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_node_address.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,27 +6,27 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*"); -call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored."); -call mtr.add_suppression("WSREP: Sending JOIN failed: -[0-9]+ (Transport endpoint is not connected). Will retry in new primary component."); +call mtr.add_suppression("WSREP: Stray state UUID msg: .*"); +call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .*"); +call mtr.add_suppression("WSREP: Sending JOIN failed: .*"); +flush tables; -SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --connection node_1 CREATE TABLE t1 (f1 INTEGER) ENGINE=INNODB; --connection node_2 -let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; ---source include/wait_condition.inc +set global wsrep_sync_wait=15; INSERT INTO t1 VALUES (1); --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connection node_3 -let $wait_condition= SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; ---source include/wait_condition.inc -let $wait_condition= SELECT COUNT(*) = 1 FROM t1; ---source include/wait_condition.inc -SELECT COUNT(*) = 1 FROM t1; +set global wsrep_sync_wait=15; +SELECT COUNT(*) FROM t1; --connection node_1 DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh --wsrep-sync-wait=0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,13 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh +wsrep-sync-wait=0 + +[mysqld.2] + + + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_notify_cmd.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_notify_cmd.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_notify_cmd.test 2020-01-26 18:37:28.000000000 +0000 @@ -3,10 +3,10 @@ # notifications into a table. # ---source include/have_innodb.inc --source include/galera_cluster.inc --connection node_1 -SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership; -SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status; -SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status; +SET SESSION wsrep_sync_wait=15; +SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership; +SELECT MAX(size) FROM mtr_wsrep_notify.status; +SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_reject_queries.test mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_reject_queries.test --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_reject_queries.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_reject_queries.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,6 +5,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +call mtr.add_suppression("WSREP has not yet prepared node for application use"); + CREATE TABLE t1 (f1 INTEGER); --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 @@ -15,7 +17,7 @@ SET GLOBAL wsrep_reject_queries = ALL; ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT * FROM t1; # @@ -30,7 +32,7 @@ SELECT * FROM t1; --connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 ---error ER_UNKNOWN_COM_ERROR +--error ER_UNKNOWN_COM_ERROR,1047 SELECT * FROM t1; # Confirm that replication continues diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_sst_auth.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_sst_auth.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_sst_auth.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_sst_auth.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_sst_auth=root: + +[mysqld.2] +wsrep_sst_auth=root: + + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_sst_auth.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_sst_auth.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_var_sst_auth.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_var_sst_auth.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep_sst_auth=root: diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_log_conficts-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep_log_conflicts=ON diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,12 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep_log_conflicts=ON + +[mysqld.2] +wsrep_log_conflicts=ON + + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_new_cluster-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep-new-cluster diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,10 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +wsrep-new-cluster + +[mysqld.2] + + + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/mysql-wsrep#201-master.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---query_cache_type=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/mysql-wsrep#201.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/mysql-wsrep#201.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/mysql-wsrep#201.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/mysql-wsrep#201.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 + +[mysqld.2] +query_cache_type=1 + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/query_cache.cnf mariadb-10.3-10.3.22/mysql-test/suite/galera/t/query_cache.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/query_cache.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/query_cache.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +!include ../galera_2nodes.cnf + +[mysqld.1] +query_cache_type=1 + +[mysqld.2] +query_cache_type=1 + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/galera/t/query_cache.opt mariadb-10.3-10.3.22/mysql-test/suite/galera/t/query_cache.opt --- mariadb-10.3-10.3.18/mysql-test/suite/galera/t/query_cache.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/galera/t/query_cache.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---query_cache_type=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result mariadb-10.3-10.3.22/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result --- mariadb-10.3-10.3.18/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/gcol/r/innodb_virtual_debug_purge.result 2020-01-26 18:37:28.000000000 +0000 @@ -204,5 +204,77 @@ disconnect truncate; connection default; DROP TABLE t1, t2; +# +# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf +# on table with virtual columns and indexes +# +SET @saved_dbug= @@GLOBAL.debug_dbug; +set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2"; +create table t1 ( +pk serial, vb tinyblob as (b) virtual, b tinyblob, +primary key(pk), index (vb(64))) +engine innodb; +insert ignore into t1 (b) values ('foo'); +select * into outfile 'load.data' from t1; +load data infile 'load.data' replace into table t1; +set debug_sync= "now WAIT_FOR latch_released"; +set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1"; +drop table t1; +set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table"; +create table t1 ( +pk serial, vb tinyblob as (b) virtual, b tinyblob, +primary key(pk), index (vb(64))) +engine innodb; +insert ignore into t1 (b) values ('foo'); +select * into outfile 'load.data' from t1; +load data infile 'load.data' replace into table t1; +set debug_sync= "now WAIT_FOR got_no_such_table"; +set global debug_dbug= @saved_dbug; +drop table t1; set debug_sync=reset; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; +# +# MDEV-18546 ASAN heap-use-after-free +# in innobase_get_computed_value / row_purge +# +CREATE TABLE t1 ( +pk INT AUTO_INCREMENT, +b BIT(15), +v BIT(15) AS (b) VIRTUAL, +PRIMARY KEY(pk), +UNIQUE(v) +) ENGINE=InnoDB; +INSERT IGNORE INTO t1 (b) VALUES +(NULL),(b'011'),(b'000110100'), +(b'01101101010'),(b'01111001001011'),(NULL); +SET GLOBAL innodb_debug_sync = "ib_clust_v_col_before_row_allocated " + "SIGNAL before_row_allocated " + "WAIT_FOR flush_unlock"; +SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open " + "SIGNAL purge_open " + "WAIT_FOR select_open"; +SET @saved_dbug= @@GLOBAL.debug_dbug; +set global debug_dbug= "+d,ib_purge_virtual_index_callback"; +connect purge_waiter,localhost,root; +SET debug_sync= "now WAIT_FOR before_row_allocated"; +connection default; +REPLACE INTO t1 (pk, b) SELECT pk, b FROM t1; +connection purge_waiter; +connection default; +disconnect purge_waiter; +FLUSH TABLES; +SET GLOBAL innodb_debug_sync = reset; +SET debug_sync= "now SIGNAL flush_unlock WAIT_FOR purge_open"; +SET GLOBAL innodb_debug_sync = reset; +SET debug_sync= "ib_open_after_dict_open SIGNAL select_open"; +SELECT * FROM t1; +pk b v +1 NULL NULL +2   +3 4 4 +4 j j +5 K K +6 NULL NULL +DROP TABLE t1; +SET debug_sync= reset; +set global debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt mariadb-10.3-10.3.22/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt --- mariadb-10.3-10.3.18/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--innodb-purge-threads=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test mariadb-10.3-10.3.22/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test --- mariadb-10.3-10.3.18/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/gcol/t/innodb_virtual_debug_purge.test 2020-01-26 18:37:28.000000000 +0000 @@ -259,6 +259,118 @@ connection default; DROP TABLE t1, t2; +--echo # +--echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf +--echo # on table with virtual columns and indexes +--echo # + +--let $datadir= `select @@datadir` +SET @saved_dbug= @@GLOBAL.debug_dbug; +set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2"; + +create table t1 ( + pk serial, vb tinyblob as (b) virtual, b tinyblob, + primary key(pk), index (vb(64))) +engine innodb; + +insert ignore into t1 (b) values ('foo'); + +select * into outfile 'load.data' from t1; +load data infile 'load.data' replace into table t1; + +set debug_sync= "now WAIT_FOR latch_released"; +set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1"; +drop table t1; +--remove_file $datadir/test/load.data + +set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table"; + +create table t1 ( + pk serial, vb tinyblob as (b) virtual, b tinyblob, + primary key(pk), index (vb(64))) +engine innodb; + +insert ignore into t1 (b) values ('foo'); + +select * into outfile 'load.data' from t1; +load data infile 'load.data' replace into table t1; + +set debug_sync= "now WAIT_FOR got_no_such_table"; + +# FIXME: Race condition here: +# 1. purge thread goes into sending got_no_such_table +# 2. test thread finishes debug_sync= "RESET" below +# 3. purge thread sends got_no_such_table +set global debug_dbug= @saved_dbug; + +# cleanup +drop table t1; +--remove_file $datadir/test/load.data + --source include/wait_until_count_sessions.inc set debug_sync=reset; SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; + +--echo # +--echo # MDEV-18546 ASAN heap-use-after-free +--echo # in innobase_get_computed_value / row_purge +--echo # + +CREATE TABLE t1 ( + pk INT AUTO_INCREMENT, + b BIT(15), + v BIT(15) AS (b) VIRTUAL, + PRIMARY KEY(pk), + UNIQUE(v) +) ENGINE=InnoDB; +INSERT IGNORE INTO t1 (b) VALUES + (NULL),(b'011'),(b'000110100'), + (b'01101101010'),(b'01111001001011'),(NULL); + +SET GLOBAL innodb_debug_sync = "ib_clust_v_col_before_row_allocated " + "SIGNAL before_row_allocated " + "WAIT_FOR flush_unlock"; +SET GLOBAL innodb_debug_sync = "ib_open_after_dict_open " + "SIGNAL purge_open " + "WAIT_FOR select_open"; + +# In 10.2 trx_undo_roll_ptr_is_insert(t_roll_ptr) condition never pass in purge, +# so this condition is forced to pass in row_vers_old_has_index_entry +SET @saved_dbug= @@GLOBAL.debug_dbug; +set global debug_dbug= "+d,ib_purge_virtual_index_callback"; + +# The purge starts from REPLACE command. To avoid possible race, separate +# connection is used. +--connect(purge_waiter,localhost,root) +--send +SET debug_sync= "now WAIT_FOR before_row_allocated"; + +--connection default +REPLACE INTO t1 (pk, b) SELECT pk, b FROM t1; + +--connection purge_waiter +# Now we will definitely catch ib_clust_v_col_before_row_allocated +--reap +--connection default +--disconnect purge_waiter + +# purge hangs on the sync point. table is purged, ref_count is set to 0 +FLUSH TABLES; + +# Avoid hang on repeating purge. +# Reset Will be applied after first record is purged +SET GLOBAL innodb_debug_sync = reset; + +SET debug_sync= "now SIGNAL flush_unlock WAIT_FOR purge_open"; + +# Avoid hang on repeating purge +SET GLOBAL innodb_debug_sync = reset; + +# select unblocks purge thread +SET debug_sync= "ib_open_after_dict_open SIGNAL select_open"; +SELECT * FROM t1; + +# Cleanup +DROP TABLE t1; +SET debug_sync= reset; +set global debug_dbug= @saved_dbug; \ No newline at end of file diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,INPLACE.rdiff 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,6 @@ --- alter_algorithm.result +++ alter_algorithm.reject -@@ -7,44 +7,44 @@ +@@ -7,40 +7,40 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); SELECT @@alter_algorithm; @@alter_algorithm @@ -19,12 +19,6 @@ -info: Records: 1 Duplicates: 0 Warnings: 0 +affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 0 - # Make existing column NON-NULLABLE - ALTER TABLE t1 MODIFY f3 INT NOT NULL; --affected rows: 1 --info: Records: 1 Duplicates: 0 Warnings: 0 -+affected rows: 0 -+info: Records: 0 Duplicates: 0 Warnings: 0 # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; -affected rows: 1 @@ -64,7 +58,7 @@ DROP TABLE t1; affected rows: 0 CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, -@@ -57,22 +57,22 @@ +@@ -53,22 +53,22 @@ FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; @@ -97,7 +91,7 @@ DROP TABLE t2, t1; affected rows: 0 CREATE TABLE t1(f1 INT NOT NULL, -@@ -85,27 +85,27 @@ +@@ -81,27 +81,27 @@ INSERT INTO t1(f1, f2) VALUES(1, 1); # Add column at the end of the table ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; @@ -135,7 +129,7 @@ # Column length varies ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); affected rows: 0 -@@ -113,12 +113,12 @@ +@@ -109,12 +109,12 @@ SET foreign_key_checks = 0; affected rows: 0 ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,INSTANT.rdiff 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,6 @@ --- alter_algorithm.result +++ alter_algorithm.reject -@@ -7,44 +7,35 @@ +@@ -7,40 +7,32 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); SELECT @@alter_algorithm; @@alter_algorithm @@ -17,11 +17,6 @@ -affected rows: 1 -info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors - # Make existing column NON-NULLABLE - ALTER TABLE t1 MODIFY f3 INT NOT NULL; --affected rows: 1 --info: Records: 1 Duplicates: 0 Warnings: 0 -+Got one of the listed errors # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; -affected rows: 1 @@ -55,7 +50,7 @@ DROP TABLE t1; affected rows: 0 CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, -@@ -57,22 +48,17 @@ +@@ -53,22 +45,17 @@ FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; @@ -83,7 +78,7 @@ DROP TABLE t2, t1; affected rows: 0 CREATE TABLE t1(f1 INT NOT NULL, -@@ -85,27 +71,27 @@ +@@ -81,27 +68,27 @@ INSERT INTO t1(f1, f2) VALUES(1, 1); # Add column at the end of the table ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; @@ -121,7 +116,7 @@ # Column length varies ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); affected rows: 0 -@@ -113,12 +99,12 @@ +@@ -109,12 +96,12 @@ SET foreign_key_checks = 0; affected rows: 0 ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm,NOCOPY.rdiff 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,6 @@ --- alter_algorithm.result +++ alter_algorithm.reject -@@ -7,44 +7,35 @@ +@@ -7,40 +7,32 @@ INSERT INTO t1(f1, f2, f3) VALUES(1, 1, 1); SELECT @@alter_algorithm; @@alter_algorithm @@ -17,11 +17,6 @@ -affected rows: 1 -info: Records: 1 Duplicates: 0 Warnings: 0 +Got one of the listed errors - # Make existing column NON-NULLABLE - ALTER TABLE t1 MODIFY f3 INT NOT NULL; --affected rows: 1 --info: Records: 1 Duplicates: 0 Warnings: 0 -+Got one of the listed errors # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; -affected rows: 1 @@ -55,7 +50,7 @@ DROP TABLE t1; affected rows: 0 CREATE TABLE t1(f1 INT PRIMARY KEY, f2 INT NOT NULL, -@@ -57,22 +48,22 @@ +@@ -53,22 +45,22 @@ FOREIGN KEY fidx(f1) REFERENCES t1(f1))ENGINE=INNODB; INSERT INTO t1(f1, f2, f4, f5) VALUES(1, 2, 3, 4); ALTER TABLE t1 ADD INDEX idx1(f4), page_compressed=1; @@ -88,7 +83,7 @@ DROP TABLE t2, t1; affected rows: 0 CREATE TABLE t1(f1 INT NOT NULL, -@@ -85,27 +76,27 @@ +@@ -81,27 +73,27 @@ INSERT INTO t1(f1, f2) VALUES(1, 1); # Add column at the end of the table ALTER TABLE t1 ADD COLUMN f4 char(100) default 'BIG WALL'; @@ -126,7 +121,7 @@ # Column length varies ALTER TABLE t2 CHANGE f3 f3 VARCHAR(20); affected rows: 0 -@@ -113,12 +104,12 @@ +@@ -109,12 +101,12 @@ SET foreign_key_checks = 0; affected rows: 0 ALTER TABLE t3 ADD FOREIGN KEY fidx(f2) REFERENCES t2(f1); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/alter_algorithm.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/alter_algorithm.result 2020-01-26 18:37:28.000000000 +0000 @@ -17,10 +17,6 @@ ALTER TABLE t1 MODIFY f2 INT; affected rows: 1 info: Records: 1 Duplicates: 0 Warnings: 0 -# Make existing column NON-NULLABLE -ALTER TABLE t1 MODIFY f3 INT NOT NULL; -affected rows: 1 -info: Records: 1 Duplicates: 0 Warnings: 0 # Drop Stored Column ALTER TABLE t1 DROP COLUMN f5; affected rows: 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/blob-update-debug.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/blob-update-debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/blob-update-debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/blob-update-debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -7,9 +7,11 @@ select f1, substring(f2, 1, 40) from t1; f1 substring(f2, 1, 40) 1 **************************************** -set debug_dbug = 'd,row_ins_index_entry_timeout'; +set @saved_debug = @@session.debug_dbug; +SET debug_dbug = 'd,row_ins_index_entry_timeout'; update t1 set f1 = 3; select f1, substring(f2, 1, 40) from t1; f1 substring(f2, 1, 40) 3 **************************************** drop table t1; +SET debug_dbug= @saved_debug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/ibuf_not_empty.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/ibuf_not_empty.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/ibuf_not_empty.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/ibuf_not_empty.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; CREATE TABLE t1( a INT AUTO_INCREMENT PRIMARY KEY, b CHAR(1), @@ -5,6 +6,7 @@ INDEX(b)) ENGINE=InnoDB STATS_PERSISTENT=0; SET GLOBAL innodb_change_buffering_debug = 1; +BEGIN; INSERT INTO t1 VALUES(0,'x',1); INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1; @@ -18,8 +20,11 @@ INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1; +COMMIT; +InnoDB 0 transactions not purged check table t1; Table Op Msg_type Msg_text test.t1 check Warning InnoDB: Index 'b' contains #### entries, should be 4096. test.t1 check error Corrupt +SET GLOBAL innodb_fast_shutdown=0; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/information_schema_grants.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/information_schema_grants.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/information_schema_grants.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/information_schema_grants.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,304 @@ +select plugin_name,plugin_status as 'Must be ACTIVE' from information_schema.plugins where plugin_name like 'inno%' and plugin_status!='ACTIVE'; +plugin_name Must be ACTIVE +create user select_only@localhost; +grant select on *.* to select_only@localhost; +connect select_only,localhost,select_only; +connection default; +create sql security invoker view i_buffer_page as select * from information_schema.innodb_buffer_page; +create sql security definer view d_buffer_page as select * from information_schema.innodb_buffer_page; +create sql security invoker view i_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru; +create sql security definer view d_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru; +create sql security invoker view i_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats; +create sql security definer view d_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats; +create sql security invoker view i_cmp as select * from information_schema.innodb_cmp; +create sql security definer view d_cmp as select * from information_schema.innodb_cmp; +create sql security invoker view i_cmp_per_index as select * from information_schema.innodb_cmp_per_index; +create sql security definer view d_cmp_per_index as select * from information_schema.innodb_cmp_per_index; +create sql security invoker view i_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset; +create sql security definer view d_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset; +create sql security invoker view i_cmp_reset as select * from information_schema.innodb_cmp_reset; +create sql security definer view d_cmp_reset as select * from information_schema.innodb_cmp_reset; +create sql security invoker view i_cmpmem as select * from information_schema.innodb_cmpmem; +create sql security definer view d_cmpmem as select * from information_schema.innodb_cmpmem; +create sql security invoker view i_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset; +create sql security definer view d_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset; +create sql security invoker view i_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted; +create sql security definer view d_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted; +create sql security invoker view i_ft_config as select * from information_schema.innodb_ft_config; +create sql security definer view d_ft_config as select * from information_schema.innodb_ft_config; +create sql security invoker view i_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword; +create sql security definer view d_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword; +create sql security invoker view i_ft_deleted as select * from information_schema.innodb_ft_deleted; +create sql security definer view d_ft_deleted as select * from information_schema.innodb_ft_deleted; +create sql security invoker view i_ft_index_cache as select * from information_schema.innodb_ft_index_cache; +create sql security definer view d_ft_index_cache as select * from information_schema.innodb_ft_index_cache; +create sql security invoker view i_ft_index_table as select * from information_schema.innodb_ft_index_table; +create sql security definer view d_ft_index_table as select * from information_schema.innodb_ft_index_table; +create sql security invoker view i_lock_waits as select * from information_schema.innodb_lock_waits; +create sql security definer view d_lock_waits as select * from information_schema.innodb_lock_waits; +create sql security invoker view i_locks as select * from information_schema.innodb_locks; +create sql security definer view d_locks as select * from information_schema.innodb_locks; +create sql security invoker view i_metrics as select * from information_schema.innodb_metrics; +create sql security definer view d_metrics as select * from information_schema.innodb_metrics; +create sql security invoker view i_mutexes as select * from information_schema.innodb_mutexes; +create sql security definer view d_mutexes as select * from information_schema.innodb_mutexes; +create sql security invoker view i_sys_columns as select * from information_schema.innodb_sys_columns; +create sql security definer view d_sys_columns as select * from information_schema.innodb_sys_columns; +create sql security invoker view i_sys_datafiles as select * from information_schema.innodb_sys_datafiles; +create sql security definer view d_sys_datafiles as select * from information_schema.innodb_sys_datafiles; +create sql security invoker view i_sys_fields as select * from information_schema.innodb_sys_fields; +create sql security definer view d_sys_fields as select * from information_schema.innodb_sys_fields; +create sql security invoker view i_sys_foreign as select * from information_schema.innodb_sys_foreign; +create sql security definer view d_sys_foreign as select * from information_schema.innodb_sys_foreign; +create sql security invoker view i_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols; +create sql security definer view d_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols; +create sql security invoker view i_sys_indexes as select * from information_schema.innodb_sys_indexes; +create sql security definer view d_sys_indexes as select * from information_schema.innodb_sys_indexes; +create sql security invoker view i_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; +create sql security definer view d_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; +create sql security invoker view i_sys_tables as select * from information_schema.innodb_sys_tables; +create sql security definer view d_sys_tables as select * from information_schema.innodb_sys_tables; +create sql security invoker view i_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces; +create sql security definer view d_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces; +create sql security invoker view i_sys_tablestats as select * from information_schema.innodb_sys_tablestats; +create sql security definer view d_sys_tablestats as select * from information_schema.innodb_sys_tablestats; +create sql security invoker view i_sys_virtual as select * from information_schema.innodb_sys_virtual; +create sql security definer view d_sys_virtual as select * from information_schema.innodb_sys_virtual; +create sql security invoker view i_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption; +create sql security definer view d_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption; +create sql security invoker view i_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing; +create sql security definer view d_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing; +create sql security invoker view i_trx as select * from information_schema.innodb_trx; +create sql security definer view d_trx as select * from information_schema.innodb_trx; +connection select_only; +select count(*) > -1 from information_schema.innodb_buffer_page; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_buffer_page; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_buffer_page; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_buffer_page_lru; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_buffer_page_lru; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_buffer_page_lru; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_buffer_pool_stats; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_buffer_pool_stats; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_buffer_pool_stats; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_cmp; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_cmp; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_cmp; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_cmp_per_index; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_cmp_per_index; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_cmp_per_index; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_cmp_per_index_reset; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_cmp_per_index_reset; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_cmp_per_index_reset; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_cmp_reset; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_cmp_reset; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_cmp_reset; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_cmpmem; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_cmpmem; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_cmpmem; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_cmpmem_reset; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_cmpmem_reset; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_cmpmem_reset; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_ft_being_deleted; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_ft_being_deleted; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_ft_being_deleted; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_ft_config; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_ft_config; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_ft_config; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_ft_default_stopword; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_ft_deleted; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_ft_deleted; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_ft_deleted; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_ft_index_cache; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_ft_index_cache; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_ft_index_cache; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_ft_index_table; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_ft_index_table; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_ft_index_table; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_lock_waits; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_lock_waits; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_lock_waits; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_locks; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_locks; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_locks; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_metrics; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_metrics; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_metrics; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_mutexes; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_mutexes; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_mutexes; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_columns; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_columns; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_columns; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_datafiles; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_datafiles; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_datafiles; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_fields; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_fields; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_fields; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_foreign; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_foreign; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_foreign; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_foreign_cols; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_foreign_cols; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_foreign_cols; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_indexes; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_indexes; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_indexes; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_semaphore_waits; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_semaphore_waits; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_semaphore_waits; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_tables; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_tables; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_tables; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_tablespaces; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_tablespaces; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_tablespaces; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_tablestats; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_tablestats; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_tablestats; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_sys_virtual; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_sys_virtual; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_sys_virtual; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_tablespaces_encryption; +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +select count(*) > -1 from i_tablespaces_encryption; +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +select count(*) > -1 from d_tablespaces_encryption; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_tablespaces_scrubbing; +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +select count(*) > -1 from i_tablespaces_scrubbing; +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +select count(*) > -1 from d_tablespaces_scrubbing; +count(*) > -1 +1 +select count(*) > -1 from information_schema.innodb_trx; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from i_trx; +ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation +select count(*) > -1 from d_trx; +count(*) > -1 +1 +connection default; +drop database test; +create database test; +drop user select_only@localhost; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-32k-crash.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-32k-crash.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-32k-crash.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-32k-crash.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is"); CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-64k-crash.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-64k-crash.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-64k-crash.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-64k-crash.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is"); CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-alter-nullable.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-alter-nullable.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-alter-nullable.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-alter-nullable.result 2020-01-26 18:37:28.000000000 +0000 @@ -96,8 +96,8 @@ SET @old_sql_mode = @@sql_mode; SET sql_mode = ''; ALTER TABLE t1 MODIFY c INT NOT NULL; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 1 +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 1 Warnings: Warning 1265 Data truncated for column 'c' at row 1 ALTER TABLE t2 MODIFY c INT NOT NULL; @@ -111,10 +111,9 @@ Warnings: Warning 1265 Data truncated for column 'c' at row 1 SET sql_mode = @old_sql_mode; -# MDEV-18819 FIXME: Wrong result g=NULL SELECT * FROM t1; c g -0 NULL +0 0 SELECT * FROM t2; c v 0 0 @@ -137,8 +136,8 @@ INSERT INTO t2 SET c=NULL; INSERT INTO t3 SET c=NULL; ALTER IGNORE TABLE t1 MODIFY c INT NOT NULL; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 1 +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 1 Warnings: Warning 1265 Data truncated for column 'c' at row 1 ALTER IGNORE TABLE t2 MODIFY c INT NOT NULL; @@ -151,10 +150,9 @@ info: Records: 1 Duplicates: 0 Warnings: 1 Warnings: Warning 1265 Data truncated for column 'c' at row 1 -# MDEV-18819 FIXME: Wrong result g=NULL SELECT * FROM t1; c g -0 NULL +0 0 SELECT * FROM t2; c v 0 0 @@ -186,12 +184,11 @@ UPDATE t2 SET c=0; UPDATE t3 SET c=0; ALTER TABLE t1 MODIFY c INT NOT NULL; -affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 +affected rows: 1 +info: Records: 1 Duplicates: 0 Warnings: 0 ALTER TABLE t2 MODIFY c INT NOT NULL; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 -# MDEV-18819 FIXME: This should not require ALGORITHM=COPY. ALTER TABLE t3 MODIFY c INT NOT NULL; affected rows: 1 info: Records: 1 Duplicates: 0 Warnings: 0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-autoinc.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-autoinc.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-autoinc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-autoinc.result 2020-01-26 18:37:28.000000000 +0000 @@ -567,7 +567,7 @@ auto_increment_increment 65535 auto_increment_offset 65535 INSERT INTO t1 VALUES (NULL),(NULL); -ERROR HY000: Failed to read auto-increment value from storage engine +ERROR 22003: Out of range value for column 'c1' at row 1 SELECT * FROM t1; c1 1 @@ -677,7 +677,7 @@ a b 1 S1 3 S2 -4 S2 +5 S2 disconnect con1; connection default; # Client 1: Insert a record with auto_increment_increment=1 @@ -688,14 +688,14 @@ `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `b` varchar(200) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 INSERT INTO t(b) VALUES('S1'); SELECT a,b FROM t; a b 1 S1 3 S2 -4 S2 -5 S1 +5 S2 +6 S1 DROP TABLE t; # Autoincrement behaviour with mixed insert. CREATE TABLE t( @@ -733,22 +733,22 @@ `a` tinyint(4) NOT NULL AUTO_INCREMENT, `b` varchar(200) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 INSERT INTO t(b) VALUES('S4'); SELECT * FROM t; a b 1 S0 11 S1 -22 S3 -23 S4 28 S2 +31 S3 +32 S4 SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( `a` tinyint(4) NOT NULL AUTO_INCREMENT, `b` varchar(200) DEFAULT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1 DROP TABLE t; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=5; DROP TABLE IF EXISTS t1; @@ -789,7 +789,7 @@ `n` int(10) unsigned NOT NULL, `o` enum('FALSE','TRUE') DEFAULT NULL, PRIMARY KEY (`m`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 INSERT INTO t1 (b,c) SELECT n,o FROM t2 ; SHOW CREATE TABLE t1; Table Create Table @@ -1472,13 +1472,13 @@ i 1 301 -351 +601 SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( `i` int(11) NOT NULL AUTO_INCREMENT, KEY `i` (`i`) -) ENGINE=InnoDB AUTO_INCREMENT=401 DEFAULT CHARSET=latin1 +) ENGINE=InnoDB AUTO_INCREMENT=651 DEFAULT CHARSET=latin1 DROP TABLE t; SET auto_increment_increment = DEFAULT; # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,6 +2,10 @@ # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE # OPERATION IF IT IS DONE IN-PLACE # +call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery"); +call mtr.add_suppression("Plugin initialization aborted at srv0start\\.cc"); +call mtr.add_suppression("Plugin 'InnoDB'"); +FLUSH TABLES; CREATE TABLE t1( a INT AUTO_INCREMENT PRIMARY KEY, b CHAR(1), @@ -9,20 +13,7 @@ INDEX(b)) ENGINE=InnoDB STATS_PERSISTENT=0; SET GLOBAL innodb_change_buffering_debug = 1; -INSERT INTO t1 VALUES(0,'x',1); -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_8192; BEGIN; SELECT b FROM t1 LIMIT 3; b @@ -38,8 +29,23 @@ ERROR HY000: Lost connection to MySQL server during query disconnect con1; connection default; -FOUND 1 /Wrote log record for ibuf update in place operation/ in my_restart.err +FOUND 1 /Wrote log record for ibuf update in place operation/ in mysqld.1.err +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check Error Unknown storage engine 'InnoDB' +test.t1 check error Corrupt +FOUND 1 /innodb_read_only prevents crash recovery/ in mysqld.1.err +SELECT * FROM t1 LIMIT 1; +a b c +1 X 1 +SHOW ENGINE INNODB STATUS; +Type Name Status +InnoDB insert 0, delete mark 0 +SET GLOBAL innodb_fast_shutdown=0; CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK +SHOW ENGINE INNODB STATUS; +Type Name Status +InnoDB insert 79, delete mark 1 DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-mdev-7513.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-mdev-7513.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-mdev-7513.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-mdev-7513.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Cannot add field .* in table"); CREATE TABLE t1 ( text1 TEXT, text2 TEXT, text3 TEXT, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-replace-debug.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-replace-debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-replace-debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-replace-debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -5,10 +5,10 @@ key k2(f3)) engine=innodb; insert into t1 values (14, 24, 34); set @old_dbug= @@session.debug_dbug; -set debug_dbug = '+d,row_ins_sec_index_entry_timeout'; +SET debug_dbug = '+d,row_ins_sec_index_entry_timeout'; replace into t1 values (14, 25, 34); select * from t1; f1 f2 f3 14 25 34 drop table t1; -set debug_dbug = @old_dbug; +SET debug_dbug = @old_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,5 @@ call mtr.add_suppression("InnoDB: Warning: Index.*"); +SET @saved_dbug = @@SESSION.debug_dbug; set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized'; create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb; create procedure innodb_insert_proc (repeat_count int) @@ -27,6 +28,6 @@ select count(1) from t1 where c between 7 and 787; count(1) 781 -set DEBUG_DBUG=NULL; drop procedure innodb_insert_proc; drop table t1; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-virtual-columns-debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -6,11 +6,11 @@ DELETE FROM t1; connection default; SET debug_sync= "now WAIT_FOR delete_open"; -SET debug_sync= "ib_open_after_dict_open SIGNAL another_open"; SELECT a FROM t1; a NULL NULL +SET debug_sync= "now SIGNAL another_open"; connection con1; disconnect con1; connection default; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-wl5522-1.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-wl5522-1.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-wl5522-1.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-wl5522-1.result 2020-01-26 18:37:28.000000000 +0000 @@ -389,7 +389,7 @@ ALTER TABLE testdb_wl5522.t1 DISCARD TABLESPACE; restore: t1 .ibd and .cfg files ALTER TABLE testdb_wl5522.t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Column i precise type mismatch.) +ERROR HY000: Schema mismatch (Column i precise type mismatch, it's 0X408 in the table and 0X403 in the tablespace meta file) unlink: t1.ibd unlink: t1.cfg DROP TABLE testdb_wl5522.t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-wl5522.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-wl5522.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb-wl5522.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb-wl5522.result 2020-01-26 18:37:28.000000000 +0000 @@ -426,7 +426,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Column c2 precise type mismatch.) +ERROR HY000: Schema mismatch (Column c2 precise type mismatch, it's 0X408 in the table and 0X403 in the tablespace meta file) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_bug11754376.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug11754376.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_bug11754376.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug11754376.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,5 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; DROP TABLE bug11754376; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_bug30113362.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug30113362.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_bug30113362.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug30113362.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,119 @@ +SET GLOBAL innodb_adaptive_hash_index = false; +SET GLOBAL innodb_stats_persistent = false; +connect purge_control,localhost,root,,; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connect con2,localhost,root,,; +CREATE TABLE t1 ( +a00 CHAR(255) NOT NULL DEFAULT 'a', +a01 CHAR(255) NOT NULL DEFAULT 'a', +a02 CHAR(255) NOT NULL DEFAULT 'a', +b INT NOT NULL DEFAULT 0, +PRIMARY KEY(a00, a01, a02) +) charset latin1 ENGINE = InnoDB COMMENT='MERGE_THRESHOLD=45'; +SET GLOBAL innodb_limit_optimistic_insert_debug = 3; +CREATE PROCEDURE data_load_t1() +BEGIN +DECLARE c1 INT DEFAULT 97; +DECLARE c2 INT DEFAULT 97; +DECLARE c3 INT DEFAULT 97; +WHILE c1 < 102 DO +WHILE c2 < 123 DO +WHILE c3 < 123 DO +INSERT INTO t1 (a00) VALUES (CHAR(c1,c2,c3)); +SET c3 = c3 + 1; +END WHILE; +SET c3 = 97; +SET c2 = c2 + 1; +END WHILE; +SET c2 = 97; +SET c1 = c1 + 1; +END WHILE; +END | +call data_load_t1(); +DROP PROCEDURE data_load_t1; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +1856 +connection con2; +DELETE FROM t1 WHERE a00 = 'cnm'; +COMMIT; +BEGIN; +INSERT INTO t1 SET a00 = 'cnm'; +connection purge_control; +COMMIT; +connection con2; +SET GLOBAL innodb_limit_optimistic_insert_debug = 0; +ROLLBACK; +# Test start +connection purge_control; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection con2; +DELETE FROM t1 WHERE a00 = 'bii'; +COMMIT; +BEGIN; +INSERT INTO t1 SET a00 = 'bii'; +SET DEBUG_SYNC = 'rollback_undo_pk SIGNAL roll1_wait WAIT_FOR roll2'; +SET DEBUG_SYNC = 'rollback_purge_clust SIGNAL rollback_waiting WAIT_FOR resume'; +ROLLBACK; +connection purge_control; +SET DEBUG_SYNC = 'now WAIT_FOR roll1_wait'; +COMMIT; +SET DEBUG_SYNC = 'now SIGNAL roll2'; +connect con1,localhost,root,,; +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +SELECT a00 FROM t1 WHERE a00 = 'bii'; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now SIGNAL resume'; +connection con1; +a00 +connection con2; +connection default; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +1856 +DELETE FROM t1 WHERE a00 = 'dpn'; +COMMIT; +INSERT INTO t1 SET a00 = 'dpn'; +ROLLBACK; +ALTER TABLE t1 COMMENT='MERGE_THRESHOLD=35'; +connection purge_control; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection con2; +DELETE FROM t1 WHERE a00 = 'cnd'; +COMMIT; +BEGIN; +INSERT INTO t1 SET a00 = 'cnd'; +SET DEBUG_SYNC = 'rollback_undo_pk SIGNAL roll1_wait WAIT_FOR roll2'; +SET DEBUG_SYNC = 'rollback_purge_clust SIGNAL rollback_waiting WAIT_FOR resume EXECUTE 2'; +ROLLBACK; +connection purge_control; +SET DEBUG_SYNC = 'now WAIT_FOR roll1_wait'; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +SET DEBUG_SYNC = 'now SIGNAL roll2'; +connection con1; +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +SET DEBUG_SYNC = 'now SIGNAL resume'; +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +disconnect purge_control; +connection default; +SET DEBUG_SYNC = 'now SIGNAL resume'; +disconnect con1; +connection con2; +disconnect con2; +connection default; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +1856 +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_bug56947.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug56947.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_bug56947.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_bug56947.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,5 +1,6 @@ SET GLOBAL innodb_file_per_table=0; create table bug56947(a int not null) engine = innodb; +SET @saved_dbug = @@SESSION.debug_dbug; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; alter table bug56947 add unique index (a); ERROR HY000: Got error 11 "xxx" from storage engine InnoDB @@ -8,3 +9,4 @@ test.bug56947 check status OK drop table bug56947; SET @@global.innodb_file_per_table=DEFAULT; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_corrupt_bit.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_corrupt_bit.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_corrupt_bit.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_corrupt_bit.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,7 +24,7 @@ test.corrupt_bit_test_Ä check Warning InnoDB: Index idxÄ is marked as corrupted test.corrupt_bit_test_Ä check Warning InnoDB: Index idxÄ“ is marked as corrupted test.corrupt_bit_test_Ä check error Corrupt -SET debug_dbug = @save_dbug; +SET @@SESSION.debug_dbug = @save_dbug; CREATE INDEX idx3 ON corrupt_bit_test_Ä(b, c); ERROR HY000: Index idx is corrupted CREATE INDEX idx4 ON corrupt_bit_test_Ä(b, z); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_max_recordsize_32k.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); SELECT @@innodb_page_size; @@innodb_page_size 32768 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_max_recordsize_64k.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); SELECT @@innodb_page_size; @@innodb_page_size 65536 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_skip_innodb_is_tables.result 2020-01-26 18:37:28.000000000 +0000 @@ -97,7 +97,7 @@ buffer_flush_adaptive_avg_time_est buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Estimated time (ms) spent for adaptive flushing recently. buffer_LRU_batch_flush_avg_time_est buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Estimated time (ms) spent for LRU batch flushing recently. buffer_flush_avg_time buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Avg time (ms) spent for flushing recently. -buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Numner of adaptive flushes passed during the recent Avg period. +buffer_flush_adaptive_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of adaptive flushes passed during the recent Avg period. buffer_LRU_batch_flush_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of LRU batch flushes passed during the recent Avg period. buffer_flush_avg_pass buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Number of flushes passed during the recent Avg period. buffer_LRU_get_free_loops buffer 0 NULL NULL NULL 0 NULL NULL NULL NULL NULL NULL NULL disabled counter Total loops in LRU get free. diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_stats_persistent.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_stats_persistent.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_stats_persistent.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_stats_persistent.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,22 +1,15 @@ +SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked; SET GLOBAL innodb_stats_include_delete_marked = ON; SET @saved_traditional = @@GLOBAL.innodb_stats_traditional; SET GLOBAL innodb_stats_traditional=false; SET @saved_modified_counter = @@GLOBAL.innodb_stats_modified_counter; SET GLOBAL innodb_stats_modified_counter=1; -CREATE TABLE t0 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val)) +CREATE TABLE t1 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val)) ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1; -CREATE TABLE t1 LIKE t0; -CREATE TABLE t2 LIKE t0; -INSERT INTO t0 (val) VALUES (4); -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t1 SELECT * FROM t0; -SELECT COUNT(*) FROM t1; -COUNT(*) -16 +CREATE TABLE t2 LIKE t1; +INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; ANALYZE TABLE t1; Table Op Msg_type Msg_text test.t1 analyze status OK @@ -29,7 +22,7 @@ # DELETE must not affect statistics before COMMIT. EXPLAIN SELECT * FROM t1 WHERE val=4; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref val val 4 const 16 Using index +1 SIMPLE t1 ref val val 4 const 1 Using index connection con1; COUNT(*) 0 @@ -48,7 +41,7 @@ 0 connection default; BEGIN; -INSERT INTO t2 SELECT * FROM t0; +INSERT INTO t2 (val) SELECT 4 FROM seq_1_to_16; # The INSERT will show up before COMMIT. EXPLAIN SELECT * FROM t2 WHERE val=4; id select_type table type possible_keys key key_len ref rows Extra @@ -65,17 +58,14 @@ EXPLAIN SELECT * FROM t2 WHERE val=4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 ref val val 4 const 1 Using index -SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; -SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; InnoDB 0 transactions not purged -SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; # After COMMIT and purge, the DELETE must show up. EXPLAIN SELECT * FROM t1 WHERE val=4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref val val 4 const 1 Using index SET GLOBAL innodb_stats_include_delete_marked = OFF; BEGIN; -INSERT INTO t1 SELECT * FROM t0; +INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; EXPLAIN SELECT * FROM t1 WHERE val=4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref val val 4 const 16 Using index @@ -84,7 +74,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref val val 4 const 1 Using index BEGIN; -INSERT INTO t1 SELECT * FROM t0; +INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; COMMIT; EXPLAIN SELECT * FROM t1 WHERE val=4; id select_type table type possible_keys key key_len ref rows Extra @@ -110,7 +100,8 @@ 16 disconnect con1; connection default; -DROP TABLE t0,t1,t2; +DROP TABLE t1,t2; SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked; SET GLOBAL innodb_stats_traditional = @saved_traditional; SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter; +SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,6 +4,7 @@ connection con1; create table t1 (id integer, x integer) engine = InnoDB; insert into t1 values(0, 0); +SET @saved_dbug = @@SESSION.debug_dbug; set DEBUG_DBUG='+d,fatal-semaphore-timeout'; set autocommit=0; # Sending query on con1, @@ -21,6 +22,6 @@ # Waitting for reconnect after mysqld restarts # Reconnected after mysqld was successfully restarted # Cleaning up before exit -set DEBUG_DBUG=NULL; +SET debug_dbug = @saved_dbug; drop table if exists t1; # Clean exit diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_wl6326.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_wl6326.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_wl6326.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_wl6326.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,371 @@ +SET GLOBAL innodb_adaptive_hash_index = false; +SET GLOBAL innodb_stats_persistent = false; +connect con1,localhost,root,,; +connect con2,localhost,root,,; +connect con3,localhost,root,,; +CREATE TABLE t1 ( +a00 CHAR(255) NOT NULL DEFAULT 'a', +a01 CHAR(255) NOT NULL DEFAULT 'a', +a02 CHAR(255) NOT NULL DEFAULT 'a', +a03 CHAR(255) NOT NULL DEFAULT 'a', +a04 CHAR(255) NOT NULL DEFAULT 'a', +a05 CHAR(255) NOT NULL DEFAULT 'a', +a06 CHAR(255) NOT NULL DEFAULT 'a', +b INT NOT NULL DEFAULT 0 +) ENGINE = InnoDB; +ALTER TABLE t1 ADD PRIMARY KEY( +a00, +a01, +a02, +a03, +a04, +a05, +a06 +); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +1 +SET GLOBAL innodb_limit_optimistic_insert_debug = 7; +INSERT INTO t1 (a00) VALUES ('aa'); +INSERT INTO t1 (a00) VALUES ('ab'); +INSERT INTO t1 (a00) VALUES ('ac'); +INSERT INTO t1 (a00) VALUES ('ad'); +INSERT INTO t1 (a00) VALUES ('ae'); +INSERT INTO t1 (a00) VALUES ('af'); +INSERT INTO t1 (a00) VALUES ('ag'); +INSERT INTO t1 (a00) VALUES ('ah'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +3 +INSERT INTO t1 (a00) VALUES ('ai'); +INSERT INTO t1 (a00) VALUES ('aj'); +INSERT INTO t1 (a00) VALUES ('ak'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +4 +INSERT INTO t1 (a00) VALUES ('al'); +INSERT INTO t1 (a00) VALUES ('am'); +INSERT INTO t1 (a00) VALUES ('an'); +INSERT INTO t1 (a00) VALUES ('ao'); +INSERT INTO t1 (a00) VALUES ('ap'); +INSERT INTO t1 (a00) VALUES ('aq'); +INSERT INTO t1 (a00) VALUES ('ar'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +5 +INSERT INTO t1 (a00) VALUES ('as'); +INSERT INTO t1 (a00) VALUES ('at'); +INSERT INTO t1 (a00) VALUES ('au'); +INSERT INTO t1 (a00) VALUES ('av'); +INSERT INTO t1 (a00) VALUES ('aw'); +INSERT INTO t1 (a00) VALUES ('ax'); +INSERT INTO t1 (a00) VALUES ('ay'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +6 +INSERT INTO t1 (a00) VALUES ('az'); +INSERT INTO t1 (a00) VALUES ('ba'); +INSERT INTO t1 (a00) VALUES ('bb'); +INSERT INTO t1 (a00) VALUES ('bc'); +INSERT INTO t1 (a00) VALUES ('bd'); +INSERT INTO t1 (a00) VALUES ('be'); +INSERT INTO t1 (a00) VALUES ('bf'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +7 +INSERT INTO t1 (a00) VALUES ('bg'); +INSERT INTO t1 (a00) VALUES ('bh'); +INSERT INTO t1 (a00) VALUES ('bi'); +INSERT INTO t1 (a00) VALUES ('bj'); +INSERT INTO t1 (a00) VALUES ('bk'); +INSERT INTO t1 (a00) VALUES ('bl'); +INSERT INTO t1 (a00) VALUES ('bm'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +8 +INSERT INTO t1 (a00) VALUES ('bn'); +INSERT INTO t1 (a00) VALUES ('bo'); +INSERT INTO t1 (a00) VALUES ('bp'); +INSERT INTO t1 (a00) VALUES ('bq'); +INSERT INTO t1 (a00) VALUES ('br'); +INSERT INTO t1 (a00) VALUES ('bs'); +INSERT INTO t1 (a00) VALUES ('bt'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +11 +INSERT INTO t1 (a00) VALUES ('bu'); +INSERT INTO t1 (a00) VALUES ('bv'); +INSERT INTO t1 (a00) VALUES ('bw'); +INSERT INTO t1 (a00) VALUES ('bx'); +INSERT INTO t1 (a00) VALUES ('by'); +INSERT INTO t1 (a00) VALUES ('bz'); +INSERT INTO t1 (a00) VALUES ('ca'); +INSERT INTO t1 (a00) VALUES ('cb'); +INSERT INTO t1 (a00) VALUES ('cc'); +INSERT INTO t1 (a00) VALUES ('cd'); +INSERT INTO t1 (a00) VALUES ('ce'); +INSERT INTO t1 (a00) VALUES ('cf'); +INSERT INTO t1 (a00) VALUES ('cg'); +INSERT INTO t1 (a00) VALUES ('ch'); +INSERT INTO t1 (a00) VALUES ('ci'); +INSERT INTO t1 (a00) VALUES ('cj'); +INSERT INTO t1 (a00) VALUES ('ck'); +INSERT INTO t1 (a00) VALUES ('cl'); +INSERT INTO t1 (a00) VALUES ('cm'); +INSERT INTO t1 (a00) VALUES ('cn'); +INSERT INTO t1 (a00) VALUES ('co'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +15 +INSERT INTO t1 (a00) VALUES ('cp'); +INSERT INTO t1 (a00) VALUES ('cq'); +INSERT INTO t1 (a00) VALUES ('cr'); +INSERT INTO t1 (a00) VALUES ('cs'); +INSERT INTO t1 (a00) VALUES ('ct'); +INSERT INTO t1 (a00) VALUES ('cu'); +INSERT INTO t1 (a00) VALUES ('cv'); +INSERT INTO t1 (a00) VALUES ('cw'); +INSERT INTO t1 (a00) VALUES ('cx'); +INSERT INTO t1 (a00) VALUES ('cy'); +INSERT INTO t1 (a00) VALUES ('cz'); +INSERT INTO t1 (a00) VALUES ('da'); +INSERT INTO t1 (a00) VALUES ('db'); +INSERT INTO t1 (a00) VALUES ('dc'); +INSERT INTO t1 (a00) VALUES ('dd'); +INSERT INTO t1 (a00) VALUES ('de'); +INSERT INTO t1 (a00) VALUES ('df'); +INSERT INTO t1 (a00) VALUES ('dg'); +INSERT INTO t1 (a00) VALUES ('dh'); +INSERT INTO t1 (a00) VALUES ('di'); +INSERT INTO t1 (a00) VALUES ('dj'); +INSERT INTO t1 (a00) VALUES ('dk'); +INSERT INTO t1 (a00) VALUES ('dl'); +INSERT INTO t1 (a00) VALUES ('dm'); +INSERT INTO t1 (a00) VALUES ('dn'); +INSERT INTO t1 (a00) VALUES ('do'); +INSERT INTO t1 (a00) VALUES ('dp'); +INSERT INTO t1 (a00) VALUES ('dq'); +INSERT INTO t1 (a00) VALUES ('dr'); +INSERT INTO t1 (a00) VALUES ('ds'); +INSERT INTO t1 (a00) VALUES ('dt'); +INSERT INTO t1 (a00) VALUES ('du'); +INSERT INTO t1 (a00) VALUES ('dv'); +INSERT INTO t1 (a00) VALUES ('dw'); +INSERT INTO t1 (a00) VALUES ('dx'); +INSERT INTO t1 (a00) VALUES ('dy'); +INSERT INTO t1 (a00) VALUES ('dz'); +INSERT INTO t1 (a00) VALUES ('ea'); +INSERT INTO t1 (a00) VALUES ('eb'); +INSERT INTO t1 (a00) VALUES ('ec'); +INSERT INTO t1 (a00) VALUES ('ed'); +INSERT INTO t1 (a00) VALUES ('ee'); +INSERT INTO t1 (a00) VALUES ('ef'); +INSERT INTO t1 (a00) VALUES ('eg'); +INSERT INTO t1 (a00) VALUES ('eh'); +INSERT INTO t1 (a00) VALUES ('ei'); +INSERT INTO t1 (a00) VALUES ('ej'); +INSERT INTO t1 (a00) VALUES ('ek'); +INSERT INTO t1 (a00) VALUES ('el'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +23 +INSERT INTO t1 (a00) VALUES ('em'); +INSERT INTO t1 (a00) VALUES ('en'); +INSERT INTO t1 (a00) VALUES ('eo'); +INSERT INTO t1 (a00) VALUES ('ep'); +INSERT INTO t1 (a00) VALUES ('eq'); +INSERT INTO t1 (a00) VALUES ('er'); +INSERT INTO t1 (a00) VALUES ('es'); +INSERT INTO t1 (a00) VALUES ('et'); +INSERT INTO t1 (a00) VALUES ('eu'); +INSERT INTO t1 (a00) VALUES ('ev'); +INSERT INTO t1 (a00) VALUES ('ew'); +INSERT INTO t1 (a00) VALUES ('ex'); +INSERT INTO t1 (a00) VALUES ('ey'); +INSERT INTO t1 (a00) VALUES ('ez'); +INSERT INTO t1 (a00) VALUES ('fa'); +INSERT INTO t1 (a00) VALUES ('fb'); +INSERT INTO t1 (a00) VALUES ('fc'); +INSERT INTO t1 (a00) VALUES ('fd'); +INSERT INTO t1 (a00) VALUES ('fe'); +INSERT INTO t1 (a00) VALUES ('ff'); +INSERT INTO t1 (a00) VALUES ('fg'); +INSERT INTO t1 (a00) VALUES ('fh'); +INSERT INTO t1 (a00) VALUES ('fi'); +INSERT INTO t1 (a00) VALUES ('fj'); +INSERT INTO t1 (a00) VALUES ('fk'); +INSERT INTO t1 (a00) VALUES ('fl'); +INSERT INTO t1 (a00) VALUES ('fm'); +INSERT INTO t1 (a00) VALUES ('fn'); +INSERT INTO t1 (a00) VALUES ('fo'); +INSERT INTO t1 (a00) VALUES ('fp'); +INSERT INTO t1 (a00) VALUES ('fq'); +INSERT INTO t1 (a00) VALUES ('fr'); +INSERT INTO t1 (a00) VALUES ('fs'); +INSERT INTO t1 (a00) VALUES ('ft'); +INSERT INTO t1 (a00) VALUES ('fu'); +INSERT INTO t1 (a00) VALUES ('fv'); +INSERT INTO t1 (a00) VALUES ('fw'); +INSERT INTO t1 (a00) VALUES ('fx'); +INSERT INTO t1 (a00) VALUES ('fy'); +INSERT INTO t1 (a00) VALUES ('fz'); +INSERT INTO t1 (a00) VALUES ('ga'); +INSERT INTO t1 (a00) VALUES ('gb'); +INSERT INTO t1 (a00) VALUES ('gc'); +INSERT INTO t1 (a00) VALUES ('gd'); +INSERT INTO t1 (a00) VALUES ('ge'); +INSERT INTO t1 (a00) VALUES ('gf'); +INSERT INTO t1 (a00) VALUES ('gg'); +INSERT INTO t1 (a00) VALUES ('gh'); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +29 +SET GLOBAL innodb_limit_optimistic_insert_debug = 0; +# Test start +SET DEBUG_SYNC = 'RESET'; +INSERT INTO t1 (a00) VALUES ('bfa'); +connection con1; +SET DEBUG_SYNC = 'before_insert_pessimitic_row_ins_clust SIGNAL reached WAIT_FOR continue'; +INSERT INTO t1 (a00) VALUES ('bfb'); +connection con2; +SET DEBUG_SYNC = 'now WAIT_FOR reached'; +SELECT a00,a01 FROM t1 WHERE a00 = 'aa'; +a00 a01 +aa a +SELECT a00,a01 FROM t1 WHERE a00 = 'aq'; +a00 a01 +aq a +SELECT a00,a01 FROM t1 WHERE a00 = 'cp'; +a00 a01 +cp a +SELECT a00,a01 FROM t1 WHERE a00 = 'el'; +a00 a01 +el a +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +SELECT a00,a01 FROM t1 WHERE a00 = 'ar'; +connection con3; +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +SELECT a00,a01 FROM t1 WHERE a00 = 'cn'; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait2 TIMEOUT 1'; +SET DEBUG_SYNC = 'now SIGNAL continue'; +connection con1; +connection con2; +a00 a01 +ar a +connection con3; +a00 a01 +cn a +connection default; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +30 +SET DEBUG_SYNC = 'RESET'; +INSERT INTO t1 (a00) VALUES ('coa'); +connection con1; +SET DEBUG_SYNC = 'before_insert_pessimitic_row_ins_clust SIGNAL reached WAIT_FOR continue'; +INSERT INTO t1 (a00) VALUES ('cob'); +connection con2; +SET DEBUG_SYNC = 'now WAIT_FOR reached'; +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +SELECT a00,a01 FROM t1 WHERE a00 = 'aa'; +connection con3; +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +SELECT a00,a01 FROM t1 WHERE a00 = 'el'; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait2 TIMEOUT 1'; +SET DEBUG_SYNC = 'now SIGNAL continue'; +connection con1; +connection con2; +a00 a01 +aa a +connection con3; +a00 a01 +el a +connection default; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +31 +SET DEBUG_SYNC = 'RESET'; +INSERT INTO t1 (a00) VALUES ('gba'); +connection con1; +SET DEBUG_SYNC = 'before_insert_pessimitic_row_ins_clust SIGNAL reached WAIT_FOR continue'; +INSERT INTO t1 (a00) VALUES ('gbb'); +connection con2; +SET DEBUG_SYNC = 'now WAIT_FOR reached'; +SELECT a00,a01 FROM t1 WHERE a00 = 'aa'; +a00 a01 +aa a +SELECT a00,a01 FROM t1 WHERE a00 = 'ek'; +a00 a01 +ek a +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +SELECT a00,a01 FROM t1 WHERE a00 = 'el'; +connection con3; +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +SELECT a00,a01 FROM t1 WHERE a00 = 'gb'; +connection default; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait2 TIMEOUT 1'; +SET DEBUG_SYNC = 'now SIGNAL continue'; +connection con1; +connection con2; +a00 a01 +el a +connection con3; +a00 a01 +gb a +connection default; +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; +CLUST_INDEX_SIZE +32 +SET DEBUG_SYNC = 'RESET'; +connection default; +disconnect con1; +disconnect con2; +disconnect con3; +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_wl6326_big.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_wl6326_big.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/innodb_wl6326_big.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/innodb_wl6326_big.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,449 @@ +CREATE SCHEMA my_schema; +USE my_schema; +CREATE FUNCTION f_thread_id (i INT) RETURNS CHAR(4) DETERMINISTIC +RETURN CONCAT(LPAD(CAST(i AS CHAR),3,'_'),'_') ; +SELECT CONCAT('->', f_thread_id( 1), '<-'); +CONCAT('->', f_thread_id( 1), '<-') +->__1_<- +SELECT CONCAT('->', f_thread_id(12), '<-'); +CONCAT('->', f_thread_id(12), '<-') +->_12_<- +SET @extra_int = 1; +SET @extra_string = f_thread_id(@extra_int); +SELECT @extra_int , @extra_string; +@extra_int @extra_string +1 __1_ +CREATE FUNCTION f_col_int1 (i INT) RETURNS INT(20) DETERMINISTIC +RETURN i * 1000 + @extra_int ; +SELECT f_col_int1(my_col) AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +1001 +12001 +123001 +1234001 +12345001 +CREATE FUNCTION f_col_int2 (i INT) RETURNS INT(20) DETERMINISTIC +RETURN @extra_int * 10000000 + i ; +SELECT f_col_int2(my_col) AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +10000001 +10000012 +10000123 +10001234 +10012345 +CREATE FUNCTION f_col_int3 (i INT) RETURNS INT(20) DETERMINISTIC +RETURN @extra_int ; +SELECT f_col_int3(my_col) AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +1 +1 +1 +1 +1 +CREATE FUNCTION f_col_blob (i INT) RETURNS BLOB DETERMINISTIC +RETURN RPAD(@extra_string,(@@innodb_page_size / 2 ) + 1,'a'); +SELECT CONCAT('->', SUBSTR(f_col_blob(my_col) FROM 1 FOR 10), +'<-.....->', SUBSTR(f_col_blob(my_col) FROM -10 FOR 10), '<-') AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +->__1_aaaaaa<-.....->aaaaaaaaaa<- +->__1_aaaaaa<-.....->aaaaaaaaaa<- +->__1_aaaaaa<-.....->aaaaaaaaaa<- +->__1_aaaaaa<-.....->aaaaaaaaaa<- +->__1_aaaaaa<-.....->aaaaaaaaaa<- +CREATE FUNCTION f_col_char0 (i INT) RETURNS CHAR(255) DETERMINISTIC +RETURN LPAD(CAST(i AS CHAR),255,' '); +SELECT CONCAT('->', f_col_char0(my_col), '<-') AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +-> 1<- +-> 12<- +-> 123<- +-> 1234<- +-> 12345<- +CREATE FUNCTION f_col_char1 (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B', +LPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '), +@extra_string, +RPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '), +'E') ; +SELECT CONCAT('->', f_col_char1(my_col), '<-') AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +->B __1_1 E<- +->B 1__1_2 E<- +->B 1__1_23 E<- +->B 12__1_34 E<- +->B 12__1_345 E<- +CREATE FUNCTION f_col_char2 (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B', +RPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '), +@extra_string, +LPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '), +'E'); +SELECT CONCAT('->', f_col_char2(my_col), '<-') AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +->B __1_ 1E<- +->B1 __1_ 2E<- +->B1 __1_ 23E<- +->B12 __1_ 34E<- +->B12 __1_ 345E<- +CREATE FUNCTION f_col_char3 (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B',@extra_string,LPAD(CAST(i AS CHAR),20,' '),'E'); +SELECT CONCAT('->', f_col_char3(my_col), '<-') AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +->B__1_ 1E<- +->B__1_ 12E<- +->B__1_ 123E<- +->B__1_ 1234E<- +->B__1_ 12345E<- +CREATE FUNCTION f_col_char4 (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B',RPAD(CAST(i AS CHAR),20,' '),@extra_string,'E'); +SELECT CONCAT('->', f_col_char4(my_col), '<-') AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; +my_result +->B1 __1_E<- +->B12 __1_E<- +->B123 __1_E<- +->B1234 __1_E<- +->B12345 __1_E<- +CREATE TABLE my_metrics LIKE information_schema.innodb_metrics; +ALTER TABLE my_metrics ADD COLUMN phase ENUM('after', 'before'), +DROP COLUMN SUBSYSTEM, DROP COLUMN TYPE, DROP COLUMN COMMENT, +ADD PRIMARY KEY (NAME,phase); +CREATE TABLE t1 ( +col_int0 BIGINT, +col_int1 BIGINT, +col_int2 BIGINT, +col_int3 BIGINT, +col_blob BLOB, +col_char0 VARCHAR(255), +col_char1 VARCHAR(30), +col_char2 VARCHAR(30), +col_char3 VARCHAR(30), +col_char4 VARCHAR(30) +) ENGINE = InnoDB; +ALTER TABLE t1 ADD UNIQUE KEY uidx_col_int0 (col_int0), +ADD UNIQUE KEY uidx1 (col_int1, col_char0), +ADD UNIQUE KEY uidx2 (col_int2, col_char0, col_int1), +ADD UNIQUE KEY uidx3 (col_int3, col_int2, col_char0), +ADD UNIQUE KEY uidx4 (col_char1, col_char0), +ADD UNIQUE KEY uidx5 (col_char2, col_char0, col_char1), +ADD UNIQUE KEY uidx6 (col_char3, col_char2, col_char0), +ADD UNIQUE KEY uidx7 (col_int1, col_int2, col_int3, col_char4, +col_char1, col_char2, col_char3, col_char0), +ADD KEY idx8 (col_blob(10), col_char4); +CREATE PROCEDURE proc_fill_t1 (max_row_count INT, load_unit INT) +BEGIN +DECLARE my_count INTEGER DEFAULT 0; +DECLARE max_load_count INTEGER DEFAULT 0; +DROP TABLE IF EXISTS t0; +CREATE TEMPORARY TABLE t0 (col_int0 BIGINT, PRIMARY KEY(col_int0)); +WHILE (my_count < load_unit ) DO +SET my_count = my_count + 1; +INSERT INTO t0 SET col_int0 = my_count; +END WHILE; +SET max_load_count = (SELECT (max_row_count DIV load_unit) + 1 ); +SELECT COUNT(col_int0) INTO @val FROM t1; +SET my_count = 0; +REPEAT +INSERT INTO t1 (col_int0, col_int1, col_int2, col_int3, col_blob, +col_char0, col_char1, col_char2,col_char3,col_char4) +SELECT col_int0 + @val, +f_col_int1(col_int0 + @val), +f_col_int2(col_int0 + @val), +f_col_int3(col_int0 + @val), +f_col_blob(col_int0 + @val), +f_col_char0(col_int0 + @val), +f_col_char1(col_int0 + @val), +f_col_char2(col_int0 + @val), +f_col_char3(col_int0 + @val), +f_col_char4(col_int0 + @val) +FROM t0; +COMMIT; +SELECT MAX(col_int0) INTO @val FROM t1; +SET my_count = my_count + 1; +UNTIL( my_count > max_load_count OR @val >= max_row_count ) +END REPEAT; +DROP TEMPORARY TABLE t0; +END| +CREATE PROCEDURE proc_dml (max_duration INT, t1_stripe_half INT) +BEGIN +DECLARE aux INTEGER DEFAULT 0; +DECLARE start_time INT; +DECLARE CONTINUE HANDLER FOR SQLEXCEPTION, SQLWARNING, NOT FOUND BEGIN END; +SET @extra_int = CONNECTION_ID(); +SET @extra_string = f_thread_id(@extra_int); +SELECT ROUND(MAX(col_int0) / 2 ) INTO @t1_half FROM t1; +# The user lock 'Blocker' should be already set by some other session S1. +# S1 starts the race by releasing that lock. +# Wait till the lock is released and the lock can be obtained. +# In order to prevent endless waiting in case of non foreseen problems +# limit the timespan to 30 seconds. +SELECT GET_LOCK('Blocker', 30) INTO @aux; +# Release the lock immediate so that the other "runner" sessions start too. +SELECT RELEASE_LOCK('Blocker') INTO @aux; +SET start_time = UNIX_TIMESTAMP(); +WHILE (UNIX_TIMESTAMP() - start_time < max_duration) DO +SET @aux = @t1_half - t1_stripe_half + ROUND(RAND() * t1_stripe_half * 2); +UPDATE t1 SET +col_int1 = f_col_int1(col_int0), +col_int2 = f_col_int2(col_int0), +col_int3 = f_col_int3(col_int0), +col_blob = f_col_blob(col_int0), +col_char0 = f_col_char0(col_int0), +col_char1 = f_col_char1(col_int0), +col_char2 = f_col_char2(col_int0), +col_char3 = f_col_char3(col_int0), +col_char4 = f_col_char4(col_int0) +WHERE col_int0 = @aux; +COMMIT; +END WHILE; +END| +SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%"; +SET @pre_reset_ts = NOW(); +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; +SET @pre_enable_ts = NOW(); +SET GLOBAL innodb_monitor_enable = "innodb_rwlock_sx_%"; +SET @pre_collect_ts = NOW(); +DELETE FROM my_metrics; +INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'before' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +# TC-01 There are exact three entries "innodb_rwlock_sx_%" with the +# with the name which follow in innodb_metrics. +# pass +SELECT COUNT(*) INTO @sx_count FROM my_metrics; +# TC-02 Counting is now enabled. ALL = @sx_count entries show that. +# pass +# TC-03 @pre_reset_ts < TIME_RESET. ALL = @sx_count entries show that. +# pass +# TC-04 @pre_enable_ts < TIME_ENABLED. ALL = @sx_count entries show that. +# pass +# TC-05 TIME_RESET < TIME_ENABLED AND TIME_ENABLED < @pre_collect_ts +# AND TIME_ELAPSED > 0. ALL = @sx_count entries show that. +# pass +# TC-06 COUNT_RESET = MAX_COUNT_RESET. ALL = @sx_count entries show that. +# pass +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; +SHOW ENGINE INNODB STATUS; +DELETE FROM my_metrics; +INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'before' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +SET @extra_string = '__0_'; +SET @extra_int = 0; +# TC-07 One session inserts some significant amount of rows into t1. +# The system MUST survive that. +SET @max_row_count = ; +SET @load_unit = ; +SET @start_time = UNIX_TIMESTAMP(); +SET AUTOCOMMIT = OFF; +CALL proc_fill_t1 (@max_row_count, @load_unit); +# pass +SET AUTOCOMMIT = ON; +SELECT col_int0 INTO @t1_half FROM t1 +WHERE col_int0 >= (@val DIV 2) ORDER BY col_int0 LIMIT 1; +SHOW ENGINE INNODB STATUS; +SELECT col_int0, col_int1, col_int2, col_int3, +CONCAT('->', SUBSTR(col_blob FROM 1 FOR 10), +'<-.....->', SUBSTR(col_blob FROM -10 FOR 10), '<-') AS col_blobx, +CONCAT('->',col_char0,'<-') AS col_char0x, +CONCAT('->',col_char1,'<-') AS col_char1x, +CONCAT('->',col_char2,'<-') AS col_char2x, +CONCAT('->',col_char3,'<-') AS col_char3x, +CONCAT('->',col_char4,'<-') AS col_char4x +FROM t1 WHERE col_int0 between 98 AND 102; +col_int0 98 +col_int1 98000 +col_int2 98 +col_int3 0 +col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<- +col_char0x -> 98<- +col_char1x ->B 9__0_8 E<- +col_char2x ->B9 __0_ 8E<- +col_char3x ->B__0_ 98E<- +col_char4x ->B98 __0_E<- +col_int0 99 +col_int1 99000 +col_int2 99 +col_int3 0 +col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<- +col_char0x -> 99<- +col_char1x ->B 9__0_9 E<- +col_char2x ->B9 __0_ 9E<- +col_char3x ->B__0_ 99E<- +col_char4x ->B99 __0_E<- +col_int0 100 +col_int1 100000 +col_int2 100 +col_int3 0 +col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<- +col_char0x -> 100<- +col_char1x ->B 1__0_00 E<- +col_char2x ->B1 __0_ 00E<- +col_char3x ->B__0_ 100E<- +col_char4x ->B100 __0_E<- +col_int0 101 +col_int1 101000 +col_int2 101 +col_int3 0 +col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<- +col_char0x -> 101<- +col_char1x ->B 1__0_01 E<- +col_char2x ->B1 __0_ 01E<- +col_char3x ->B__0_ 101E<- +col_char4x ->B101 __0_E<- +col_int0 102 +col_int1 102000 +col_int2 102 +col_int3 0 +col_blobx ->__0_aaaaaa<-.....->aaaaaaaaaa<- +col_char0x -> 102<- +col_char1x ->B 1__0_02 E<- +col_char2x ->B1 __0_ 02E<- +col_char3x ->B__0_ 102E<- +col_char4x ->B102 __0_E<- +# TC-11 Several concurrent sessions perform updates in t1 like mad. +# The system MUST survive this. +# Printing of statements is partially suppressed. +SET @start_time = UNIX_TIMESTAMP(); +SELECT 1 FROM t1 WHERE col_int0 = @t1_half FOR UPDATE; +1 +1 +SELECT GET_LOCK('Blocker', 1000) ; +GET_LOCK('Blocker', 1000) +1 +RELEASE_LOCK('Blocker') +1 +# pass +SHOW ENGINE INNODB STATUS; +# TC-13 One session performs ALTER TABLE t1 ADD KEY ... on the fat table t1. +# The system MUST survive this. +SET @start_time = UNIX_TIMESTAMP(); +ALTER TABLE t1 ADD KEY idx_col_char4_col_char0 (col_char4,col_char0); +SHOW ENGINE INNODB STATUS; +# pass +# TC-15 One session performs a fat update on the fat table t1. +# The system MUST survive this. +SET @start_time = UNIX_TIMESTAMP(); +SET @extra_int = 13; +SET @extra_string = f_thread_id(@extra_int); +UPDATE t1 SET +col_int1 = f_col_int1(col_int0), col_int2 = f_col_int2(col_int0), +col_int3 = f_col_int3(col_int0), col_blob = f_col_blob(col_int0), +col_char0 = f_col_char0(col_int0), col_char1 = f_col_char1(col_int0), +col_char2 = f_col_char2(col_int0), col_char3 = f_col_char3(col_int0), +col_char4 = f_col_char4(col_int0) +WHERE col_int0 BETWEEN @t1_half - 2500 AND @t1_half + 2500; +COMMIT; +SHOW ENGINE INNODB STATUS; +# pass +INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'after' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +# TC-16 The following activities happend after reset in innodb_metrics +# - Insert some significant amount of rows into t1. +# - Several concurrent users perform excessive updates in t1. +# - ALTER TABLE ... ADD KEY +# - One UPDATE statement modifying a huge slice of t1. +# Any of them causes heavy use of SX lock and therefore COUNT_RESET +# must have grown for ALL = @sx_count entries. +# pass +# TC-09 Heavy activity after reset. +# COUNT_RESET = MAX_COUNT_RESET for ALL = @sx_count entries +# needs to stay valid though he counters will have grown. +# pass +DELETE FROM my_metrics; +INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'before' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; +INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'after' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +# TC-08 There was a reset. COUNT_RESET = MAX_COUNT_RESET for ALL +# = @sx_count entries. +# pass +# TC-17 We had heavy activity causing big counters and after that a reset. +# Reset causes COUNT > COUNT_RESET AND MAX_COUNT > MAX_COUNT_RESET +# for ALL @sx_count entries. +# pass +# TC-18 We had some reset but this must not decrease COUNT or MAX_COUNT +# after.COUNT >= before.COUNT AND +# after.MAX_COUNT >= before.MAX_COUNT for ALL @sx_count entries. +# pass +# TC-19 We had some reset after heavy activity and this must cause +# after.COUNT_RESET < before.COUNT_RESET +# AND after.MAX_COUNT_RESET < before.MAX_COUNT_RESET AND +# for ALL @sx_count entries. +# pass +connection con10; +disconnect con10; +connection con9; +disconnect con9; +connection con8; +disconnect con8; +connection con7; +disconnect con7; +connection con6; +disconnect con6; +connection con5; +disconnect con5; +connection con4; +disconnect con4; +connection con3; +disconnect con3; +connection con2; +disconnect con2; +connection con1; +disconnect con1; +connection default; +USE test; +DROP SCHEMA my_schema; +SET GLOBAL innodb_monitor_disable = all; +SET GLOBAL innodb_monitor_reset_all = all; +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_monitor_disable = "innodb_rwlock_sx_%"; +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter,4k.rdiff mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter,4k.rdiff --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter,4k.rdiff 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter,4k.rdiff 2020-01-26 18:37:28.000000000 +0000 @@ -1,17 +1,6 @@ --- instant_alter.result +++ instant_alter,4k.result -@@ -227,7 +227,9 @@ - COMMIT; - ALTER TABLE t2 ADD COLUMN d1 VARCHAR(2000) DEFAULT REPEAT('asdf',500); - affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+info: Records: 0 Duplicates: 0 Warnings: 1 -+Warnings: -+Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. - SELECT id, c1, ST_AsText(p) p, d1 FROM t2; - id c1 p d1 - 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa LINESTRING(0 0,0 1,1 1) asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd -@@ -241,7 +243,7 @@ +@@ -241,7 +241,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -20,7 +9,7 @@ connection default; ROLLBACK; connection analyze; -@@ -251,7 +253,7 @@ +@@ -251,7 +251,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -29,7 +18,7 @@ connection default; BEGIN; UPDATE t2 SET d1 = repeat(id, 200); -@@ -262,7 +264,7 @@ +@@ -262,7 +262,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -38,7 +27,7 @@ connection default; ROLLBACK; connection analyze; -@@ -272,7 +274,7 @@ +@@ -272,7 +272,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -47,17 +36,16 @@ connection default; ALTER TABLE t2 DROP p; affected rows: 0 -@@ -318,10 +320,14 @@ - ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8 - DEFAULT 'The quick brown fox jumps over the lazy dog'; +@@ -320,8 +320,14 @@ affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+info: Records: 0 Duplicates: 0 Warnings: 1 -+Warnings: -+Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + info: Records: 0 Duplicates: 0 Warnings: 0 ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL; ++ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 1979. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs ++SET innodb_strict_mode = OFF; affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 ++ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL; ++affected rows: 0 +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. @@ -83,10 +71,10 @@ +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. - SET innodb_strict_mode = OFF; - affected rows: 0 SELECT * FROM t3; -@@ -378,6 +388,8 @@ + id c2 c4 c5 c6 c8 phrase b + 1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog +@@ -376,6 +386,8 @@ (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000), p POINT NOT NULL DEFAULT ST_GeomFromText('POINT(0 0)'), SPATIAL INDEX(p)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; @@ -95,7 +83,7 @@ BEGIN; INSERT INTO big SET id=1, c1=REPEAT('a', 200), c2=REPEAT('b', 200), c3=REPEAT('c', 159); -@@ -395,13 +407,15 @@ +@@ -393,13 +405,15 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -113,7 +101,7 @@ CHECKSUM TABLE big; Table Checksum test.big 1705165209 -@@ -418,7 +432,7 @@ +@@ -416,7 +430,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -122,7 +110,7 @@ connection default; ROLLBACK; CHECKSUM TABLE big; -@@ -431,7 +445,7 @@ +@@ -429,7 +443,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -131,18 +119,16 @@ connection default; InnoDB 0 transactions not purged DROP TABLE t1,t2,t3,t4,big; -@@ -663,7 +677,9 @@ - COMMIT; - ALTER TABLE t2 ADD COLUMN d1 VARCHAR(2000) DEFAULT REPEAT('asdf',500); - affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+info: Records: 0 Duplicates: 0 Warnings: 1 +@@ -515,6 +529,8 @@ + CREATE TABLE t1 (a INT, b VARCHAR(500), c TEXT, UNIQUE(a,b)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; + ALTER TABLE t1 ADD d TEXT; + ALTER TABLE t1 ADD PRIMARY KEY (a,b); +Warnings: -+Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. - SELECT id, c1, ST_AsText(p) p, d1 FROM t2; - id c1 p d1 - 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa LINESTRING(0 0,0 1,1 1) asdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd -@@ -677,7 +693,7 @@ ++Warning 139 Row size too large (> 1979). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + ALTER TABLE t1 ADD va INT AS (a) VIRTUAL; + DROP TABLE t1; + CREATE TABLE t1 +@@ -703,7 +719,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -151,7 +137,7 @@ connection default; ROLLBACK; connection analyze; -@@ -687,7 +703,7 @@ +@@ -713,7 +729,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -160,7 +146,7 @@ connection default; BEGIN; UPDATE t2 SET d1 = repeat(id, 200); -@@ -698,7 +714,7 @@ +@@ -724,7 +740,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -169,7 +155,7 @@ connection default; ROLLBACK; connection analyze; -@@ -708,7 +724,7 @@ +@@ -734,7 +750,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -178,14 +164,8 @@ connection default; ALTER TABLE t2 DROP p; affected rows: 0 -@@ -754,10 +770,14 @@ - ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8 - DEFAULT 'The quick brown fox jumps over the lazy dog'; - affected rows: 0 --info: Records: 0 Duplicates: 0 Warnings: 0 -+info: Records: 0 Duplicates: 0 Warnings: 1 -+Warnings: -+Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +@@ -783,7 +799,9 @@ + info: Records: 0 Duplicates: 0 Warnings: 0 ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL; affected rows: 0 -info: Records: 0 Duplicates: 0 Warnings: 0 @@ -195,7 +175,7 @@ INSERT INTO t3 SET id=4; ERROR HY000: Field 'c2' doesn't have a default value INSERT INTO t3 SET id=4, c2=0, b=0xf09f98b1; -@@ -770,7 +790,9 @@ +@@ -796,7 +814,9 @@ ALTER TABLE t3 CHANGE t phrase TEXT DEFAULT 0xc3a4c3a448, CHANGE b b BLOB NOT NULL DEFAULT 'binary line of business'; affected rows: 4 @@ -206,7 +186,7 @@ INSERT INTO t3 SET id=5, c2=9; Warnings: Note 1265 Data truncated for column 'c7' at row 1 -@@ -784,7 +806,9 @@ +@@ -810,7 +830,9 @@ 5 9 POLYGON((1 1,2 2,3 3,1 1)) 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 03:00:42 1970-01-01 ääH binary line of business ALTER TABLE t3 DROP c3, DROP c7; affected rows: 0 @@ -214,10 +194,10 @@ +info: Records: 0 Duplicates: 0 Warnings: 1 +Warnings: +Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. - SET innodb_strict_mode = OFF; - affected rows: 0 SELECT * FROM t3; -@@ -814,6 +838,8 @@ + id c2 c4 c5 c6 c8 phrase b + 1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog +@@ -838,6 +860,8 @@ (id INT PRIMARY KEY, c1 VARCHAR(4000), c2 VARCHAR(4000), c3 VARCHAR(1000), p POINT NOT NULL DEFAULT ST_GeomFromText('POINT(0 0)'), SPATIAL INDEX(p)) ENGINE=InnoDB ROW_FORMAT=COMPACT; @@ -226,7 +206,7 @@ BEGIN; INSERT INTO big SET id=1, c1=REPEAT('a', 200), c2=REPEAT('b', 200), c3=REPEAT('c', 159); -@@ -831,13 +857,15 @@ +@@ -855,13 +879,15 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -244,7 +224,7 @@ CHECKSUM TABLE big; Table Checksum test.big 1705165209 -@@ -854,7 +882,7 @@ +@@ -878,7 +904,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -253,7 +233,7 @@ connection default; ROLLBACK; CHECKSUM TABLE big; -@@ -867,7 +895,7 @@ +@@ -891,7 +917,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -262,7 +242,16 @@ connection default; InnoDB 0 transactions not purged DROP TABLE t1,t2,t3,t4,big; -@@ -1113,7 +1141,7 @@ +@@ -977,6 +1003,8 @@ + CREATE TABLE t1 (a INT, b VARCHAR(500), c TEXT, UNIQUE(a,b)) ENGINE=InnoDB ROW_FORMAT=COMPACT; + ALTER TABLE t1 ADD d TEXT; + ALTER TABLE t1 ADD PRIMARY KEY (a,b); ++Warnings: ++Warning 139 Row size too large (> 1982). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. + ALTER TABLE t1 ADD va INT AS (a) VIRTUAL; + DROP TABLE t1; + CREATE TABLE t1 +@@ -1165,7 +1193,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -271,7 +260,7 @@ connection default; ROLLBACK; connection analyze; -@@ -1123,7 +1151,7 @@ +@@ -1175,7 +1203,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -280,7 +269,7 @@ connection default; BEGIN; UPDATE t2 SET d1 = repeat(id, 200); -@@ -1134,7 +1162,7 @@ +@@ -1186,7 +1214,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -289,7 +278,7 @@ connection default; ROLLBACK; connection analyze; -@@ -1144,7 +1172,7 @@ +@@ -1196,7 +1224,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/t2'; clust_index_size @@ -298,7 +287,7 @@ connection default; ALTER TABLE t2 DROP p; affected rows: 0 -@@ -1267,7 +1295,7 @@ +@@ -1317,7 +1345,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -307,7 +296,7 @@ connection default; ALTER TABLE big ADD COLUMN (d1 INT DEFAULT 0, d2 VARCHAR(20) DEFAULT 'abcde', -@@ -1290,7 +1318,7 @@ +@@ -1340,7 +1368,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -316,7 +305,7 @@ connection default; ROLLBACK; CHECKSUM TABLE big; -@@ -1303,7 +1331,7 @@ +@@ -1353,7 +1381,7 @@ SELECT clust_index_size FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE name = 'test/big'; clust_index_size @@ -325,3 +314,10 @@ connection default; InnoDB 0 transactions not purged DROP TABLE t1,t2,t3,t4,big; +@@ -1446,5 +1474,5 @@ + FROM information_schema.global_status + WHERE variable_name = 'innodb_instant_alter_column'; + instants +-57 ++58 + SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter.result 2020-01-26 18:37:28.000000000 +0000 @@ -349,8 +349,6 @@ ALTER TABLE t3 DROP c3, DROP c7; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 -SET innodb_strict_mode = OFF; -affected rows: 0 SELECT * FROM t3; id c2 c4 c5 c6 c8 phrase b 1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog @@ -514,6 +512,13 @@ Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +SET innodb_strict_mode = ON; +CREATE TABLE t1 (a INT, b VARCHAR(500), c TEXT, UNIQUE(a,b)) ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +ALTER TABLE t1 ADD d TEXT; +ALTER TABLE t1 ADD PRIMARY KEY (b,a); +ALTER TABLE t1 ADD va INT AS (a) VIRTUAL; +DROP TABLE t1; +SET innodb_strict_mode = OFF; CREATE TABLE t1 (id INT PRIMARY KEY, c2 INT UNIQUE, c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'), @@ -808,8 +813,6 @@ ALTER TABLE t3 DROP c3, DROP c7; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 -SET innodb_strict_mode = OFF; -affected rows: 0 SELECT * FROM t3; id c2 c4 c5 c6 c8 phrase b 1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog @@ -973,6 +976,13 @@ Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +SET innodb_strict_mode = ON; +CREATE TABLE t1 (a INT, b VARCHAR(500), c TEXT, UNIQUE(a,b)) ENGINE=InnoDB ROW_FORMAT=COMPACT; +ALTER TABLE t1 ADD d TEXT; +ALTER TABLE t1 ADD PRIMARY KEY (b,a); +ALTER TABLE t1 ADD va INT AS (a) VIRTUAL; +DROP TABLE t1; +SET innodb_strict_mode = OFF; CREATE TABLE t1 (id INT PRIMARY KEY, c2 INT UNIQUE, c3 POINT NOT NULL DEFAULT ST_GeomFromText('POINT(3 4)'), @@ -1267,8 +1277,6 @@ ALTER TABLE t3 DROP c3, DROP c7; affected rows: 0 info: Records: 0 Duplicates: 0 Warnings: 0 -SET innodb_strict_mode = OFF; -affected rows: 0 SELECT * FROM t3; id c2 c4 c5 c6 c8 phrase b 1 1 1970-01-01 03:00:42 1970-01-01 03:00:42 NULL 1970-01-01 The quick brown fox jumps over the lazy dog @@ -1432,10 +1440,17 @@ Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +SET innodb_strict_mode = ON; +CREATE TABLE t1 (a INT, b VARCHAR(500), c TEXT, UNIQUE(a,b)) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +ALTER TABLE t1 ADD d TEXT; +ALTER TABLE t1 ADD PRIMARY KEY (b,a); +ALTER TABLE t1 ADD va INT AS (a) VIRTUAL; +DROP TABLE t1; +SET innodb_strict_mode = OFF; disconnect analyze; SELECT variable_value-@old_instant instants FROM information_schema.global_status WHERE variable_name = 'innodb_instant_alter_column'; instants -54 +57 SET GLOBAL innodb_purge_rseg_truncate_frequency= @saved_frequency; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter_bugs.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter_bugs.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter_bugs.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter_bugs.result 2020-01-26 18:37:28.000000000 +0000 @@ -128,6 +128,10 @@ pk f1 f2 f3 f4 f5 f6 f7 f8 filler HANDLER h CLOSE; DROP TABLE t1; +# +# MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys +# which are pointed to the table being altered +# CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb; CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL, status ENUM ('a', 'b', 'c'), INDEX idx1(f2), @@ -154,3 +158,15 @@ ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ALTER TABLE t2 CHANGE status status VARCHAR(20) DEFAULT NULL; DROP TABLE t2, t1; +# +# MDEV-20938 Double free of dict_foreign_t during instant ALTER TABLE +# +CREATE TABLE t1 (id INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT UNSIGNED PRIMARY KEY, b INT UNSIGNED UNIQUE, +FOREIGN KEY fk1 (b) REFERENCES t1 (id)) ENGINE=InnoDB; +ALTER TABLE t2 +DROP FOREIGN KEY fk1, +CHANGE b d INT UNSIGNED, +ADD c INT; +DROP TABLE t2, t1; +# End of 10.3 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter_debug.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter_debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/instant_alter_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/instant_alter_debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -264,3 +264,21 @@ 5 NULL NULL DROP TABLE t1; SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; +# +# MDEV-21045 AddressSanitizer: use-after-poison in mem_heap_dup / row_log_table_get_pk_col +# +CREATE TABLE t1 (a TEXT) ENGINE = InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 (a) VALUES ('foo'); +ALTER TABLE t1 ADD COLUMN b INT DEFAULT 0,algorithm=instant; +connect con2,localhost,root,,test; +SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL onlinealter WAIT_FOR update'; +ALTER TABLE t1 ADD PRIMARY KEY (b); +connection default; +SET DEBUG_SYNC='now WAIT_FOR onlinealter'; +UPDATE t1 SET b = 1; +SET DEBUG_SYNC='now SIGNAL update'; +connection con2; +connection default; +SET DEBUG_SYNC='RESET'; +disconnect con2; +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/purge_secondary_mdev-16222.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# -# MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes -# -set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency; -set global innodb_purge_rseg_truncate_frequency= 1; -set @saved_dbug= @@global.debug_dbug; -set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2"; -create table t1 ( -pk serial, vb tinyblob as (b) virtual, b tinyblob, -primary key(pk), index (vb(64))) -engine innodb; -insert ignore into t1 (b) values ('foo'); -select * into outfile 'load.data' from t1; -load data infile 'load.data' replace into table t1; -set debug_sync= "now WAIT_FOR latch_released"; -set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1"; -drop table t1; -set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table"; -create table t1 ( -pk serial, vb tinyblob as (b) virtual, b tinyblob, -primary key(pk), index (vb(64))) -engine innodb; -insert ignore into t1 (b) values ('foo'); -select * into outfile 'load.data' from t1; -load data infile 'load.data' replace into table t1; -set debug_sync= "now WAIT_FOR got_no_such_table"; -set global debug_dbug= @saved_dbug; -drop table t1; -set global innodb_purge_rseg_truncate_frequency= @saved_frequency; -set debug_sync= "RESET"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/redo_log_during_checkpoint.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,8 +4,8 @@ SET GLOBAL innodb_log_checkpoint_now = 1; CREATE DATABASE very_long_database_name; USE very_long_database_name; -set debug_dbug = '+d,increase_mtr_checkpoint_size'; -set debug_dbug = '+d,crash_after_checkpoint'; +SET debug_dbug = '+d,increase_mtr_checkpoint_size'; +SET debug_dbug = '+d,crash_after_checkpoint'; set global innodb_log_checkpoint_now = 1; ERROR HY000: Lost connection to MySQL server during query # Skip MLOG_FILE_NAME redo records during recovery @@ -18,7 +18,7 @@ # exceeds LOG_CHECKPOINT_FREE_PER_THREAD size during checkpoint. CREATE DATABASE very_long_database_name; USE very_long_database_name; -set debug_dbug = '+d,crash_after_checkpoint'; +SET debug_dbug = '+d,crash_after_checkpoint'; set global innodb_log_checkpoint_now = 1; ERROR HY000: Lost connection to MySQL server during query # Skip MLOG_FILE_NAME redo records during recovery diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/row_size_error_log_warnings_3.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,45 @@ +call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page."); +SET innodb_strict_mode = 0; +SET @@global.log_warnings = 3; +CREATE TABLE t1 ( +col_1 TEXT +,col_2 TEXT +,col_3 TEXT +,col_4 TEXT +,col_5 TEXT +,col_6 TEXT +,col_7 TEXT +,col_8 TEXT +,col_9 TEXT +,col_10 TEXT +,col_11 TEXT +) ENGINE=INNODB ROW_FORMAT=COMPACT; +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +TRUNCATE TABLE t1; +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +ALTER TABLE t1 FORCE; +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +SET innodb_strict_mode = ON; +TRUNCATE TABLE t1; +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize note Table does not support optimize, doing recreate + analyze instead +test.t1 optimize status OK +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +ALTER TABLE t1 FORCE; +Warnings: +Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline. +DROP TABLE t1; +SET @@global.log_warnings = 2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/stat_tables.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/stat_tables.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/stat_tables.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/stat_tables.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,15 @@ +rename table mysql.table_stats to mysql.table_stats_save; +flush tables; +set use_stat_tables= PREFERABLY; +create table t1 (a int) engine=InnoDB; +start transaction; +insert t1 values (1); +insert t1 values (2); +commit; +select * from t1; +a +1 +2 +drop table t1; +rename table mysql.table_stats_save to mysql.table_stats; +flush tables; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/temporary_table_optimization.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/temporary_table_optimization.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/temporary_table_optimization.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/temporary_table_optimization.result 2020-01-26 18:37:28.000000000 +0000 @@ -112,7 +112,7 @@ drop table t1; drop procedure populate_t1; create temporary table t1 (t1_i int, t1_f float) engine = innodb; -insert into t1 values (1, 1.1), (2, 2.2), (3, 2.2), (4, 4.4); +insert into t1 values (1, 1.1), (2, 2.5), (3, 2.5), (4, 4.4); explain select * from t1 where t1_i = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where @@ -124,22 +124,22 @@ t1_i t1_f 1 1.1 alter table t1 add unique index sec_index(t1_f); -ERROR 23000: Duplicate entry '2.2' for key 'sec_index' +ERROR 23000: Duplicate entry '2.5' for key 'sec_index' alter table t1 add index sec_index(t1_f); -explain select * from t1 where t1_f > 2.2; +explain select * from t1 where t1_f >= 2.5; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL sec_index NULL NULL NULL 4 Using where -select * from t1 where t1_f > 2.2; +select * from t1 where t1_f >= 2.5; t1_i t1_f -2 2.2 -3 2.2 +2 2.5 +3 2.5 4 4.4 alter table t1 add column (t1_c char(10)); select * from t1; t1_i t1_f t1_c 1 1.1 NULL -2 2.2 NULL -3 2.2 NULL +2 2.5 NULL +3 2.5 NULL 4 4.4 NULL insert into t1 values (5, 5.5, 'krunal'); alter table t1 drop column t1_f; @@ -150,7 +150,7 @@ `t1_c` char(10) DEFAULT NULL, UNIQUE KEY `pri_index` (`t1_i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -select * from t1 where t1_f > 2.2; +select * from t1 where t1_f >= 2.5; ERROR 42S22: Unknown column 't1_f' in 'where clause' alter table t1 add index sec_index2(t1_c), algorithm=inplace; ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/undo_log.result mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/undo_log.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/r/undo_log.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/r/undo_log.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -call mtr.add_suppression("Cannot add field `b_str_20` in table `test`.`test_tab` because after adding it, the row size is"); SET innodb_strict_mode=OFF; CREATE TABLE test_tab ( a_str_18 mediumtext, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/alter_algorithm.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/alter_algorithm.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/alter_algorithm.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/alter_algorithm.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,10 +31,6 @@ --error $error_code ALTER TABLE t1 MODIFY f2 INT; ---echo # Make existing column NON-NULLABLE ---error $error_code -ALTER TABLE t1 MODIFY f3 INT NOT NULL; - --echo # Drop Stored Column --error $error_code ALTER TABLE t1 DROP COLUMN f5; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/blob-update-debug.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/blob-update-debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/blob-update-debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/blob-update-debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -11,7 +11,9 @@ create table t1 (f1 int primary key, f2 blob) engine = innodb; insert into t1 values (1, repeat('*', 50000)); select f1, substring(f2, 1, 40) from t1; -set debug_dbug = 'd,row_ins_index_entry_timeout'; +set @saved_debug = @@session.debug_dbug; +SET debug_dbug = 'd,row_ins_index_entry_timeout'; update t1 set f1 = 3; select f1, substring(f2, 1, 40) from t1; drop table t1; +SET debug_dbug= @saved_debug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/ibuf_not_empty.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/ibuf_not_empty.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/ibuf_not_empty.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/ibuf_not_empty.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ # The test is not big enough to use change buffering with larger page size. --source include/have_innodb_max_16k.inc +SET GLOBAL innodb_purge_rseg_truncate_frequency=1; --disable_query_log call mtr.add_suppression("InnoDB: Failed to find tablespace for table `test`\\.`t1` in the cache\\. Attempting to load the tablespace with space id"); call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for test.t1, old maximum was"); @@ -29,6 +30,7 @@ # Create enough rows for the table, so that the change buffer will be # used for modifying the secondary index page. There must be multiple # index pages, because changes to the root page are never buffered. +BEGIN; INSERT INTO t1 VALUES(0,'x',1); INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1; @@ -42,14 +44,70 @@ INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1; INSERT INTO t1 SELECT 0,b,c FROM t1; +COMMIT; +let MYSQLD_DATADIR=`select @@datadir`; +let PAGE_SIZE=`select @@innodb_page_size`; + +# Ensure that purge will not access the truncated .ibd file +--source include/wait_all_purged.inc + +--source include/shutdown_mysqld.inc + +# Corrupt the change buffer bitmap, to claim that pages are clean +perl; +do "$ENV{MTR_SUITE_DIR}/include/crc32.pl"; +my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd"; +open(FILE, "+<$file") || die "Unable to open $file"; +binmode FILE; +my $ps= $ENV{PAGE_SIZE}; +my $page; +sysseek(FILE, $ps, 0) || die "Unable to seek $file\n"; +die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps; +# Clean the change buffer bitmap. +substr($page,38,$ps - 38 - 8) = chr(0) x ($ps - 38 - 8); +my $polynomial = 0x82f63b78; # CRC-32C +my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^ + mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial)); +substr($page,0,4)=$ck; +substr($page,$ps-8,4)=$ck; +sysseek(FILE, $ps, 0) || die "Unable to rewind $file\n"; +syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n"; +close(FILE) || die "Unable to close $file"; +EOF ---let $restart_parameters= --innodb-force-recovery=6 ---source include/restart_mysqld.inc +--let $restart_parameters= --innodb-force-recovery=6 --innodb-change-buffer-dump +--source include/start_mysqld.inc --replace_regex /contains \d+ entries/contains #### entries/ check table t1; +--source include/shutdown_mysqld.inc + +# Truncate the file to 5 pages, as if it were empty +perl; +do "$ENV{MTR_SUITE_DIR}/include/crc32.pl"; +my $file = "$ENV{MYSQLD_DATADIR}/test/t1.ibd"; +open(FILE, "+<$file") || die "Unable to open $file"; +binmode FILE; +my $ps= $ENV{PAGE_SIZE}; +my $pages=5; +my $page; +die "Unable to read $file" unless sysread(FILE, $page, $ps) == $ps; +substr($page,46,4)=pack("N", $pages); +my $polynomial = 0x82f63b78; # CRC-32C +my $ck= pack("N",mycrc32(substr($page, 4, 22), 0, $polynomial) ^ + mycrc32(substr($page, 38, $ps - 38 - 8), 0, $polynomial)); +substr($page,0,4)=$ck; +substr($page,$ps-8,4)=$ck; +sysseek(FILE, 0, 0) || die "Unable to rewind $file\n"; +syswrite(FILE, $page, $ps)==$ps || die "Unable to write $file\n"; +truncate(FILE, $ps * $pages); +close(FILE) || die "Unable to close $file"; +EOF + --let $restart_parameters= +--source include/start_mysqld.inc +SET GLOBAL innodb_fast_shutdown=0; --source include/restart_mysqld.inc # Cleanup diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/information_schema_grants.opt mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/information_schema_grants.opt --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/information_schema_grants.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/information_schema_grants.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,33 @@ +--enable-plugin-innodb-trx +--enable-plugin-innodb-locks +--enable-plugin-innodb-lock-waits +--enable-plugin-innodb-cmp +--enable-plugin-innodb-cmp-reset +--enable-plugin-innodb-cmpmem +--enable-plugin-innodb-cmpmem-reset +--enable-plugin-innodb-cmp-per-index +--enable-plugin-innodb-cmp-per-index-reset +--enable-plugin-innodb-buffer-page +--enable-plugin-innodb-buffer-page-lru +--enable-plugin-innodb-buffer-pool-stats +--enable-plugin-innodb-metrics +--enable-plugin-innodb-ft-default-stopword +--enable-plugin-innodb-ft-deleted +--enable-plugin-innodb-ft-being-deleted +--enable-plugin-innodb-ft-config +--enable-plugin-innodb-ft-index-cache +--enable-plugin-innodb-ft-index-table +--enable-plugin-innodb-sys-tables +--enable-plugin-innodb-sys-tablestats +--enable-plugin-innodb-sys-indexes +--enable-plugin-innodb-sys-columns +--enable-plugin-innodb-sys-fields +--enable-plugin-innodb-sys-foreign +--enable-plugin-innodb-sys-foreign-cols +--enable-plugin-innodb-sys-tablespaces +--enable-plugin-innodb-sys-datafiles +--enable-plugin-innodb-sys-virtual +--enable-plugin-innodb-mutexes +--enable-plugin-innodb-sys-semaphore-waits +--enable-plugin-innodb-tablespaces-encryption +--enable-plugin-innodb-tablespaces-scrubbing diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/information_schema_grants.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/information_schema_grants.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/information_schema_grants.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/information_schema_grants.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,311 @@ +source include/have_innodb.inc; +source include/not_embedded.inc; + +# make sure we've enabled everything: +select plugin_name,plugin_status as 'Must be ACTIVE' from information_schema.plugins where plugin_name like 'inno%' and plugin_status!='ACTIVE'; + +create user select_only@localhost; +grant select on *.* to select_only@localhost; + +connect select_only,localhost,select_only; +connection default; + +create sql security invoker view i_buffer_page as select * from information_schema.innodb_buffer_page; +create sql security definer view d_buffer_page as select * from information_schema.innodb_buffer_page; + +create sql security invoker view i_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru; +create sql security definer view d_buffer_page_lru as select * from information_schema.innodb_buffer_page_lru; + +create sql security invoker view i_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats; +create sql security definer view d_buffer_pool_stats as select * from information_schema.innodb_buffer_pool_stats; + +create sql security invoker view i_cmp as select * from information_schema.innodb_cmp; +create sql security definer view d_cmp as select * from information_schema.innodb_cmp; + +create sql security invoker view i_cmp_per_index as select * from information_schema.innodb_cmp_per_index; +create sql security definer view d_cmp_per_index as select * from information_schema.innodb_cmp_per_index; + +create sql security invoker view i_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset; +create sql security definer view d_cmp_per_index_reset as select * from information_schema.innodb_cmp_per_index_reset; + +create sql security invoker view i_cmp_reset as select * from information_schema.innodb_cmp_reset; +create sql security definer view d_cmp_reset as select * from information_schema.innodb_cmp_reset; + +create sql security invoker view i_cmpmem as select * from information_schema.innodb_cmpmem; +create sql security definer view d_cmpmem as select * from information_schema.innodb_cmpmem; + +create sql security invoker view i_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset; +create sql security definer view d_cmpmem_reset as select * from information_schema.innodb_cmpmem_reset; + +create sql security invoker view i_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted; +create sql security definer view d_ft_being_deleted as select * from information_schema.innodb_ft_being_deleted; + +create sql security invoker view i_ft_config as select * from information_schema.innodb_ft_config; +create sql security definer view d_ft_config as select * from information_schema.innodb_ft_config; + +create sql security invoker view i_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword; +create sql security definer view d_ft_default_stopword as select * from information_schema.innodb_ft_default_stopword; + +create sql security invoker view i_ft_deleted as select * from information_schema.innodb_ft_deleted; +create sql security definer view d_ft_deleted as select * from information_schema.innodb_ft_deleted; + +create sql security invoker view i_ft_index_cache as select * from information_schema.innodb_ft_index_cache; +create sql security definer view d_ft_index_cache as select * from information_schema.innodb_ft_index_cache; + +create sql security invoker view i_ft_index_table as select * from information_schema.innodb_ft_index_table; +create sql security definer view d_ft_index_table as select * from information_schema.innodb_ft_index_table; + +create sql security invoker view i_lock_waits as select * from information_schema.innodb_lock_waits; +create sql security definer view d_lock_waits as select * from information_schema.innodb_lock_waits; + +create sql security invoker view i_locks as select * from information_schema.innodb_locks; +create sql security definer view d_locks as select * from information_schema.innodb_locks; + +create sql security invoker view i_metrics as select * from information_schema.innodb_metrics; +create sql security definer view d_metrics as select * from information_schema.innodb_metrics; + +create sql security invoker view i_mutexes as select * from information_schema.innodb_mutexes; +create sql security definer view d_mutexes as select * from information_schema.innodb_mutexes; + +create sql security invoker view i_sys_columns as select * from information_schema.innodb_sys_columns; +create sql security definer view d_sys_columns as select * from information_schema.innodb_sys_columns; + +create sql security invoker view i_sys_datafiles as select * from information_schema.innodb_sys_datafiles; +create sql security definer view d_sys_datafiles as select * from information_schema.innodb_sys_datafiles; + +create sql security invoker view i_sys_fields as select * from information_schema.innodb_sys_fields; +create sql security definer view d_sys_fields as select * from information_schema.innodb_sys_fields; + +create sql security invoker view i_sys_foreign as select * from information_schema.innodb_sys_foreign; +create sql security definer view d_sys_foreign as select * from information_schema.innodb_sys_foreign; + +create sql security invoker view i_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols; +create sql security definer view d_sys_foreign_cols as select * from information_schema.innodb_sys_foreign_cols; + +create sql security invoker view i_sys_indexes as select * from information_schema.innodb_sys_indexes; +create sql security definer view d_sys_indexes as select * from information_schema.innodb_sys_indexes; + +create sql security invoker view i_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; +create sql security definer view d_sys_semaphore_waits as select * from information_schema.innodb_sys_semaphore_waits; + +create sql security invoker view i_sys_tables as select * from information_schema.innodb_sys_tables; +create sql security definer view d_sys_tables as select * from information_schema.innodb_sys_tables; + +create sql security invoker view i_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces; +create sql security definer view d_sys_tablespaces as select * from information_schema.innodb_sys_tablespaces; + +create sql security invoker view i_sys_tablestats as select * from information_schema.innodb_sys_tablestats; +create sql security definer view d_sys_tablestats as select * from information_schema.innodb_sys_tablestats; + +create sql security invoker view i_sys_virtual as select * from information_schema.innodb_sys_virtual; +create sql security definer view d_sys_virtual as select * from information_schema.innodb_sys_virtual; + +create sql security invoker view i_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption; +create sql security definer view d_tablespaces_encryption as select * from information_schema.innodb_tablespaces_encryption; + +create sql security invoker view i_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing; +create sql security definer view d_tablespaces_scrubbing as select * from information_schema.innodb_tablespaces_scrubbing; + +create sql security invoker view i_trx as select * from information_schema.innodb_trx; +create sql security definer view d_trx as select * from information_schema.innodb_trx; + +connection select_only; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_buffer_page; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_buffer_page; +select count(*) > -1 from d_buffer_page; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_buffer_page_lru; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_buffer_page_lru; +select count(*) > -1 from d_buffer_page_lru; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_buffer_pool_stats; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_buffer_pool_stats; +select count(*) > -1 from d_buffer_pool_stats; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_cmp; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_cmp; +select count(*) > -1 from d_cmp; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_cmp_per_index; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_cmp_per_index; +select count(*) > -1 from d_cmp_per_index; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_cmp_per_index_reset; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_cmp_per_index_reset; +select count(*) > -1 from d_cmp_per_index_reset; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_cmp_reset; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_cmp_reset; +select count(*) > -1 from d_cmp_reset; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_cmpmem; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_cmpmem; +select count(*) > -1 from d_cmpmem; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_cmpmem_reset; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_cmpmem_reset; +select count(*) > -1 from d_cmpmem_reset; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_ft_being_deleted; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_ft_being_deleted; +select count(*) > -1 from d_ft_being_deleted; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_ft_config; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_ft_config; +select count(*) > -1 from d_ft_config; + +# non-privileged table +select count(*) > -1 from information_schema.innodb_ft_default_stopword; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_ft_deleted; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_ft_deleted; +select count(*) > -1 from d_ft_deleted; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_ft_index_cache; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_ft_index_cache; +select count(*) > -1 from d_ft_index_cache; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_ft_index_table; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_ft_index_table; +select count(*) > -1 from d_ft_index_table; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_lock_waits; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_lock_waits; +select count(*) > -1 from d_lock_waits; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_locks; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_locks; +select count(*) > -1 from d_locks; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_metrics; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_metrics; +select count(*) > -1 from d_metrics; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_mutexes; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_mutexes; +select count(*) > -1 from d_mutexes; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_columns; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_columns; +select count(*) > -1 from d_sys_columns; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_datafiles; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_datafiles; +select count(*) > -1 from d_sys_datafiles; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_fields; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_fields; +select count(*) > -1 from d_sys_fields; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_foreign; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_foreign; +select count(*) > -1 from d_sys_foreign; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_foreign_cols; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_foreign_cols; +select count(*) > -1 from d_sys_foreign_cols; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_indexes; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_indexes; +select count(*) > -1 from d_sys_indexes; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_semaphore_waits; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_semaphore_waits; +select count(*) > -1 from d_sys_semaphore_waits; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_tables; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_tables; +select count(*) > -1 from d_sys_tables; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_tablespaces; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_tablespaces; +select count(*) > -1 from d_sys_tablespaces; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_tablestats; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_tablestats; +select count(*) > -1 from d_sys_tablestats; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_sys_virtual; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_sys_virtual; +select count(*) > -1 from d_sys_virtual; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_tablespaces_encryption; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_tablespaces_encryption; +select count(*) > -1 from d_tablespaces_encryption; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_tablespaces_scrubbing; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_tablespaces_scrubbing; +select count(*) > -1 from d_tablespaces_scrubbing; + +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from information_schema.innodb_trx; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +select count(*) > -1 from i_trx; +select count(*) > -1 from d_trx; + +connection default; +drop database test; +create database test; +drop user select_only@localhost; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-32k-crash.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-32k-crash.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-32k-crash.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-32k-crash.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,8 +5,6 @@ let $MYSQLD_DATADIR= `select @@datadir`; -call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is"); - CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-64k-crash.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-64k-crash.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-64k-crash.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-64k-crash.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,8 +5,6 @@ let $MYSQLD_DATADIR= `select @@datadir`; -call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is"); - CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob, h blob,i blob,j blob,k blob,l blob,m blob,n blob, o blob,p blob,q blob,r blob,s blob,t blob,u blob, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-alter-nullable.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-alter-nullable.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-alter-nullable.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-alter-nullable.test 2020-01-26 18:37:28.000000000 +0000 @@ -104,7 +104,6 @@ ALTER TABLE t3 MODIFY c INT NOT NULL; --disable_info SET sql_mode = @old_sql_mode; ---echo # MDEV-18819 FIXME: Wrong result g=NULL SELECT * FROM t1; SELECT * FROM t2; SELECT * FROM t3; @@ -123,7 +122,6 @@ ALTER IGNORE TABLE t2 MODIFY c INT NOT NULL; ALTER IGNORE TABLE t3 MODIFY c INT NOT NULL; --disable_info ---echo # MDEV-18819 FIXME: Wrong result g=NULL SELECT * FROM t1; SELECT * FROM t2; SELECT * FROM t3; @@ -151,7 +149,6 @@ --enable_info ALTER TABLE t1 MODIFY c INT NOT NULL; ALTER TABLE t2 MODIFY c INT NOT NULL; ---echo # MDEV-18819 FIXME: This should not require ALGORITHM=COPY. ALTER TABLE t3 MODIFY c INT NOT NULL; --disable_info SELECT * FROM t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-autoinc.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-autoinc.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-autoinc.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-autoinc.test 2020-01-26 18:37:28.000000000 +0000 @@ -349,7 +349,7 @@ SELECT * FROM t1; SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976; SHOW VARIABLES LIKE "auto_inc%"; ---error 1467 +--error HA_ERR_AUTOINC_ERANGE INSERT INTO t1 VALUES (NULL),(NULL); SELECT * FROM t1; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt 2020-01-26 18:37:28.000000000 +0000 @@ -1,2 +1 @@ ---log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err --innodb_buffer_pool_size=24M diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test 2020-01-26 18:37:28.000000000 +0000 @@ -11,6 +11,12 @@ --source include/not_valgrind.inc # This test is slow on buildbot. --source include/big_test.inc +--source include/have_sequence.inc + +call mtr.add_suppression("InnoDB: innodb_read_only prevents crash recovery"); +call mtr.add_suppression("Plugin initialization aborted at srv0start\\.cc"); +call mtr.add_suppression("Plugin 'InnoDB'"); +FLUSH TABLES; CREATE TABLE t1( a INT AUTO_INCREMENT PRIMARY KEY, @@ -27,25 +33,12 @@ # change buffering is possible, so that the change buffer will be used # whenever possible. SET GLOBAL innodb_change_buffering_debug = 1; -let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err; +let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; # Create enough rows for the table, so that the change buffer will be # used for modifying the secondary index page. There must be multiple # index pages, because changes to the root page are never buffered. -INSERT INTO t1 VALUES(0,'x',1); -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; -INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,'x',1 FROM seq_1_to_8192; BEGIN; SELECT b FROM t1 LIMIT 3; @@ -63,10 +56,26 @@ SELECT b FROM t1 LIMIT 3; disconnect con1; connection default; - let SEARCH_PATTERN=Wrote log record for ibuf update in place operation; --source include/search_pattern_in_file.inc + +--let $restart_parameters= --innodb-read-only --source include/start_mysqld.inc +CHECK TABLE t1; +--source include/shutdown_mysqld.inc +let SEARCH_PATTERN=innodb_read_only prevents crash recovery; +--source include/search_pattern_in_file.inc +--let $restart_parameters= --innodb-force-recovery=5 +--source include/start_mysqld.inc +SELECT * FROM t1 LIMIT 1; +replace_regex /.*operations:.* (insert.*), delete \d.*discarded .*/\1/; +SHOW ENGINE INNODB STATUS; +# Slow shutdown will not merge the changes due to innodb_force_recovery=5. +SET GLOBAL innodb_fast_shutdown=0; +--let $restart_parameters= +--source include/restart_mysqld.inc CHECK TABLE t1; +replace_regex /.*operations:.* (insert.*), delete \d.*discarded .*/\1/; +SHOW ENGINE INNODB STATUS; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-mdev-7513.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-mdev-7513.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-mdev-7513.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-mdev-7513.test 2020-01-26 18:37:28.000000000 +0000 @@ -3,7 +3,6 @@ # MDEV-7513: ib_warn_row_too_big dereferences null thd -call mtr.add_suppression("InnoDB: Cannot add field .* in table"); --disable_warnings CREATE TABLE t1 ( text1 TEXT, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-replace-debug.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-replace-debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-replace-debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-replace-debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -9,8 +9,8 @@ key k2(f3)) engine=innodb; insert into t1 values (14, 24, 34); set @old_dbug= @@session.debug_dbug; -set debug_dbug = '+d,row_ins_sec_index_entry_timeout'; +SET debug_dbug = '+d,row_ins_sec_index_entry_timeout'; replace into t1 values (14, 25, 34); select * from t1; drop table t1; -set debug_dbug = @old_dbug; +SET debug_dbug = @old_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ call mtr.add_suppression("InnoDB: Warning: Index.*"); # This caused crash earlier +SET @saved_dbug = @@SESSION.debug_dbug; set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized'; create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb; @@ -32,8 +33,8 @@ select count(1) from t1 where b between 5 and 256; select count(1) from t1 where c between 7 and 787; -set DEBUG_DBUG=NULL; + drop procedure innodb_insert_proc; drop table t1; - +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb-virtual-columns-debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -15,8 +15,8 @@ DELETE FROM t1; --connection default SET debug_sync= "now WAIT_FOR delete_open"; -SET debug_sync= "ib_open_after_dict_open SIGNAL another_open"; SELECT a FROM t1; +SET debug_sync= "now SIGNAL another_open"; --connection con1 --reap diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug11754376.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug11754376.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug11754376.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug11754376.test 2020-01-26 18:37:28.000000000 +0000 @@ -8,7 +8,8 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; # This will invoke test_normalize_table_name_low() in debug builds - +SET @saved_dbug = @@SESSION.debug_dbug; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; DROP TABLE bug11754376; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug30113362.opt mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug30113362.opt --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug30113362.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug30113362.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--innodb-sys-tablestats diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug30113362.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug30113362.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug30113362.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug30113362.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,242 @@ +# +# Test for Bug#30113362 : BTR_CUR_WILL_MODIFY_TREE() IS INSUFFICIENT FOR HIGHER TREE LEVEL +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/have_innodb_16k.inc + +--disable_query_log +SET @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug; +SET @old_innodb_adaptive_hash_index = @@innodb_adaptive_hash_index; +SET @old_innodb_stats_persistent = @@innodb_stats_persistent; +--enable_query_log + +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + +SET GLOBAL innodb_adaptive_hash_index = false; +SET GLOBAL innodb_stats_persistent = false; + +connect (purge_control,localhost,root,,); +START TRANSACTION WITH CONSISTENT SNAPSHOT; + +--connect (con2,localhost,root,,) + +CREATE TABLE t1 ( + a00 CHAR(255) NOT NULL DEFAULT 'a', + a01 CHAR(255) NOT NULL DEFAULT 'a', + a02 CHAR(255) NOT NULL DEFAULT 'a', + b INT NOT NULL DEFAULT 0, + PRIMARY KEY(a00, a01, a02) +) charset latin1 ENGINE = InnoDB COMMENT='MERGE_THRESHOLD=45'; + +# +# Prepare primary key index tree to be used for this test. +# + +SET GLOBAL innodb_limit_optimistic_insert_debug = 3; + +delimiter |; +CREATE PROCEDURE data_load_t1() +BEGIN + DECLARE c1 INT DEFAULT 97; + DECLARE c2 INT DEFAULT 97; + DECLARE c3 INT DEFAULT 97; + + WHILE c1 < 102 DO + WHILE c2 < 123 DO + WHILE c3 < 123 DO + INSERT INTO t1 (a00) VALUES (CHAR(c1,c2,c3)); + SET c3 = c3 + 1; + END WHILE; + SET c3 = 97; + SET c2 = c2 + 1; + END WHILE; + SET c2 = 97; + SET c1 = c1 + 1; + END WHILE; +END | +delimiter ;| +call data_load_t1(); +DROP PROCEDURE data_load_t1; + +# all node pages are sparse (max 3 node_ptrs) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +connection con2; +DELETE FROM t1 WHERE a00 = 'cnm'; +COMMIT; +BEGIN; +INSERT INTO t1 SET a00 = 'cnm'; +# causes "domino falling" merges to upper level +connection purge_control; +COMMIT; +connection con2; +SET GLOBAL innodb_limit_optimistic_insert_debug = 0; +ROLLBACK; + +# at this moment, in the tree, +# ... +# level 4: ...(ast,avw,ayz)(bcc,bff,bii,bll,boo,brr,buu,bxx,cba,ced,cqp,cts)(cwv,czy,ddb)... +# ... + +--echo # Test start + +# (1) Similar case to the first reported corefile at bug#30113362 +# - Deleting 'bii' causes "domino falling" merges and the node_ptr becomes left_most of level 4. +# So, the operation needs upper level pages' X-latch, though doesn't cause merge more. + +connection purge_control; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection con2; +DELETE FROM t1 WHERE a00 = 'bii'; +COMMIT; +BEGIN; +INSERT INTO t1 SET a00 = 'bii'; +SET DEBUG_SYNC = 'rollback_undo_pk SIGNAL roll1_wait WAIT_FOR roll2'; +SET DEBUG_SYNC = 'rollback_purge_clust SIGNAL rollback_waiting WAIT_FOR resume'; +send ROLLBACK; + +connection purge_control; +SET DEBUG_SYNC = 'now WAIT_FOR roll1_wait'; +COMMIT; +SET DEBUG_SYNC = 'now SIGNAL roll2'; + +connect (con1,localhost,root,,); +# FIXME: This occasionally times out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +--enable_warnings +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +send SELECT a00 FROM t1 WHERE a00 = 'bii'; + +connection default; +# FIXME: This occasionally times out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +--enable_warnings +# bug#30113362 caused deadlock +SET DEBUG_SYNC = 'now SIGNAL resume'; + +connection con1; +reap; +connection con2; +reap; +connection default; + +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +# (2) Confirm blocking domain caused by DELETE modify_tree for tall index tree + +# at this moment, in the tree, +# ... +# level 4: ...(ajk,amn,apq)(ast,avw,ayz,bll,boo,brr,buu,bxx,cba,ced,cqp,cts)(cwv,czy,ddb)(dge,djh,dmk)(dpn,dsq,dvt)(dyw,ebz,efc)... +# ... + +# makes >17 records in level4 [(2^(4-1))*2 + 1]. (causes never left_most records) +DELETE FROM t1 WHERE a00 = 'dpn'; +COMMIT; +INSERT INTO t1 SET a00 = 'dpn'; +ROLLBACK; + +# at this moment, in the tree, +# (* before "]" and after "[" records are treated as left_most possible records) +# ... +# level 4: ...(ajk,amn,apq)(ast,avw,ayz,bll,boo,brr,buu,bxx],cba,ced,[cqp,cts,cwv,czy,ddb,dge,dsq,dvt)(dyw,ebz,efc)... +# level 3: ...(cba,ccb,cdc)(ced,cfe,cgf,chg],cih,cji,[ckj,clk,con,cpo)(cqp,crq,csr)... +# level 2: ...(ckj,cks,clb)(clk,clt],cmc,cml,cmu,cnd,[cnv,coe)(con,cow,cpf)... +# level 1: ...(cmu,cmx,cna)(cnd],cng,cnj,cnp,[cns)(cnv,cny,cob)... +# level 0: ...(cnd,cne,cnf)(cng,cnh,cni)(cnj,cnk,cnl,cnn,cno)(cnp,cnq,cnr)... + +# deletes just 'ced' node_ptr only from level 4. doesn't cause merge and never left_most. +# adjusts MERGE_THRESHOLD to do so. +ALTER TABLE t1 COMMENT='MERGE_THRESHOLD=35'; + +connection purge_control; +START TRANSACTION WITH CONSISTENT SNAPSHOT; + +connection con2; +DELETE FROM t1 WHERE a00 = 'cnd'; +COMMIT; +BEGIN; +INSERT INTO t1 SET a00 = 'cnd'; +SET DEBUG_SYNC = 'rollback_undo_pk SIGNAL roll1_wait WAIT_FOR roll2'; +SET DEBUG_SYNC = 'rollback_purge_clust SIGNAL rollback_waiting WAIT_FOR resume EXECUTE 2'; +send ROLLBACK; + +connection purge_control; +SET DEBUG_SYNC = 'now WAIT_FOR roll1_wait'; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +SET DEBUG_SYNC = 'now SIGNAL roll2'; + +connection con1; +# FIXME: For some reason, we will not always receive these signals! +--disable_warnings +# An optimistic row_undo_mod_remove_clust_low() will fail. +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +SET DEBUG_SYNC = 'now SIGNAL resume'; +# Wait for the pessimistic row_undo_mod_remove_clust_low() attempt. +SET DEBUG_SYNC = 'now WAIT_FOR rollback_waiting TIMEOUT 1'; +--enable_warnings +disconnect purge_control; + +# The expectation should be... +# level 0: (#cnd#,cne,cnf): causes merge +# level 1: (#cnd#],cng,cnj,cnp,[cns): left_most +# level 2: (clk,clt],cmc,cml,cmu,#cnd#,[cnv,coe): causes merge +# level 3: (ced,cfe,cgf,chg],cih,cji,[ckj,#clk#,con,cpo): left_most possible (not cause merge) +# level 4: (ast,avw,ayz,bll,boo,brr,buu,bxx],cba,#ced#,[cqp,cts,cwv,czy,ddb,dge,dsq,dvt): no merge, not left_most possible +# So, the top X-latch page is at level4. (ast~dvt) + +# blocking domain based on whether its ancestor is latched or not. +# (*[]: ancestor is X-latched) +# level 0: ...(asq,asr,ass) [(ast,asu,asv)...(dyt,dyu,dyv)] (dyw,dyx,dyy)... + +# Not blocked searches +## In MariaDB, both these will block, because we use different DEBUG_SYNC +## instrumentation (in rollback, not purge) and the root page (number 3) +## is being latched in row_undo_mod_remove_clust_low(). +## SELECT a00 FROM t1 WHERE a00 = 'ass'; +## SELECT a00 FROM t1 WHERE a00 = 'dyx'; + +## SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +## send SELECT a00 FROM t1 WHERE a00 = 'ast'; + +## connection con2; +## SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +## send SELECT a00 FROM t1 WHERE a00 = 'dyw'; + +connection default; +## SET DEBUG_SYNC = 'now WAIT_FOR lockwait1'; +## SET DEBUG_SYNC = 'now WAIT_FOR lockwait2'; +SET DEBUG_SYNC = 'now SIGNAL resume'; + +## connection con1; +## reap; +disconnect con1; + +connection con2; +reap; +disconnect con2; + +connection default; +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + +# Cleanup +SET DEBUG_SYNC = 'RESET'; + +DROP TABLE t1; + +--disable_query_log +SET GLOBAL innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug; +SET GLOBAL innodb_adaptive_hash_index = @old_innodb_adaptive_hash_index; +SET GLOBAL innodb_stats_persistent = @old_innodb_stats_persistent; +--enable_query_log + +--source include/wait_until_count_sessions.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug56947.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug56947.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_bug56947.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_bug56947.test 2020-01-26 18:37:28.000000000 +0000 @@ -7,6 +7,7 @@ SET GLOBAL innodb_file_per_table=0; create table bug56947(a int not null) engine = innodb; +SET @saved_dbug = @@SESSION.debug_dbug; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; --replace_regex /"[^"]*"/"xxx"/ --error ER_GET_ERRNO @@ -15,3 +16,4 @@ drop table bug56947; SET @@global.innodb_file_per_table=DEFAULT; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_corrupt_bit.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_corrupt_bit.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_corrupt_bit.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_corrupt_bit.test 2020-01-26 18:37:28.000000000 +0000 @@ -36,7 +36,7 @@ SET @save_dbug = @@SESSION.debug_dbug; SET debug_dbug = '+d,dict_set_index_corrupted'; check table corrupt_bit_test_Ä; -SET debug_dbug = @save_dbug; +SET @@SESSION.debug_dbug = @save_dbug; # Cannot create new indexes while corrupted indexes exist --error ER_INDEX_CORRUPT diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_force_recovery.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_force_recovery.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_force_recovery.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_force_recovery.test 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ --echo # Restart the server with innodb_force_recovery as 4. --let $restart_parameters= --innodb-force-recovery=4 --source include/restart_mysqld.inc +let $status=`SHOW ENGINE INNODB STATUS`; select * from t1; @@ -59,6 +60,7 @@ --echo # Restart the server with innodb_force_recovery as 5. --let $restart_parameters= --innodb-force-recovery=5 --source include/restart_mysqld.inc +let $status=`SHOW ENGINE INNODB STATUS`; select * from t2; @@ -99,6 +101,7 @@ --echo # Restart the server with innodb_force_recovery as 6. --let $restart_parameters= --innodb-force-recovery=6 --source include/restart_mysqld.inc +let $status=`SHOW ENGINE INNODB STATUS`; select * from t2; @@ -136,6 +139,7 @@ --echo # Restart the server with innodb_force_recovery=2 --let $restart_parameters= --innodb-force-recovery=2 --source include/restart_mysqld.inc +let $status=`SHOW ENGINE INNODB STATUS`; select * from t2; begin; @@ -153,6 +157,7 @@ --echo # Restart the server with innodb_force_recovery=3 --let $restart_parameters= --innodb-force-recovery=3 --source include/start_mysqld.inc +let $status=`SHOW ENGINE INNODB STATUS`; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; select * from t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_max_recordsize_32k.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,8 +1,6 @@ --source include/have_innodb.inc --source include/have_innodb_32k.inc -call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); - # Check page size 32k SELECT @@innodb_page_size; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_max_recordsize_64k.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,8 +1,6 @@ --source include/have_innodb.inc --source include/have_innodb_64k.inc -call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); - # Check page size 64k SELECT @@innodb_page_size; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_stats_persistent.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_stats_persistent.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_stats_persistent.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_stats_persistent.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,8 @@ --source include/have_innodb.inc ---source include/big_test.inc +--source include/have_sequence.inc +SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; +SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; SET @saved_include_delete_marked = @@GLOBAL.innodb_stats_include_delete_marked; SET GLOBAL innodb_stats_include_delete_marked = ON; SET @saved_traditional = @@GLOBAL.innodb_stats_traditional; @@ -8,19 +10,11 @@ SET @saved_modified_counter = @@GLOBAL.innodb_stats_modified_counter; SET GLOBAL innodb_stats_modified_counter=1; -CREATE TABLE t0 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val)) +CREATE TABLE t1 (id SERIAL, val INT UNSIGNED NOT NULL, KEY(val)) ENGINE=INNODB STATS_PERSISTENT=1,STATS_AUTO_RECALC=1; -CREATE TABLE t1 LIKE t0; -CREATE TABLE t2 LIKE t0; +CREATE TABLE t2 LIKE t1; -INSERT INTO t0 (val) VALUES (4); -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t0 (val) SELECT 4 FROM t0; -INSERT INTO t0 (val) SELECT 4 FROM t0; - -INSERT INTO t1 SELECT * FROM t0; -SELECT COUNT(*) FROM t1; +INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; ANALYZE TABLE t1; connect(con1, localhost, root,,); @@ -46,7 +40,7 @@ connection default; BEGIN; -INSERT INTO t2 SELECT * FROM t0; +INSERT INTO t2 (val) SELECT 4 FROM seq_1_to_16; --echo # The INSERT will show up before COMMIT. EXPLAIN SELECT * FROM t2 WHERE val=4; @@ -57,21 +51,18 @@ connection con1; EXPLAIN SELECT * FROM t2 WHERE val=4; -SET @saved_frequency = @@GLOBAL.innodb_purge_rseg_truncate_frequency; -SET GLOBAL innodb_purge_rseg_truncate_frequency = 1; --source include/wait_all_purged.inc -SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; --echo # After COMMIT and purge, the DELETE must show up. EXPLAIN SELECT * FROM t1 WHERE val=4; SET GLOBAL innodb_stats_include_delete_marked = OFF; BEGIN; -INSERT INTO t1 SELECT * FROM t0; +INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; EXPLAIN SELECT * FROM t1 WHERE val=4; ROLLBACK; EXPLAIN SELECT * FROM t1 WHERE val=4; BEGIN; -INSERT INTO t1 SELECT * FROM t0; +INSERT INTO t1 (val) SELECT 4 FROM seq_1_to_16; COMMIT; EXPLAIN SELECT * FROM t1 WHERE val=4; BEGIN; @@ -89,7 +80,8 @@ connection default; -DROP TABLE t0,t1,t2; +DROP TABLE t1,t2; SET GLOBAL innodb_stats_include_delete_marked = @saved_include_delete_marked; SET GLOBAL innodb_stats_traditional = @saved_traditional; SET GLOBAL innodb_stats_modified_counter = @saved_modified_counter; +SET GLOBAL innodb_purge_rseg_truncate_frequency = @saved_frequency; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test 2020-01-26 18:37:28.000000000 +0000 @@ -17,6 +17,7 @@ insert into t1 values(0, 0); # Enable the debug injection. +SET @saved_dbug = @@SESSION.debug_dbug; set DEBUG_DBUG='+d,fatal-semaphore-timeout'; set autocommit=0; @@ -107,7 +108,7 @@ --echo # Cleaning up before exit --disable_warnings -set DEBUG_DBUG=NULL; +SET debug_dbug = @saved_dbug; drop table if exists t1; --enable_warnings diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_wl6326.opt mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326.opt --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_wl6326.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--innodb-sys-tablestats diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_wl6326.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_wl6326.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,506 @@ +# +# WL#6326: InnoDB: fix index->lock contention +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/have_innodb_16k.inc + +--disable_query_log +SET @old_innodb_limit_optimistic_insert_debug = @@innodb_limit_optimistic_insert_debug; +SET @old_innodb_adaptive_hash_index = @@innodb_adaptive_hash_index; +SET @old_innodb_stats_persistent = @@innodb_stats_persistent; +--enable_query_log + +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + +SET GLOBAL innodb_adaptive_hash_index = false; +SET GLOBAL innodb_stats_persistent = false; + +--connect (con1,localhost,root,,) +--connect (con2,localhost,root,,) +--connect (con3,localhost,root,,) + +CREATE TABLE t1 ( + a00 CHAR(255) NOT NULL DEFAULT 'a', + a01 CHAR(255) NOT NULL DEFAULT 'a', + a02 CHAR(255) NOT NULL DEFAULT 'a', + a03 CHAR(255) NOT NULL DEFAULT 'a', + a04 CHAR(255) NOT NULL DEFAULT 'a', + a05 CHAR(255) NOT NULL DEFAULT 'a', + a06 CHAR(255) NOT NULL DEFAULT 'a', + b INT NOT NULL DEFAULT 0 +) ENGINE = InnoDB; + +ALTER TABLE t1 ADD PRIMARY KEY( + a00, + a01, + a02, + a03, + a04, + a05, + a06 +); + +# +# Prepare primary key index tree to be used for this test. +# + +# Only root (1) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +# Make the first records sparse artificially, +# not to cause modify_tree by single node_ptr insert operation. +# * (7 - 2) records should be larger than a half of the page size +# * (7 + 2) records should be fit to the page +# (above t1 definition is already adjusted) +SET GLOBAL innodb_limit_optimistic_insert_debug = 7; + +INSERT INTO t1 (a00) VALUES ('aa'); +INSERT INTO t1 (a00) VALUES ('ab'); +INSERT INTO t1 (a00) VALUES ('ac'); +INSERT INTO t1 (a00) VALUES ('ad'); +INSERT INTO t1 (a00) VALUES ('ae'); +INSERT INTO t1 (a00) VALUES ('af'); +INSERT INTO t1 (a00) VALUES ('ag'); +INSERT INTO t1 (a00) VALUES ('ah'); +# Raise root (1-2) +# (aa,ad) +# (aa,ab,ac)(ad,ae,af,ag,ah) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +INSERT INTO t1 (a00) VALUES ('ai'); +INSERT INTO t1 (a00) VALUES ('aj'); +INSERT INTO t1 (a00) VALUES ('ak'); +# Split leaf (1-3) +# (aa,ad,ak) +# (aa,ab,ac)(ad,ae,af,ag,ah,ai,aj)(ak) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +INSERT INTO t1 (a00) VALUES ('al'); +INSERT INTO t1 (a00) VALUES ('am'); +INSERT INTO t1 (a00) VALUES ('an'); +INSERT INTO t1 (a00) VALUES ('ao'); +INSERT INTO t1 (a00) VALUES ('ap'); +INSERT INTO t1 (a00) VALUES ('aq'); +INSERT INTO t1 (a00) VALUES ('ar'); +# Split leaf (1-4) +# (aa,ad,ak,ar) +# (aa,ab,ac)(ad,ae,af,ag,ah,ai,aj)(ak,al,am,an,ao,ap,aq)(ar) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +INSERT INTO t1 (a00) VALUES ('as'); +INSERT INTO t1 (a00) VALUES ('at'); +INSERT INTO t1 (a00) VALUES ('au'); +INSERT INTO t1 (a00) VALUES ('av'); +INSERT INTO t1 (a00) VALUES ('aw'); +INSERT INTO t1 (a00) VALUES ('ax'); +INSERT INTO t1 (a00) VALUES ('ay'); +# Split leaf (1-5) +# (aa,ad,ak,ar,ay) +# (aa,ab,ac)(ad,ae,af,ag,ah,ai,aj)(ak,al,am,an,ao,ap,aq)(ar,as,at,au,av,aw,ax)(ay) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +INSERT INTO t1 (a00) VALUES ('az'); +INSERT INTO t1 (a00) VALUES ('ba'); +INSERT INTO t1 (a00) VALUES ('bb'); +INSERT INTO t1 (a00) VALUES ('bc'); +INSERT INTO t1 (a00) VALUES ('bd'); +INSERT INTO t1 (a00) VALUES ('be'); +INSERT INTO t1 (a00) VALUES ('bf'); +# Split leaf (1-6) +# (aa,ad,ak,ar,ay,bf) +# (aa,ab,ac)(ad..)(ak..)(ar,as,at,au,av,aw,ax)(ay,az,ba,bb,bc,bd,be)(bf) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + +INSERT INTO t1 (a00) VALUES ('bg'); +INSERT INTO t1 (a00) VALUES ('bh'); +INSERT INTO t1 (a00) VALUES ('bi'); +INSERT INTO t1 (a00) VALUES ('bj'); +INSERT INTO t1 (a00) VALUES ('bk'); +INSERT INTO t1 (a00) VALUES ('bl'); +INSERT INTO t1 (a00) VALUES ('bm'); +# Split leaf (1-7) +# (aa,ad,ak,ar,ay,bf,bm) +# (aa,ab,ac)(ad..)(ak..)(ar..)(ay,az,ba,bb,bc,bd,be)(bf,bg,bh,bi,bj,bk,bl)(bm) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +INSERT INTO t1 (a00) VALUES ('bn'); +INSERT INTO t1 (a00) VALUES ('bo'); +INSERT INTO t1 (a00) VALUES ('bp'); +INSERT INTO t1 (a00) VALUES ('bq'); +INSERT INTO t1 (a00) VALUES ('br'); +INSERT INTO t1 (a00) VALUES ('bs'); +INSERT INTO t1 (a00) VALUES ('bt'); +# Raise root (1-2-8) +# (aa,ar) +# (aa,ad,ak) (ar,ay,bf,bm,bt) +# (aa,ab,ac)(ad..)(ak..)(ar..)(ay..)(bf..)(bm..)(bt) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + +INSERT INTO t1 (a00) VALUES ('bu'); +INSERT INTO t1 (a00) VALUES ('bv'); +INSERT INTO t1 (a00) VALUES ('bw'); +INSERT INTO t1 (a00) VALUES ('bx'); +INSERT INTO t1 (a00) VALUES ('by'); +INSERT INTO t1 (a00) VALUES ('bz'); +INSERT INTO t1 (a00) VALUES ('ca'); + +INSERT INTO t1 (a00) VALUES ('cb'); +INSERT INTO t1 (a00) VALUES ('cc'); +INSERT INTO t1 (a00) VALUES ('cd'); +INSERT INTO t1 (a00) VALUES ('ce'); +INSERT INTO t1 (a00) VALUES ('cf'); +INSERT INTO t1 (a00) VALUES ('cg'); +INSERT INTO t1 (a00) VALUES ('ch'); + +INSERT INTO t1 (a00) VALUES ('ci'); +INSERT INTO t1 (a00) VALUES ('cj'); +INSERT INTO t1 (a00) VALUES ('ck'); +INSERT INTO t1 (a00) VALUES ('cl'); +INSERT INTO t1 (a00) VALUES ('cm'); +INSERT INTO t1 (a00) VALUES ('cn'); +INSERT INTO t1 (a00) VALUES ('co'); +# Split also at level 1 (1-3-11) +# (aa,ar,co) +# (aa,ad,ak) (ar,ay,bf,bm,bt,ca,ch) (co) +# (aa,ab,ac)(ad..)(ak..)(ar..)(ay..)(bf..)(bm..)(bt..)(ca..)(ch..)(co) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + +INSERT INTO t1 (a00) VALUES ('cp'); +INSERT INTO t1 (a00) VALUES ('cq'); +INSERT INTO t1 (a00) VALUES ('cr'); +INSERT INTO t1 (a00) VALUES ('cs'); +INSERT INTO t1 (a00) VALUES ('ct'); +INSERT INTO t1 (a00) VALUES ('cu'); +INSERT INTO t1 (a00) VALUES ('cv'); + +INSERT INTO t1 (a00) VALUES ('cw'); +INSERT INTO t1 (a00) VALUES ('cx'); +INSERT INTO t1 (a00) VALUES ('cy'); +INSERT INTO t1 (a00) VALUES ('cz'); +INSERT INTO t1 (a00) VALUES ('da'); +INSERT INTO t1 (a00) VALUES ('db'); +INSERT INTO t1 (a00) VALUES ('dc'); + +INSERT INTO t1 (a00) VALUES ('dd'); +INSERT INTO t1 (a00) VALUES ('de'); +INSERT INTO t1 (a00) VALUES ('df'); +INSERT INTO t1 (a00) VALUES ('dg'); +INSERT INTO t1 (a00) VALUES ('dh'); +INSERT INTO t1 (a00) VALUES ('di'); +INSERT INTO t1 (a00) VALUES ('dj'); + +INSERT INTO t1 (a00) VALUES ('dk'); +INSERT INTO t1 (a00) VALUES ('dl'); +INSERT INTO t1 (a00) VALUES ('dm'); +INSERT INTO t1 (a00) VALUES ('dn'); +INSERT INTO t1 (a00) VALUES ('do'); +INSERT INTO t1 (a00) VALUES ('dp'); +INSERT INTO t1 (a00) VALUES ('dq'); + +INSERT INTO t1 (a00) VALUES ('dr'); +INSERT INTO t1 (a00) VALUES ('ds'); +INSERT INTO t1 (a00) VALUES ('dt'); +INSERT INTO t1 (a00) VALUES ('du'); +INSERT INTO t1 (a00) VALUES ('dv'); +INSERT INTO t1 (a00) VALUES ('dw'); +INSERT INTO t1 (a00) VALUES ('dx'); + +INSERT INTO t1 (a00) VALUES ('dy'); +INSERT INTO t1 (a00) VALUES ('dz'); +INSERT INTO t1 (a00) VALUES ('ea'); +INSERT INTO t1 (a00) VALUES ('eb'); +INSERT INTO t1 (a00) VALUES ('ec'); +INSERT INTO t1 (a00) VALUES ('ed'); +INSERT INTO t1 (a00) VALUES ('ee'); + +INSERT INTO t1 (a00) VALUES ('ef'); +INSERT INTO t1 (a00) VALUES ('eg'); +INSERT INTO t1 (a00) VALUES ('eh'); +INSERT INTO t1 (a00) VALUES ('ei'); +INSERT INTO t1 (a00) VALUES ('ej'); +INSERT INTO t1 (a00) VALUES ('ek'); +INSERT INTO t1 (a00) VALUES ('el'); +# Split also at level 1 (1-4-18) +# (aa,ar,co,el) +# (aa,ad,ak) (ar,ay,bf,bm,bt,ca,ch) (co,cv,dc,dj,dq,dx,ee) (el) +# (aa,ab,ac)(ad..)(ak..)(ar..)(ay..)(bf..)(bm..)(bt..)(ca..)(ch..)(co..)(cv..)(dc..)(dj..)(dq..)(dx..)(ee..)(el) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + +INSERT INTO t1 (a00) VALUES ('em'); +INSERT INTO t1 (a00) VALUES ('en'); +INSERT INTO t1 (a00) VALUES ('eo'); +INSERT INTO t1 (a00) VALUES ('ep'); +INSERT INTO t1 (a00) VALUES ('eq'); +INSERT INTO t1 (a00) VALUES ('er'); +INSERT INTO t1 (a00) VALUES ('es'); + +INSERT INTO t1 (a00) VALUES ('et'); +INSERT INTO t1 (a00) VALUES ('eu'); +INSERT INTO t1 (a00) VALUES ('ev'); +INSERT INTO t1 (a00) VALUES ('ew'); +INSERT INTO t1 (a00) VALUES ('ex'); +INSERT INTO t1 (a00) VALUES ('ey'); +INSERT INTO t1 (a00) VALUES ('ez'); + +INSERT INTO t1 (a00) VALUES ('fa'); +INSERT INTO t1 (a00) VALUES ('fb'); +INSERT INTO t1 (a00) VALUES ('fc'); +INSERT INTO t1 (a00) VALUES ('fd'); +INSERT INTO t1 (a00) VALUES ('fe'); +INSERT INTO t1 (a00) VALUES ('ff'); +INSERT INTO t1 (a00) VALUES ('fg'); + +INSERT INTO t1 (a00) VALUES ('fh'); +INSERT INTO t1 (a00) VALUES ('fi'); +INSERT INTO t1 (a00) VALUES ('fj'); +INSERT INTO t1 (a00) VALUES ('fk'); +INSERT INTO t1 (a00) VALUES ('fl'); +INSERT INTO t1 (a00) VALUES ('fm'); +INSERT INTO t1 (a00) VALUES ('fn'); + +INSERT INTO t1 (a00) VALUES ('fo'); +INSERT INTO t1 (a00) VALUES ('fp'); +INSERT INTO t1 (a00) VALUES ('fq'); +INSERT INTO t1 (a00) VALUES ('fr'); +INSERT INTO t1 (a00) VALUES ('fs'); +INSERT INTO t1 (a00) VALUES ('ft'); +INSERT INTO t1 (a00) VALUES ('fu'); + +INSERT INTO t1 (a00) VALUES ('fv'); +INSERT INTO t1 (a00) VALUES ('fw'); +INSERT INTO t1 (a00) VALUES ('fx'); +INSERT INTO t1 (a00) VALUES ('fy'); +INSERT INTO t1 (a00) VALUES ('fz'); +INSERT INTO t1 (a00) VALUES ('ga'); +INSERT INTO t1 (a00) VALUES ('gb'); + +INSERT INTO t1 (a00) VALUES ('gc'); +INSERT INTO t1 (a00) VALUES ('gd'); +INSERT INTO t1 (a00) VALUES ('ge'); +INSERT INTO t1 (a00) VALUES ('gf'); +INSERT INTO t1 (a00) VALUES ('gg'); +INSERT INTO t1 (a00) VALUES ('gh'); + + +# Current tree form (1-4-24) +# (aa,ar,co,el) +# (aa,ad,ak) (ar,ay,bf,bm,bt,ca,ch) (co,cv,dc,dj,dq,dx,ee) (el..,gb) +# (aa,ab,ac)(ad..)(ak..)(ar..)(ay..)(bf..)(bm..)(bt..)(ca..)(ch..)(co..)(cv..)(dc..)(dj..)(dq..)(dx..)(ee..)(el..)..(gb..) +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + + +# Insert the rest of records normally +SET GLOBAL innodb_limit_optimistic_insert_debug = 0; + + +--echo # Test start + +# (1) Insert records to leaf page (bf..) and cause modify_page. +# - root page is not X latched +# - latched from level 1 page (ar,ay,bf,bm,bt,ca,ch) + +SET DEBUG_SYNC = 'RESET'; + +# Filling leaf page (bf..) +INSERT INTO t1 (a00) VALUES ('bfa'); + +--connection con1 +SET DEBUG_SYNC = 'before_insert_pessimitic_row_ins_clust SIGNAL reached WAIT_FOR continue'; +# Cause modify_tree +--send +INSERT INTO t1 (a00) VALUES ('bfb'); + +--connection con2 +SET DEBUG_SYNC = 'now WAIT_FOR reached'; +# Not blocked searches +SELECT a00,a01 FROM t1 WHERE a00 = 'aa'; +SELECT a00,a01 FROM t1 WHERE a00 = 'aq'; +# "where a00 = 'co'" is blocked because searching from smaller ('co','a','a',..). +SELECT a00,a01 FROM t1 WHERE a00 = 'cp'; +SELECT a00,a01 FROM t1 WHERE a00 = 'el'; + +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +# Blocked +--send +SELECT a00,a01 FROM t1 WHERE a00 = 'ar'; + +--connection con3 +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +# Blocked +--send +SELECT a00,a01 FROM t1 WHERE a00 = 'cn'; + +--connection default +# FIXME: These occasionally time out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait2 TIMEOUT 1'; +--enable_warnings +SET DEBUG_SYNC = 'now SIGNAL continue'; + +--connection con1 +--reap + +--connection con2 +--reap + +--connection con3 +--reap + +--connection default + +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + + +# (2) Insert records to leaf page (co..) and cause modify_page +# - root page is X latched, because node_ptr for 'co' +# is 1st record for (co,cv,dc,dj,dq,dx,ee) +# +# * ordinary pessimitic insert might be done by pessistic update +# and we should consider possibility node_ptr to be deleted. + +SET DEBUG_SYNC = 'RESET'; + +# Filling leaf page (co..) +INSERT INTO t1 (a00) VALUES ('coa'); + +--connection con1 +SET DEBUG_SYNC = 'before_insert_pessimitic_row_ins_clust SIGNAL reached WAIT_FOR continue'; +# Cause modify_tree +--send +INSERT INTO t1 (a00) VALUES ('cob'); + +--connection con2 +SET DEBUG_SYNC = 'now WAIT_FOR reached'; +# All searches are blocked because root page is X latched + +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +# Blocked +--send +SELECT a00,a01 FROM t1 WHERE a00 = 'aa'; + +--connection con3 +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +# Blocked +--send +SELECT a00,a01 FROM t1 WHERE a00 = 'el'; + +--connection default +# FIXME: These occasionally time out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait2 TIMEOUT 1'; +--enable_warnings +SET DEBUG_SYNC = 'now SIGNAL continue'; + +--connection con1 +--reap + +--connection con2 +--reap + +--connection con3 +--reap + +--connection default + +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + + +# (3) Insert records to rightmost leaf page (gb..) and cause modify_page +# - root page is not X latched, because node_ptr for 'gb' is the last record +# of the level 1 though it is last record in the page. +# - lathed from level 1 page (el..,gb) + +SET DEBUG_SYNC = 'RESET'; + +# Filling leaf page (gb..) +INSERT INTO t1 (a00) VALUES ('gba'); + +--connection con1 +SET DEBUG_SYNC = 'before_insert_pessimitic_row_ins_clust SIGNAL reached WAIT_FOR continue'; +# Cause modify_tree +--send +INSERT INTO t1 (a00) VALUES ('gbb'); + +--connection con2 +SET DEBUG_SYNC = 'now WAIT_FOR reached'; +# Not blocked searches +SELECT a00,a01 FROM t1 WHERE a00 = 'aa'; +SELECT a00,a01 FROM t1 WHERE a00 = 'ek'; + +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait1'; +# Blocked +--send +SELECT a00,a01 FROM t1 WHERE a00 = 'el'; + +--connection con3 +SET DEBUG_SYNC = 'rw_s_lock_waiting SIGNAL lockwait2'; +# Blocked +--send +SELECT a00,a01 FROM t1 WHERE a00 = 'gb'; + +--connection default +# FIXME: These occasionally time out! +--disable_warnings +SET DEBUG_SYNC = 'now WAIT_FOR lockwait1 TIMEOUT 1'; +SET DEBUG_SYNC = 'now WAIT_FOR lockwait2 TIMEOUT 1'; +--enable_warnings +SET DEBUG_SYNC = 'now SIGNAL continue'; + +--connection con1 +--reap + +--connection con2 +--reap + +--connection con3 +--reap + +--connection default +ANALYZE TABLE t1; +SELECT CLUST_INDEX_SIZE FROM information_schema.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1'; + + + +# Cleanup +SET DEBUG_SYNC = 'RESET'; + +--connection default +--disconnect con1 +--disconnect con2 +--disconnect con3 + +DROP TABLE t1; + +--disable_query_log +SET GLOBAL innodb_limit_optimistic_insert_debug = @old_innodb_limit_optimistic_insert_debug; +SET GLOBAL innodb_adaptive_hash_index = @old_innodb_adaptive_hash_index; +SET GLOBAL innodb_stats_persistent = @old_innodb_stats_persistent; +--enable_query_log + +# Wait till all disconnects are completed. +--source include/wait_until_count_sessions.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_wl6326_big.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326_big.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/innodb_wl6326_big.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/innodb_wl6326_big.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,716 @@ +# This is a script for MTR with hybrid use. +# a) As regression test +# Mostly some brute force attempt to stress the internal sx locks of +# InnoDB which were introduced by WL#6326+WL#6363. +# The file with expected results fits to this variant. +# The impact on code coverage is quite good. +# b) As testbed for attempts to extend or improve the RQG test wl6326_sql.yy. +# The MTR based test uses +# - a table t1 with the same layout +# - the same stored functions +# - the same stored procedure proc_fill_t1 for inserting a configurable +# amount of records into t1 +# like the RQG test wl6326_sql.yy. +# Feel free to modify parameters like $max_row_count, $max_con, +# $high_load_duration or switch debugging on (let $test_debug= 1). +# But please be aware that MTR will most probably report that the test +# failed because it got a difference to expected results. +# Reasons: +# - In general: The file with expected results fits to a) only. +# - The actual results might dependend on $max_row_count. +# - Additional result sets might be printed. +# + +# WL#6326 is about the sx locks (InnoDB feature only). +--source include/have_innodb.inc +# Runtime properties: +# Notebook i5 dual core with HT, MySQL binaries compiled with debug, +# max_row_count=10000 rows +# vardir on tmpfs : ~ 375 +# vardir on disk : ~ 546 +--source include/big_test.inc +# We go with "--send" and "--reap" and that fails with the embedded server. +--source include/not_embedded.inc +# Its intentional to not take the risk that a run with valgrind times out. +--source include/not_valgrind.inc + +# FIXME: +# Increase the code coverage provided by the current test by +# trying "InnoDB Tablespace Monitor" as soon as some bug is fixed +# or wait till the deprecated "InnoDB Tablespace Monitor" is +# removed. + +# Setup of some parameters +# ------------------------ +# Number of records within every chunk to be added to t1. +let $load_unit= 10000; +# +# Rough number of records in t1 to achieve. +# We add chunks of $load_unit rows till the actual number +# of rows in the table t1 exceeds $max_row_count. +# let $max_row_count= 1000000; +# let $max_row_count= 300000; +# let $max_row_count= 100000; +# let $max_row_count= 30000; + let $max_row_count= 10000; # ~ 322s on tmpfs (NB) +# +# Determine which variant to run. +let $test_debug= 0; +# +# Number of concurrent sessions to be used in the high load test. +let $max_con= 10; +# Duration of the high load test in seconds. +let $high_load_duration= 60; + +# Putting all objects into the SCHEMA my_schema makes the final cleanup easier. +# We simply run than DROP SCHEMA my_schema. +CREATE SCHEMA my_schema; +USE my_schema; +CREATE FUNCTION f_thread_id (i INT) RETURNS CHAR(4) DETERMINISTIC +RETURN CONCAT(LPAD(CAST(i AS CHAR),3,'_'),'_') ; +SELECT CONCAT('->', f_thread_id( 1), '<-'); +SELECT CONCAT('->', f_thread_id(12), '<-'); + +# Definition of parameters used in functions. +# We use here a "1" in order to make the impact on the results of the functions +# good visible. +SET @extra_int = 1; +SET @extra_string = f_thread_id(@extra_int); +SELECT @extra_int , @extra_string; + +# The different functions are used later when filling t1 and also during +# RQG testing. They serve to generate the difference between column values +# in different rows in different areas of the column. +# Fictional example: +# row 1 col_int0=1 colx='1abcdefgh' coly='abcd1efgh' colz='abcdefgh1' +# row 2 col_int0=2 colx='2abcdefgh' coly='abcd2efgh' colz='abcdefgh2' +# The function f_ is for the column with the name . +# There is a function +# - for every column except col_int0 +# - even if the SQL for generating the value is simple. +# The reason for this is the architecture of the RQG test. + +let $part= AS my_result +FROM (SELECT 1 AS my_col UNION SELECT 12 UNION SELECT 123 +UNION SELECT 1234 UNION SELECT 12345) AS tx; + +let $function_name= f_col_int1; +eval CREATE FUNCTION $function_name (i INT) RETURNS INT(20) DETERMINISTIC +RETURN i * 1000 + @extra_int ; +eval SELECT $function_name(my_col) $part; + +let $function_name= f_col_int2; +eval CREATE FUNCTION $function_name (i INT) RETURNS INT(20) DETERMINISTIC +RETURN @extra_int * 10000000 + i ; +eval SELECT $function_name(my_col) $part; + +let $function_name= f_col_int3; +eval CREATE FUNCTION $function_name (i INT) RETURNS INT(20) DETERMINISTIC +RETURN @extra_int ; +eval SELECT $function_name(my_col) $part; + +let $function_name= f_col_blob; +eval CREATE FUNCTION $function_name (i INT) RETURNS BLOB DETERMINISTIC +RETURN RPAD(@extra_string,(@@innodb_page_size / 2 ) + 1,'a'); +eval SELECT CONCAT('->', SUBSTR($function_name(my_col) FROM 1 FOR 10), + '<-.....->', SUBSTR($function_name(my_col) FROM -10 FOR 10), '<-') $part; + +let $function_name= f_col_char0; +eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(255) DETERMINISTIC +RETURN LPAD(CAST(i AS CHAR),255,' '); +eval SELECT CONCAT('->', $function_name(my_col), '<-') $part; + +let $function_name= f_col_char1; +eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B', + LPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '), + @extra_string, + RPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '), + 'E') ; +eval SELECT CONCAT('->', $function_name(my_col), '<-') $part; + +let $function_name= f_col_char2; +eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B', + RPAD(SUBSTR(CAST(i AS CHAR),1,(LENGTH(CAST(i AS CHAR)) DIV 2)),10,' '), + @extra_string, + LPAD(SUBSTR(CAST(i AS CHAR), -((LENGTH(CAST(i AS CHAR)) + 1) DIV 2)),10,' '), + 'E'); +eval SELECT CONCAT('->', $function_name(my_col), '<-') $part; + +let $function_name= f_col_char3; +eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B',@extra_string,LPAD(CAST(i AS CHAR),20,' '),'E'); +eval SELECT CONCAT('->', $function_name(my_col), '<-') $part; + +let $function_name= f_col_char4; +eval CREATE FUNCTION $function_name (i INT) RETURNS CHAR(26) DETERMINISTIC +RETURN +CONCAT('B',RPAD(CAST(i AS CHAR),20,' '),@extra_string,'E'); +eval SELECT CONCAT('->', $function_name(my_col), '<-') $part; + +# Auxiliary table for figuring out the impact of scenarios on +# information_schema.innodb_metrics content. +CREATE TABLE my_metrics LIKE information_schema.innodb_metrics; +ALTER TABLE my_metrics ADD COLUMN phase ENUM('after', 'before'), +DROP COLUMN SUBSYSTEM, DROP COLUMN TYPE, DROP COLUMN COMMENT, +ADD PRIMARY KEY (NAME,phase); +let $empty_my_metrics= DELETE FROM my_metrics; +let $before_my_metrics= INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'before' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +let $after_my_metrics= INSERT INTO my_metrics +SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, +STATUS, 'after' +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%'; +let $print_metrics= SELECT NAME, COUNT, MAX_COUNT, MIN_COUNT, AVG_COUNT, +COUNT_RESET, MAX_COUNT_RESET, MIN_COUNT_RESET, AVG_COUNT_RESET, +TIME_ENABLED, TIME_DISABLED, TIME_ELAPSED, TIME_RESET, STATUS +FROM information_schema.innodb_metrics +WHERE NAME LIKE 'innodb_rwlock_sx_%' +ORDER BY NAME; + +# The main table for testing. +CREATE TABLE t1 ( + col_int0 BIGINT, + col_int1 BIGINT, + col_int2 BIGINT, + col_int3 BIGINT, + col_blob BLOB, + col_char0 VARCHAR(255), + col_char1 VARCHAR(30), + col_char2 VARCHAR(30), + col_char3 VARCHAR(30), + col_char4 VARCHAR(30) +) ENGINE = InnoDB; + +# Use many indexes with mostly significant size in order to cause +# some heavy use of sx locks during data generation. +ALTER TABLE t1 ADD UNIQUE KEY uidx_col_int0 (col_int0), +ADD UNIQUE KEY uidx1 (col_int1, col_char0), +ADD UNIQUE KEY uidx2 (col_int2, col_char0, col_int1), +ADD UNIQUE KEY uidx3 (col_int3, col_int2, col_char0), +ADD UNIQUE KEY uidx4 (col_char1, col_char0), +ADD UNIQUE KEY uidx5 (col_char2, col_char0, col_char1), +ADD UNIQUE KEY uidx6 (col_char3, col_char2, col_char0), +ADD UNIQUE KEY uidx7 (col_int1, col_int2, col_int3, col_char4, + col_char1, col_char2, col_char3, col_char0), +ADD KEY idx8 (col_blob(10), col_char4); + +delimiter |; +CREATE PROCEDURE proc_fill_t1 (max_row_count INT, load_unit INT) +BEGIN + DECLARE my_count INTEGER DEFAULT 0; + DECLARE max_load_count INTEGER DEFAULT 0; + DROP TABLE IF EXISTS t0; + CREATE TEMPORARY TABLE t0 (col_int0 BIGINT, PRIMARY KEY(col_int0)); + WHILE (my_count < load_unit ) DO + SET my_count = my_count + 1; + INSERT INTO t0 SET col_int0 = my_count; + END WHILE; + SET max_load_count = (SELECT (max_row_count DIV load_unit) + 1 ); + SELECT COUNT(col_int0) INTO @val FROM t1; + SET my_count = 0; + REPEAT + INSERT INTO t1 (col_int0, col_int1, col_int2, col_int3, col_blob, + col_char0, col_char1, col_char2,col_char3,col_char4) + SELECT col_int0 + @val, + f_col_int1(col_int0 + @val), + f_col_int2(col_int0 + @val), + f_col_int3(col_int0 + @val), + f_col_blob(col_int0 + @val), + f_col_char0(col_int0 + @val), + f_col_char1(col_int0 + @val), + f_col_char2(col_int0 + @val), + f_col_char3(col_int0 + @val), + f_col_char4(col_int0 + @val) + FROM t0; + COMMIT; + SELECT MAX(col_int0) INTO @val FROM t1; + SET my_count = my_count + 1; + UNTIL( my_count > max_load_count OR @val >= max_row_count ) + END REPEAT; + DROP TEMPORARY TABLE t0; +END| +delimiter ;| + +delimiter |; +CREATE PROCEDURE proc_dml (max_duration INT, t1_stripe_half INT) +BEGIN + DECLARE aux INTEGER DEFAULT 0; + DECLARE start_time INT; + DECLARE CONTINUE HANDLER FOR SQLEXCEPTION, SQLWARNING, NOT FOUND BEGIN END; + + SET @extra_int = CONNECTION_ID(); + SET @extra_string = f_thread_id(@extra_int); + SELECT ROUND(MAX(col_int0) / 2 ) INTO @t1_half FROM t1; + # The user lock 'Blocker' should be already set by some other session S1. + # S1 starts the race by releasing that lock. + # Wait till the lock is released and the lock can be obtained. + # In order to prevent endless waiting in case of non foreseen problems + # limit the timespan to 30 seconds. + SELECT GET_LOCK('Blocker', 30) INTO @aux; + # Release the lock immediate so that the other "runner" sessions start too. + SELECT RELEASE_LOCK('Blocker') INTO @aux; + SET start_time = UNIX_TIMESTAMP(); + + WHILE (UNIX_TIMESTAMP() - start_time < max_duration) DO + SET @aux = @t1_half - t1_stripe_half + ROUND(RAND() * t1_stripe_half * 2); + UPDATE t1 SET + col_int1 = f_col_int1(col_int0), + col_int2 = f_col_int2(col_int0), + col_int3 = f_col_int3(col_int0), + col_blob = f_col_blob(col_int0), + col_char0 = f_col_char0(col_int0), + col_char1 = f_col_char1(col_int0), + col_char2 = f_col_char2(col_int0), + col_char3 = f_col_char3(col_int0), + col_char4 = f_col_char4(col_int0) + WHERE col_int0 = @aux; + COMMIT; + END WHILE; +END| +delimiter ;| + +SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%"; +SET @pre_reset_ts = NOW(); +--sleep 1.1 +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; +SET @pre_enable_ts = NOW(); +--sleep 1.1 +SET GLOBAL innodb_monitor_enable = "innodb_rwlock_sx_%"; +--sleep 1.1 +SET @pre_collect_ts = NOW(); +eval $empty_my_metrics; +eval $before_my_metrics; +--echo # TC-01 There are exact three entries "innodb_rwlock_sx_%" with the +--echo # with the name which follow in innodb_metrics. +let $check_statement= +SELECT COUNT(*) <> 3 FROM my_metrics +WHERE NAME IN ('innodb_rwlock_sx_spin_waits', + 'innodb_rwlock_sx_spin_rounds', + 'innodb_rwlock_sx_os_waits'); +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT NAME FROM my_metrics + ORDER BY NAME; + exit; +} +--echo # pass + +SELECT COUNT(*) INTO @sx_count FROM my_metrics; + +--echo # TC-02 Counting is now enabled. ALL = @sx_count entries show that. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE STATUS = 'enabled'; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT NAME, STATUS FROM my_metrics + ORDER BY NAME; + exit; +} +--echo # pass + +--echo # TC-03 @pre_reset_ts < TIME_RESET. ALL = @sx_count entries show that. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE @pre_reset_ts < TIME_RESET; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT NAME, @pre_reset_ts, TIME_RESET FROM my_metrics + ORDER BY NAME; + exit; +} +--echo # pass + +--echo # TC-04 @pre_enable_ts < TIME_ENABLED. ALL = @sx_count entries show that. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE @pre_enable_ts < TIME_ENABLED; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT NAME, @pre_enable_ts, TIME_ENABLED FROM my_metrics + ORDER BY NAME; + exit; +} +--echo # pass + +--echo # TC-05 TIME_RESET < TIME_ENABLED AND TIME_ENABLED < @pre_collect_ts +--echo # AND TIME_ELAPSED > 0. ALL = @sx_count entries show that. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE TIME_RESET < TIME_ENABLED AND TIME_ENABLED < @pre_collect_ts + AND TIME_ELAPSED > 0; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT NAME, @pre_collect_ts, TIME_RESET, TIME_ENABLED, TIME_ELAPSED + FROM my_metrics + ORDER BY NAME; + exit; +} +--echo # pass + +--echo # TC-06 COUNT_RESET = MAX_COUNT_RESET. ALL = @sx_count entries show that. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE COUNT_RESET = MAX_COUNT_RESET; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT NAME, COUNT_RESET, MAX_COUNT_RESET FROM my_metrics + ORDER BY NAME; + exit; +} +--echo # pass + +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; +--disable_result_log +if($test_debug) +{ + --enable_result_log + eval $print_metrics; +} +SHOW ENGINE INNODB STATUS; +--enable_result_log + +eval $empty_my_metrics; +eval $before_my_metrics; +# These values (the "0") help to identify later if some record is in its +# initial state or already modified. +SET @extra_string = '__0_'; +SET @extra_int = 0; + +--echo # TC-07 One session inserts some significant amount of rows into t1. +--echo # The system MUST survive that. +--replace_result $max_row_count +eval SET @max_row_count = $max_row_count; +--replace_result $load_unit +eval SET @load_unit = $load_unit; +SET @start_time = UNIX_TIMESTAMP(); +SET AUTOCOMMIT = OFF; +CALL proc_fill_t1 (@max_row_count, @load_unit); +--echo # pass +SET AUTOCOMMIT = ON; +SELECT col_int0 INTO @t1_half FROM t1 +WHERE col_int0 >= (@val DIV 2) ORDER BY col_int0 LIMIT 1; + +--disable_result_log +if($test_debug) +{ + --enable_result_log + SELECT COUNT(*) AS table_row_count, + UNIX_TIMESTAMP() - @start_time AS fill_run_time + FROM t1; + eval $print_metrics; +} +SHOW ENGINE INNODB STATUS; +--enable_result_log + +# Show that the value distribution is according to the plan. +--vertical_results +SELECT col_int0, col_int1, col_int2, col_int3, + CONCAT('->', SUBSTR(col_blob FROM 1 FOR 10), + '<-.....->', SUBSTR(col_blob FROM -10 FOR 10), '<-') AS col_blobx, + CONCAT('->',col_char0,'<-') AS col_char0x, + CONCAT('->',col_char1,'<-') AS col_char1x, + CONCAT('->',col_char2,'<-') AS col_char2x, + CONCAT('->',col_char3,'<-') AS col_char3x, + CONCAT('->',col_char4,'<-') AS col_char4x +FROM t1 WHERE col_int0 between 98 AND 102; +--horizontal_results + +# For experiments/interest only. Please do not remove that. +if (0) +{ + ANALYZE TABLE t1; + SELECT n_rows, clustered_index_size, sum_of_other_index_sizes + FROM mysql.innodb_table_stats; + + # SELECT * FROM mysql.innodb_index_stats; + # idx_col_int3_int0 n_diff_pfx01 1 col_int3 + # idx_col_int3_int0 n_diff_pfx02 10000 col_int3,col_int0 + # idx_col_int3_int0 n_diff_pfx03 10000 col_int3,col_int0,DB_ROW_ID + # idx_col_int3_int0 n_leaf_pages 19 Number of leaf pages in the index + # idx_col_int3_int0 size 20 Number of pages in the index + + --vertical_results + SELECT t1.index_name, t1.stat_value AS idx_pages, t2.stat_value AS idx_leaf_pages, + (t1.stat_value - t2.stat_value - 1) / t1.stat_value AS sx_page_ratio + FROM mysql.innodb_index_stats t1, mysql.innodb_index_stats t2 + WHERE t1.index_name = t2.index_name + AND t1.stat_name = 'size' AND t2.stat_name = 'n_leaf_pages' + ORDER BY t1.index_name; + --horizontal_results +} + +--echo # TC-11 Several concurrent sessions perform updates in t1 like mad. +--echo # The system MUST survive this. +--echo # Printing of statements is partially suppressed. +SET @start_time = UNIX_TIMESTAMP(); +SELECT 1 FROM t1 WHERE col_int0 = @t1_half FOR UPDATE; +SELECT GET_LOCK('Blocker', 1000) ; +--disable_query_log +let $num= $max_con; +while ($num) +{ + --connect (con$num,localhost,root,,) + USE my_schema; + # The second parameter of the procedure is size of the affected stripe / 2. + # A smaller stripe causes some smaller counter growth but most probably + # also more stress around locking in general. + # Example # (nnnn) = half stripe size + # NAME | COUNT_RESET (5000) | COUNT_RESET (100) + # -----------------------------+--------------------+---------------- + # innodb_rwlock_sx_os_waits | 1412 | 486 + # innodb_rwlock_sx_spin_rounds | 44061 | 17031 + # innodb_rwlock_sx_spin_waits | 996 | 515 + --send + eval CALL proc_dml($high_load_duration,@t1_half); + dec $num; +} +--connection default +SELECT RELEASE_LOCK('Blocker') ; +--sleep 3 +COMMIT; +let $num= $max_con; +while ($num) +{ + --connection con$num + --reap + dec $num; +} +--echo # pass +--connection default +--enable_query_log + +# let $wait_timeout= 181; +# --source include/wait_condition.inc +# eval $after_my_metrics; +--disable_result_log +if($test_debug) +{ + --enable_result_log + SELECT UNIX_TIMESTAMP() - @start_time AS update_battle_run_time; + eval $print_metrics; +} +SHOW ENGINE INNODB STATUS; +--enable_result_log + +--echo # TC-13 One session performs ALTER TABLE t1 ADD KEY ... on the fat table t1. +--echo # The system MUST survive this. +SET @start_time = UNIX_TIMESTAMP(); +ALTER TABLE t1 ADD KEY idx_col_char4_col_char0 (col_char4,col_char0); +--disable_result_log +if($test_debug) +{ + --enable_result_log + SELECT UNIX_TIMESTAMP() - @start_time AS add_key_run_time; + eval $print_metrics; +} +SHOW ENGINE INNODB STATUS; +--enable_result_log +--echo # pass + +--echo # TC-15 One session performs a fat update on the fat table t1. +--echo # The system MUST survive this. +SET @start_time = UNIX_TIMESTAMP(); +SET @extra_int = 13; +SET @extra_string = f_thread_id(@extra_int); +eval UPDATE t1 SET + col_int1 = f_col_int1(col_int0), col_int2 = f_col_int2(col_int0), + col_int3 = f_col_int3(col_int0), col_blob = f_col_blob(col_int0), + col_char0 = f_col_char0(col_int0), col_char1 = f_col_char1(col_int0), + col_char2 = f_col_char2(col_int0), col_char3 = f_col_char3(col_int0), + col_char4 = f_col_char4(col_int0) +WHERE col_int0 BETWEEN @t1_half - 2500 AND @t1_half + 2500; +COMMIT; +--disable_result_log +if($test_debug) +{ + --enable_result_log + SELECT UNIX_TIMESTAMP() - @start_time AS total_update_run_time; + eval $print_metrics; +} +SHOW ENGINE INNODB STATUS; +--enable_result_log +--echo # pass + +# Basically every of the big activities causes some counter growth. +# But caused by +# - the architecture of InnoDB (certain things happen asynchronous) +# - the actual test configuration (server/InnoDB options) +# - conditions like parallel (./mtr --parallel=auto?) load on the testing box +# this might be not fulfilled per single big activity every time except +# we go with huge waits or similar. +# Observation: +# - non debug binaries: expectation frequent not fulfilled +# - debug binaries: expectation rare not fulfilled +# +let $wait_timeout= 121; +let $wait_condition= +SELECT COUNT(*) = @sx_count +FROM information_schema.innodb_metrics t_after +JOIN my_metrics t_before +ON t_after.COUNT_RESET > t_before.COUNT_RESET AND t_after.NAME = t_before.NAME; +--source include/wait_condition.inc +eval $after_my_metrics; + +--echo # TC-16 The following activities happend after reset in innodb_metrics +--echo # - Insert some significant amount of rows into t1. +--echo # - Several concurrent users perform excessive updates in t1. +--echo # - ALTER TABLE ... ADD KEY +--echo # - One UPDATE statement modifying a huge slice of t1. +--echo # Any of them causes heavy use of SX lock and therefore COUNT_RESET +--echo # must have grown for ALL = @sx_count entries. +# The former testcases TC-10 and TC12 had to be made a part of this testcase +# because their results were unstable. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics t_after JOIN my_metrics t_before +ON t_after.COUNT_RESET > t_before.COUNT_RESET AND t_after.NAME = t_before.NAME +WHERE t_after.phase = 'after' AND t_before.phase = 'before'; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT * FROM my_metrics + ORDER BY NAME, phase; + exit; +} +--echo # pass + +--echo # TC-09 Heavy activity after reset. +--echo # COUNT_RESET = MAX_COUNT_RESET for ALL = @sx_count entries +--echo # needs to stay valid though he counters will have grown. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE phase = 'after' AND COUNT_RESET = MAX_COUNT_RESET; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT * FROM my_metrics + ORDER BY NAME, phase; + exit; +} +--echo # pass + +eval $empty_my_metrics; +eval $before_my_metrics; +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; +eval $after_my_metrics; +--echo # TC-08 There was a reset. COUNT_RESET = MAX_COUNT_RESET for ALL +--echo # = @sx_count entries. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE phase = 'before' AND COUNT_RESET = MAX_COUNT_RESET; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT * FROM my_metrics + ORDER BY NAME, phase; + exit; +} +--echo # pass + +--echo # TC-17 We had heavy activity causing big counters and after that a reset. +--echo # Reset causes COUNT > COUNT_RESET AND MAX_COUNT > MAX_COUNT_RESET +--echo # for ALL @sx_count entries. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics +WHERE phase = 'after' + AND COUNT > COUNT_RESET + AND MAX_COUNT > MAX_COUNT_RESET; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT * FROM my_metrics + ORDER BY NAME, phase; + exit; +} +--echo # pass + +--echo # TC-18 We had some reset but this must not decrease COUNT or MAX_COUNT +--echo # after.COUNT >= before.COUNT AND +--echo # after.MAX_COUNT >= before.MAX_COUNT for ALL @sx_count entries. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics t_after JOIN my_metrics t_before +ON t_after.COUNT >= t_before.COUNT AND t_after.MAX_COUNT >= t_before.MAX_COUNT + AND t_after.NAME = t_before.NAME +WHERE t_after.phase = 'after' AND t_before.phase = 'before'; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT * FROM my_metrics + ORDER BY NAME, phase; + exit; +} +--echo # pass + +--echo # TC-19 We had some reset after heavy activity and this must cause +--echo # after.COUNT_RESET < before.COUNT_RESET +--echo # AND after.MAX_COUNT_RESET < before.MAX_COUNT_RESET AND +--echo # for ALL @sx_count entries. +let $check_statement= +SELECT COUNT(*) <> @sx_count FROM my_metrics t_after JOIN my_metrics t_before +ON t_after.COUNT_RESET < t_before.COUNT_RESET + AND t_after.MAX_COUNT_RESET < t_before.MAX_COUNT_RESET + AND t_after.NAME = t_before.NAME +WHERE t_after.phase = 'after' AND t_before.phase = 'before'; +if(`$check_statement`) +{ + --echo # fail + eval $check_statement; + SELECT * FROM my_metrics + ORDER BY NAME, phase; + exit; +} +--echo # pass + +# Cleanup +let $num= $max_con; +while ($num) +{ + --connection con$num + --disconnect con$num + --source include/wait_until_disconnected.inc + dec $num; +} +--connection default +USE test; +DROP SCHEMA my_schema; +SET GLOBAL innodb_monitor_disable = all; +SET GLOBAL innodb_monitor_reset_all = all; +--disable_warnings +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; +--enable_warnings +SET GLOBAL innodb_monitor_disable = "innodb_rwlock_sx_%"; +SET GLOBAL innodb_monitor_reset = "innodb_rwlock_sx_%"; + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/instant_alter.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/instant_alter.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter.test 2020-01-26 18:37:28.000000000 +0000 @@ -46,6 +46,7 @@ WHERE variable_name = 'innodb_instant_alter_column'); let $format= 3; +let $redundant_4k= `SELECT @@GLOBAL.innodb_page_size=4096`; while ($format) { let $engine= `SELECT CONCAT('ENGINE=InnoDB ROW_FORMAT=',CASE $format WHEN 1 THEN 'DYNAMIC' @@ -223,6 +224,13 @@ --enable_info ALTER TABLE t3 ADD COLUMN t TEXT CHARSET utf8 DEFAULT 'The quick brown fox jumps over the lazy dog'; + +if ($redundant_4k) +{ +--error ER_TOO_BIG_ROWSIZE +ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL; +SET innodb_strict_mode = OFF; +} ALTER TABLE t3 ADD COLUMN b BLOB NOT NULL; --error ER_NO_DEFAULT_FOR_FIELD INSERT INTO t3 SET id=4; @@ -236,7 +244,6 @@ SELECT id, c2, ST_AsText(c3) c3, c4, c5, c6, c7, c8, phrase, b FROM t3; --enable_info ALTER TABLE t3 DROP c3, DROP c7; -SET innodb_strict_mode = OFF; --disable_info SELECT * FROM t3; @@ -389,7 +396,20 @@ CHECK TABLE t1; DROP TABLE t1; +# MDEV-21172 Memory leak during ADD PRIMARY KEY + +SET innodb_strict_mode = ON; +eval CREATE TABLE t1 (a INT, b VARCHAR(500), c TEXT, UNIQUE(a,b)) $engine; +ALTER TABLE t1 ADD d TEXT; +--error 0,ER_TOO_BIG_ROWSIZE +ALTER TABLE t1 ADD PRIMARY KEY (b,a); +# Exploit MDEV-17468 to force the table definition to be reloaded +ALTER TABLE t1 ADD va INT AS (a) VIRTUAL; +DROP TABLE t1; +SET innodb_strict_mode = OFF; + dec $format; +let $redundant_4k= 0; } disconnect analyze; SELECT variable_value-@old_instant instants diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/instant_alter_bugs.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter_bugs.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/instant_alter_bugs.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter_bugs.test 2020-01-26 18:37:28.000000000 +0000 @@ -135,8 +135,10 @@ HANDLER h CLOSE; DROP TABLE t1; -# MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys which are pointed -# to the table being altered +--echo # +--echo # MDEV-19630 ALTER TABLE ... ADD COLUMN damages foreign keys +--echo # which are pointed to the table being altered +--echo # CREATE TABLE t1(f1 int not null, primary key(f1))engine=innodb; CREATE TABLE t2(f1 INT AUTO_INCREMENT NOT NULL, f2 INT NOT NULL, status ENUM ('a', 'b', 'c'), INDEX idx1(f2), @@ -154,3 +156,18 @@ --let $datadir= `select @@datadir` --remove_file $datadir/test/load.data + +--echo # +--echo # MDEV-20938 Double free of dict_foreign_t during instant ALTER TABLE +--echo # + +CREATE TABLE t1 (id INT UNSIGNED PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 (a INT UNSIGNED PRIMARY KEY, b INT UNSIGNED UNIQUE, + FOREIGN KEY fk1 (b) REFERENCES t1 (id)) ENGINE=InnoDB; +ALTER TABLE t2 + DROP FOREIGN KEY fk1, + CHANGE b d INT UNSIGNED, + ADD c INT; +DROP TABLE t2, t1; + +--echo # End of 10.3 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/instant_alter_debug.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter_debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/instant_alter_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/instant_alter_debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -293,3 +293,29 @@ DROP TABLE t1; SET GLOBAL innodb_purge_rseg_truncate_frequency = @save_frequency; + +--echo # +--echo # MDEV-21045 AddressSanitizer: use-after-poison in mem_heap_dup / row_log_table_get_pk_col +--echo # +CREATE TABLE t1 (a TEXT) ENGINE = InnoDB ROW_FORMAT=REDUNDANT; +INSERT INTO t1 (a) VALUES ('foo'); + +ALTER TABLE t1 ADD COLUMN b INT DEFAULT 0,algorithm=instant; + +--connect (con2,localhost,root,,test) +SET DEBUG_SYNC='innodb_inplace_alter_table_enter SIGNAL onlinealter WAIT_FOR update'; +--send +ALTER TABLE t1 ADD PRIMARY KEY (b); + +--connection default +SET DEBUG_SYNC='now WAIT_FOR onlinealter'; +UPDATE t1 SET b = 1; +SET DEBUG_SYNC='now SIGNAL update'; + +--connection con2 +--reap + +--connection default +SET DEBUG_SYNC='RESET'; +--disconnect con2 +DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---innodb-purge-threads=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/purge_secondary_mdev-16222.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,53 +0,0 @@ ---source include/have_debug.inc ---source include/have_innodb.inc - ---echo # ---echo # MDEV-16222 Assertion `0' failed in row_purge_remove_sec_if_poss_leaf on table with virtual columns and indexes ---echo # - ---let $datadir= `select @@datadir` -set @saved_frequency= @@global.innodb_purge_rseg_truncate_frequency; -set global innodb_purge_rseg_truncate_frequency= 1; -set @saved_dbug= @@global.debug_dbug; -set global debug_dbug= "+d,ib_purge_virtual_mdev_16222_1,ib_purge_virtual_mdev_16222_2"; - -create table t1 ( - pk serial, vb tinyblob as (b) virtual, b tinyblob, - primary key(pk), index (vb(64))) -engine innodb; - -insert ignore into t1 (b) values ('foo'); - -select * into outfile 'load.data' from t1; -load data infile 'load.data' replace into table t1; - -set debug_sync= "now WAIT_FOR latch_released"; -set global debug_dbug= "-d,ib_purge_virtual_mdev_16222_1"; -drop table t1; ---remove_file $datadir/test/load.data - -set debug_sync= "now SIGNAL drop_started WAIT_FOR got_no_such_table"; - -create table t1 ( - pk serial, vb tinyblob as (b) virtual, b tinyblob, - primary key(pk), index (vb(64))) -engine innodb; - -insert ignore into t1 (b) values ('foo'); - -select * into outfile 'load.data' from t1; -load data infile 'load.data' replace into table t1; - -set debug_sync= "now WAIT_FOR got_no_such_table"; -# FIXME: Racing condition here: -# 1. purge thread goes into sending got_no_such_table -# 2. test thread finishes debug_sync= "RESET" below -# 3. purge thread sends got_no_such_table -set global debug_dbug= @saved_dbug; - -# cleanup -drop table t1; ---remove_file $datadir/test/load.data - -set global innodb_purge_rseg_truncate_frequency= @saved_frequency; -set debug_sync= "RESET"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/redo_log_during_checkpoint.test 2020-01-26 18:37:28.000000000 +0000 @@ -33,8 +33,8 @@ --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect --exec echo "wait" > $_expect_file_name -set debug_dbug = '+d,increase_mtr_checkpoint_size'; -set debug_dbug = '+d,crash_after_checkpoint'; +SET debug_dbug = '+d,increase_mtr_checkpoint_size'; +SET debug_dbug = '+d,crash_after_checkpoint'; --error 2013 set global innodb_log_checkpoint_now = 1; @@ -64,7 +64,7 @@ --enable_query_log --exec echo "wait" > $_expect_file_name -set debug_dbug = '+d,crash_after_checkpoint'; +SET debug_dbug = '+d,crash_after_checkpoint'; --error 2013 set global innodb_log_checkpoint_now = 1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,32 @@ +--source include/have_innodb.inc + +call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page."); + +SET innodb_strict_mode = 0; +SET @@global.log_warnings = 3; + +CREATE TABLE t1 ( + col_1 TEXT + ,col_2 TEXT + ,col_3 TEXT + ,col_4 TEXT + ,col_5 TEXT + ,col_6 TEXT + ,col_7 TEXT + ,col_8 TEXT + ,col_9 TEXT + ,col_10 TEXT + ,col_11 TEXT +) ENGINE=INNODB ROW_FORMAT=COMPACT; +--enable_warnings +TRUNCATE TABLE t1; +OPTIMIZE TABLE t1; +ALTER TABLE t1 FORCE; +SET innodb_strict_mode = ON; +TRUNCATE TABLE t1; +OPTIMIZE TABLE t1; +ALTER TABLE t1 FORCE; +DROP TABLE t1; +--disable_warnings + +SET @@global.log_warnings = 2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/stat_tables.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/stat_tables.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/stat_tables.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/stat_tables.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,17 @@ +source include/have_innodb.inc; + +# +# MDEV-20354 All but last insert ignored in InnoDB tables when table locked +# +rename table mysql.table_stats to mysql.table_stats_save; +flush tables; +set use_stat_tables= PREFERABLY; +create table t1 (a int) engine=InnoDB; +start transaction; +insert t1 values (1); +insert t1 values (2); +commit; +select * from t1; +drop table t1; +rename table mysql.table_stats_save to mysql.table_stats; +flush tables; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/temporary_table_optimization.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/temporary_table_optimization.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/temporary_table_optimization.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/temporary_table_optimization.test 2020-01-26 18:37:28.000000000 +0000 @@ -100,7 +100,7 @@ # 3. Alter of temp-table. # create temporary table t1 (t1_i int, t1_f float) engine = innodb; -insert into t1 values (1, 1.1), (2, 2.2), (3, 2.2), (4, 4.4); +insert into t1 values (1, 1.1), (2, 2.5), (3, 2.5), (4, 4.4); # explain select * from t1 where t1_i = 1; alter table t1 add unique index pri_index(t1_i); @@ -110,8 +110,8 @@ --error ER_DUP_ENTRY alter table t1 add unique index sec_index(t1_f); alter table t1 add index sec_index(t1_f); -explain select * from t1 where t1_f > 2.2; -select * from t1 where t1_f > 2.2; +explain select * from t1 where t1_f >= 2.5; +select * from t1 where t1_f >= 2.5; # alter table t1 add column (t1_c char(10)); select * from t1; @@ -120,7 +120,7 @@ alter table t1 drop column t1_f; show create table t1; --error ER_BAD_FIELD_ERROR -select * from t1 where t1_f > 2.2; +select * from t1 where t1_f >= 2.5; # --error ER_ALTER_OPERATION_NOT_SUPPORTED alter table t1 add index sec_index2(t1_c), algorithm=inplace; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/undo_log.test mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/undo_log.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb/t/undo_log.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb/t/undo_log.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,7 +1,5 @@ --source include/have_innodb.inc -call mtr.add_suppression("Cannot add field `b_str_20` in table `test`.`test_tab` because after adding it, the row size is"); - SET innodb_strict_mode=OFF; CREATE TABLE test_tab ( a_str_18 mediumtext, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/concurrent_insert.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/concurrent_insert.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/concurrent_insert.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/concurrent_insert.result 2020-01-26 18:37:28.000000000 +0000 @@ -9,3 +9,27 @@ connection default; SET DEBUG_SYNC = 'RESET'; DROP TABLE t1; +# +# MDEV-19529 InnoDB hang on DROP FULLTEXT INDEX +# +CREATE TABLE t1(f1 CHAR(100), FULLTEXT(f1))ENGINE=InnoDB; +INSERT INTO t1 VALUES('test'); +CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB; +INSERT INTO t2 VALUES('mariadb'); +connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang'; +SET DEBUG_SYNC= 'fts_instrument_sync_request + SIGNAL drop_index_start WAIT_FOR sync_op'; +INSERT INTO t1 VALUES('Keyword'); +connect con1,localhost,root,,,; +SET DEBUG_SYNC='now WAIT_FOR drop_index_start'; +SET DEBUG_SYNC= 'norebuild_fts_drop SIGNAL sync_op WAIT_FOR fts_drop_index'; +ALTER TABLE t2 drop index idx1; +connection default; +set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; +connection con1; +drop table t1, t2; +connection default; +set DEBUG_SYNC=RESET; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/crash_recovery.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/crash_recovery.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/crash_recovery.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/crash_recovery.result 2020-01-26 18:37:28.000000000 +0000 @@ -41,9 +41,11 @@ ('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'), ('MySQL vs. YourSQL','In the following database comparison ...'), ('MySQL Security','When configured properly, MySQL ...'); +connect dml, localhost, root,,; BEGIN; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); +connection default; # Make durable the AUTO_INCREMENT in the above incomplete transaction. connect flush_redo_log,localhost,root,,; SET GLOBAL innodb_flush_log_at_trx_commit=1; @@ -52,6 +54,7 @@ ROLLBACK; disconnect flush_redo_log; connection default; +disconnect dml; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); SELECT * FROM articles @@ -79,9 +82,39 @@ (4, 11, '1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'), (5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'), (7, 4, 'MySQL Security','When configured properly, MySQL ...'); +connect dml, localhost, root,,; BEGIN; INSERT INTO articles VALUES (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); +connect dml2, localhost, root,,; +# +# MDEV-19073 FTS row mismatch after crash recovery +# +CREATE TABLE mdev19073(id SERIAL, title VARCHAR(200), body TEXT, +FULLTEXT(title,body)) ENGINE=InnoDB; +INSERT INTO mdev19073 (title, body) VALUES +('MySQL Tutorial', 'DBMS stands for Database...'); +CREATE FULLTEXT INDEX idx ON mdev19073(title, body); +CREATE TABLE mdev19073_2 LIKE mdev19073; +INSERT INTO mdev19073_2 (title, body) VALUES +('MySQL Tutorial', 'DBMS stands for Database...'); +INSERT INTO mdev19073 (title, body) VALUES +('MariaDB Tutorial', 'DB means Database ...'); +INSERT INTO mdev19073_2 (title, body) VALUES +('MariaDB Tutorial', 'DB means Database ...'); +SELECT * FROM mdev19073 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +id title body +1 MySQL Tutorial DBMS stands for Database... +2 MariaDB Tutorial DB means Database ... +SELECT * FROM mdev19073_2 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +id title body +1 MySQL Tutorial DBMS stands for Database... +2 MariaDB Tutorial DB means Database ... +connection default; +disconnect dml; +disconnect dml2; INSERT INTO articles VALUES (8, 12, 'MySQL Tutorial','DBMS stands for DataBase ...'); SELECT * FROM articles WHERE MATCH (title, body) AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); @@ -90,3 +123,14 @@ 1 10 MySQL Tutorial DBMS stands for DataBase ... 8 12 MySQL Tutorial DBMS stands for DataBase ... DROP TABLE articles; +SELECT * FROM mdev19073 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +id title body +1 MySQL Tutorial DBMS stands for Database... +2 MariaDB Tutorial DB means Database ... +SELECT * FROM mdev19073_2 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +id title body +1 MySQL Tutorial DBMS stands for Database... +2 MariaDB Tutorial DB means Database ... +DROP TABLE mdev19073, mdev19073_2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/fulltext_table_evict.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -# -# Bug Bug #27304661 MYSQL CRASH DOING SYNC INDEX ] -# [FATAL] INNODB: SEMAPHORE WAIT HAS LASTED > 600 -# -CREATE TABLE t1 ( -id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, -f1 TEXT(500), -FULLTEXT idx (f1) -) ENGINE=InnoDB; -insert into t1 (f1) values ('fjdhfsjhf'),('dhjfhjshfj'),('dhjafjhfj'); -set @save_table_definition_cache=@@global.table_definition_cache; -set @save_table_open_cache=@@global.table_open_cache; -set global table_definition_cache=400; -set global table_open_cache= 1024; -SET @save_dbug = @@GLOBAL.debug_dbug; -SET GLOBAL DEBUG_DBUG="+d,crash_if_fts_table_is_evicted"; -set @@global.table_definition_cache=@save_table_definition_cache; -set @@global.table_open_cache=@save_table_open_cache; -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -drop table if exists t1; CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, a VARCHAR(200), @@ -409,7 +408,6 @@ id 105 DROP TABLE t1; -drop table if exists t50; set names utf8; "----------Test1---------" create table t50 (s1 varchar(60) character set utf8 collate utf8_bin) engine = innodb; @@ -648,9 +646,6 @@ ÅÅÅÅ LLLL ÅÅÅÅ ÅÅÅÅ -DROP TABLE if EXISTS t2; -Warnings: -Note 1051 Unknown table 'test.t2' CREATE TABLE t2 (s1 VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_POLISH_CI) ENGINE = InnoDB; CREATE FULLTEXT INDEX i ON t2 ( s1); INSERT INTO t2 VALUES @@ -700,19 +695,26 @@ DROP TABLE t1; "----------Test27---------" CREATE TABLE t1 (id INT,char_column VARCHAR(60)); +CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB; +ALTER TABLE t2 DROP a; SET @@autocommit=0; CREATE FULLTEXT INDEX i ON t1 (char_column); INSERT INTO t1 values (1,'aaa'); -"restart server..." -# Restart the server ---source include/restart_mysqld.inc -DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb') -SET @@autocommit=1; -DROP TABLE t1; +CREATE TABLE mdev20987_1(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB; +CREATE TABLE mdev20987_2(f1 INT NOT NULL, f2 CHAR(100), +FULLTEXT(f2), +FOREIGN KEY(f1) REFERENCES mdev20987_1(f1))ENGINE=InnoDB; +INSERT INTO mdev20987_1 VALUES(1); +INSERT INTO mdev20987_2 VALUES(1, 'mariadb'); +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `FTS_DOC_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`FTS_DOC_ID`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb'); +DROP TABLE t1, t2, mdev20987_2, mdev20987_1; "----------Test28---------" -drop table if exists `fts_test`; -Warnings: -Note 1051 Unknown table 'test.fts_test' create table `fts_test`(`a` text,fulltext key(`a`))engine=innodb; set session autocommit=0; insert into `fts_test` values (''); @@ -902,9 +904,6 @@ 2 How To Use MySQL Well After you went through a ... 3 Optimizing MySQL In this tutorial we will show ... DROP TABLE articles; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 'test.t1' create table t1 (FTS_DOC_ID bigint unsigned auto_increment not null primary key, title varchar(200),body text,fulltext(title,body)) engine=innodb; insert into t1 set body='test'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/sync_block.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/sync_block.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/r/sync_block.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/r/sync_block.result 2020-01-26 18:37:28.000000000 +0000 @@ -39,7 +39,7 @@ SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; sql_text INSERT INTO t1(title) VALUES('mysql database') -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1; # Case 2: Sync blocks DML(insert) on other tables. @@ -71,7 +71,7 @@ # slow log results should be empty here. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; sql_text -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1,t2; disconnect con1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/concurrent_insert.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/concurrent_insert.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/concurrent_insert.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/concurrent_insert.test 2020-01-26 18:37:28.000000000 +0000 @@ -18,3 +18,35 @@ SET DEBUG_SYNC = 'RESET'; DROP TABLE t1; + +--echo # +--echo # MDEV-19529 InnoDB hang on DROP FULLTEXT INDEX +--echo # + +CREATE TABLE t1(f1 CHAR(100), FULLTEXT(f1))ENGINE=InnoDB; +INSERT INTO t1 VALUES('test'); +CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB; +INSERT INTO t2 VALUES('mariadb'); + +connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; +SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang'; +SET DEBUG_SYNC= 'fts_instrument_sync_request + SIGNAL drop_index_start WAIT_FOR sync_op'; +send INSERT INTO t1 VALUES('Keyword'); + +connect(con1,localhost,root,,,); +SET DEBUG_SYNC='now WAIT_FOR drop_index_start'; +SET DEBUG_SYNC= 'norebuild_fts_drop SIGNAL sync_op WAIT_FOR fts_drop_index'; +send ALTER TABLE t2 drop index idx1; + +connection default; +reap; +set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; + +connection con1; +reap; +drop table t1, t2; +connection default; +set DEBUG_SYNC=RESET; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/crash_recovery.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/crash_recovery.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/crash_recovery.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/crash_recovery.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ --source include/have_innodb.inc # The embedded server tests do not support restarting. --source include/not_embedded.inc +--source include/maybe_debug.inc FLUSH TABLES; # Following are test for crash recovery on FTS index, the first scenario @@ -73,10 +74,12 @@ ('MySQL vs. YourSQL','In the following database comparison ...'), ('MySQL Security','When configured properly, MySQL ...'); +connect(dml, localhost, root,,); BEGIN; INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); +connection default; --echo # Make durable the AUTO_INCREMENT in the above incomplete transaction. --connect (flush_redo_log,localhost,root,,) @@ -89,6 +92,8 @@ --source include/restart_mysqld.inc +disconnect dml; + # This insert will re-initialize the Doc ID counter, it should not crash INSERT INTO articles (title,body) VALUES ('MySQL Tutorial','DBMS stands for DataBase ...'); @@ -121,6 +126,7 @@ (5, 6, 'MySQL vs. YourSQL','In the following database comparison ...'), (7, 4, 'MySQL Security','When configured properly, MySQL ...'); +connect(dml, localhost, root,,); BEGIN; # Below we do not depend on the durability of the AUTO_INCREMENT sequence, @@ -128,7 +134,49 @@ INSERT INTO articles VALUES (100, 200, 'MySQL Tutorial','DBMS stands for DataBase ...'); +connect(dml2, localhost, root,,); + +--echo # +--echo # MDEV-19073 FTS row mismatch after crash recovery +--echo # + +CREATE TABLE mdev19073(id SERIAL, title VARCHAR(200), body TEXT, + FULLTEXT(title,body)) ENGINE=InnoDB; +INSERT INTO mdev19073 (title, body) VALUES + ('MySQL Tutorial', 'DBMS stands for Database...'); +CREATE FULLTEXT INDEX idx ON mdev19073(title, body); +CREATE TABLE mdev19073_2 LIKE mdev19073; +if ($have_debug) +{ +--disable_query_log +SET @saved_dbug = @@debug_dbug; +SET DEBUG_DBUG = '+d,fts_instrument_sync_debug'; +--enable_query_log +} +INSERT INTO mdev19073_2 (title, body) VALUES + ('MySQL Tutorial', 'DBMS stands for Database...'); +if ($have_debug) +{ +--disable_query_log +SET DEBUG_DBUG = @saved_dbug; +--enable_query_log +} + +INSERT INTO mdev19073 (title, body) VALUES + ('MariaDB Tutorial', 'DB means Database ...'); +INSERT INTO mdev19073_2 (title, body) VALUES + ('MariaDB Tutorial', 'DB means Database ...'); + +# Should return 2 rows +SELECT * FROM mdev19073 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +SELECT * FROM mdev19073_2 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); + +connection default; --source include/restart_mysqld.inc +disconnect dml; +disconnect dml2; # This would re-initialize the FTS index and do the re-tokenization # of above records @@ -138,3 +186,10 @@ AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE); DROP TABLE articles; + +# Should return 2 rows +SELECT * FROM mdev19073 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +SELECT * FROM mdev19073_2 WHERE MATCH (title, body) +AGAINST ('Database' IN NATURAL LANGUAGE MODE); +DROP TABLE mdev19073, mdev19073_2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/fulltext_table_evict.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/big_test.inc ---source include/have_64bit.inc - ---echo # ---echo # Bug Bug #27304661 MYSQL CRASH DOING SYNC INDEX ] ---echo # [FATAL] INNODB: SEMAPHORE WAIT HAS LASTED > 600 ---echo # - -CREATE TABLE t1 ( - id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, - f1 TEXT(500), - FULLTEXT idx (f1) - ) ENGINE=InnoDB; -insert into t1 (f1) values ('fjdhfsjhf'),('dhjfhjshfj'),('dhjafjhfj'); - ---source include/restart_mysqld.inc - -set @save_table_definition_cache=@@global.table_definition_cache; -set @save_table_open_cache=@@global.table_open_cache; - -set global table_definition_cache=400; -set global table_open_cache= 1024; - -SET @save_dbug = @@GLOBAL.debug_dbug; -SET GLOBAL DEBUG_DBUG="+d,crash_if_fts_table_is_evicted"; -#Create 1000 tables, try the best to evict t1 . - ---disable_query_log -let $loop=1000; -while($loop) -{ - eval create table t_$loop(id int, name text(100), fulltext idxt_$loop(name) )engine=innodb; - dec $loop; -} - -let $loop=1000; -while($loop) -{ - eval drop table t_$loop; - dec $loop; -} - -SET GLOBAL DEBUG_DBUG = @save_dbug; ---enable_query_log -set @@global.table_definition_cache=@save_table_definition_cache; -set @@global.table_open_cache=@save_table_open_cache; -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test 2020-01-26 18:37:28.000000000 +0000 @@ -7,10 +7,6 @@ let collation=UTF8_UNICODE_CI; --source include/have_collation.inc ---disable_warnings -drop table if exists t1; ---enable_warnings - # Create FTS table CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, @@ -403,10 +399,6 @@ #------------------------------------------------------------------------------ # More FTS test from peter's testing #------------------------------------------------------------------------------ ---disable_warnings -drop table if exists t50; ---enable_warnings - set names utf8; @@ -608,7 +600,6 @@ INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('ÅÅÅÅ'),('LLLL'),(NULL),('ÅÅÅÅ ÅÅÅÅ'),('LLLLLLLL'); SELECT * FROM t1 WHERE MATCH(s1) AGAINST ('LLLL' COLLATE UTF8_UNICODE_520_CI); -DROP TABLE if EXISTS t2; CREATE TABLE t2 (s1 VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_POLISH_CI) ENGINE = InnoDB; CREATE FULLTEXT INDEX i ON t2 ( s1); INSERT INTO t2 VALUES @@ -670,18 +661,24 @@ --echo "----------Test27---------" #27 Crash after server restart CREATE TABLE t1 (id INT,char_column VARCHAR(60)); +CREATE TABLE t2 (FTS_DOC_ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, a TEXT)ENGINE=InnoDB; +ALTER TABLE t2 DROP a; SET @@autocommit=0; CREATE FULLTEXT INDEX i ON t1 (char_column); INSERT INTO t1 values (1,'aaa'); -echo "restart server..." -# Restart the server + +CREATE TABLE mdev20987_1(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB; +CREATE TABLE mdev20987_2(f1 INT NOT NULL, f2 CHAR(100), + FULLTEXT(f2), + FOREIGN KEY(f1) REFERENCES mdev20987_1(f1))ENGINE=InnoDB; +INSERT INTO mdev20987_1 VALUES(1); +INSERT INTO mdev20987_2 VALUES(1, 'mariadb'); --source include/restart_mysqld.inc +SHOW CREATE TABLE t2; DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb'); -SET @@autocommit=1; -DROP TABLE t1; +DROP TABLE t1, t2, mdev20987_2, mdev20987_1; --echo "----------Test28---------" -drop table if exists `fts_test`; create table `fts_test`(`a` text,fulltext key(`a`))engine=innodb; set session autocommit=0; insert into `fts_test` values (''); @@ -870,8 +867,6 @@ # Test for Bug 13940669 - 64901: INNODB: ASSERTION FAILURE IN # THREAD 34387022112 IN FILE REM0CMP.CC LINE 5 -drop table if exists t1; - create table t1 (FTS_DOC_ID bigint unsigned auto_increment not null primary key, title varchar(200),body text,fulltext(title,body)) engine=innodb; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/sync_block.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/sync_block.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_fts/t/sync_block.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_fts/t/sync_block.test 2020-01-26 18:37:28.000000000 +0000 @@ -61,7 +61,7 @@ -- echo # slow log results should only contain INSERT INTO t1. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1; @@ -107,7 +107,7 @@ -- echo # slow log results should be empty here. SELECT sql_text FROM mysql.slow_log WHERE query_time >= '00:00:02'; -SET GLOBAL debug_dbug = @old_debug_dbug; +SET GLOBAL debug_dbug = @old_debug; TRUNCATE TABLE mysql.slow_log; DROP TABLE t1,t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/r/rtree_debug.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/r/rtree_debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/r/rtree_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/r/rtree_debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -42,7 +42,7 @@ SET debug_dbug='+d,row_merge_ins_spatial_fail'; create spatial index idx2 on t1(c2); ERROR HY000: Got error 1000 "Unknown error 1000" from storage engine InnoDB -SET debug_dbug = @save_dbug; +SET @@SESSION.debug_dbug = @save_dbug; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/t/rtree_debug.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/t/rtree_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -53,7 +53,7 @@ SET debug_dbug='+d,row_merge_ins_spatial_fail'; --error ER_GET_ERRNO create spatial index idx2 on t1(c2); -SET debug_dbug = @save_dbug; +SET @@SESSION.debug_dbug = @save_dbug; show create table t1; # Check table. diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/t/rtree_rollback1.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_rollback1.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/t/rtree_rollback1.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_rollback1.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,9 +1,6 @@ # WL#6745 InnoDB R-tree support # This test case will test R-tree split. -# Not supported in embedded ---source include/not_embedded.inc - --source include/have_innodb.inc --source include/big_test.inc --source include/not_valgrind.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/t/rtree_rollback2.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_rollback2.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_gis/t/rtree_rollback2.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_gis/t/rtree_rollback2.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,9 +1,6 @@ # WL#6745 InnoDB R-tree support # This test case will test R-tree split. -# Not supported in embedded ---source include/not_embedded.inc - --source include/have_innodb.inc --source include/big_test.inc --source include/not_valgrind.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/bug53591.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/bug53591.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/bug53591.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/bug53591.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); SET GLOBAL innodb_file_per_table=on; SET GLOBAL innodb_strict_mode=on; set old_alter_table=0; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/cmp_per_index.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/cmp_per_index.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/cmp_per_index.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/cmp_per_index.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,5 +1,4 @@ -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; -SET GLOBAL innodb_fast_shutdown=0; +SET @save_enabled= @@GLOBAL.innodb_cmp_per_index_enabled; SET GLOBAL innodb_cmp_per_index_enabled=ON; SELECT * FROM information_schema.innodb_cmp_per_index; CREATE TABLE t ( @@ -72,33 +71,5 @@ compress_ops 65 compress_ops_ok 65 uncompress_ops 0 -SHOW CREATE TABLE t; -Table t -Create Table CREATE TABLE `t` ( - `a` int(11) NOT NULL, - `b` varchar(512) DEFAULT NULL, - `c` varchar(16) DEFAULT NULL, - PRIMARY KEY (`a`), - KEY `b` (`b`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 -SET GLOBAL innodb_cmp_per_index_enabled=ON; -SELECT COUNT(*) FROM t IGNORE INDEX(b); -COUNT(*) 128 -SELECT -database_name, -table_name, -index_name, -compress_ops, -compress_ops_ok, -CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9 -ELSE uncompress_ops END as uncompress_ops -FROM information_schema.innodb_cmp_per_index -ORDER BY 1, 2, 3; -database_name test -table_name t -index_name PRIMARY -compress_ops 0 -compress_ops_ok 0 -uncompress_ops 4 DROP TABLE t; -SET GLOBAL innodb_cmp_per_index_enabled=default; +SET GLOBAL innodb_cmp_per_index_enabled=@save_enabled; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/prefix_index_liftedlimit.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); CREATE TABLE worklog5743 ( col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072)) diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/wl5522_zip.result mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/wl5522_zip.result --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/r/wl5522_zip.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/r/wl5522_zip.result 2020-01-26 18:37:28.000000000 +0000 @@ -410,7 +410,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Schema mismatch (Column c2 precise type mismatch.) +ERROR HY000: Schema mismatch (Column c2 precise type mismatch, it's 0X408 in the table and 0X403 in the tablespace meta file) unlink: t1.ibd unlink: t1.cfg DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/t/bug53591.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/bug53591.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/t/bug53591.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/bug53591.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,5 +1,7 @@ -- source include/innodb_page_size_small.inc +call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); + let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_per_table=on; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/t/cmp_per_index.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/cmp_per_index.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/t/cmp_per_index.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/cmp_per_index.test 2020-01-26 18:37:28.000000000 +0000 @@ -19,12 +19,9 @@ # include/restart_mysqld.inc does not work in embedded mode -- source include/not_embedded.inc -# ensure that all history gets purged on shutdown -SET GLOBAL innodb_purge_rseg_truncate_frequency=1; -SET GLOBAL innodb_fast_shutdown=0; - -- vertical_results +SET @save_enabled= @@GLOBAL.innodb_cmp_per_index_enabled; SET GLOBAL innodb_cmp_per_index_enabled=ON; # reset any leftover stats from previous tests @@ -96,29 +93,6 @@ uncompress_ops FROM information_schema.innodb_cmp_per_index ORDER BY 1, 2, 3; - -# restart mysqld and see that uncompress ops also gets increased when -# selecting from the table again - --- source include/restart_mysqld.inc - -SHOW CREATE TABLE t; - -SET GLOBAL innodb_cmp_per_index_enabled=ON; - -SELECT COUNT(*) FROM t IGNORE INDEX(b); - -SELECT -database_name, -table_name, -index_name, -compress_ops, -compress_ops_ok, -CASE WHEN uncompress_ops=6 and @@innodb_compression_level IN (4,8,9) THEN 9 -ELSE uncompress_ops END as uncompress_ops -FROM information_schema.innodb_cmp_per_index -ORDER BY 1, 2, 3; - DROP TABLE t; -SET GLOBAL innodb_cmp_per_index_enabled=default; +SET GLOBAL innodb_cmp_per_index_enabled=@save_enabled; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test --- mariadb-10.3-10.3.18/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/innodb_zip/t/prefix_index_liftedlimit.test 2020-01-26 18:37:28.000000000 +0000 @@ -15,6 +15,7 @@ --source include/have_innodb.inc --source include/have_innodb_16k.inc +call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is'); # Prefix index with VARCHAR data type , primary/secondary index and DML ops CREATE TABLE worklog5743 ( col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/json/r/json_no_table.result mariadb-10.3-10.3.22/mysql-test/suite/json/r/json_no_table.result --- mariadb-10.3-10.3.18/mysql-test/suite/json/r/json_no_table.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/json/r/json_no_table.result 2020-01-26 18:37:28.000000000 +0000 @@ -2396,7 +2396,7 @@ {"a": true, "b": false, "c": null} select json_valid( json_object( '"a"', 1 ) ); json_valid( json_object( '"a"', 1 ) ) -0 +1 select json_object( REPEAT('a', 64 * 1024), 1 ); json_object( REPEAT('a', 64 * 1024), 1 ) {"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": 1} diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/maria/aria_pack_mdev14183.result mariadb-10.3-10.3.22/mysql-test/suite/maria/aria_pack_mdev14183.result --- mariadb-10.3-10.3.18/mysql-test/suite/maria/aria_pack_mdev14183.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/maria/aria_pack_mdev14183.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,22 @@ +CREATE TABLE `t` ( +`col_1` varchar(255) NOT NULL DEFAULT '', +`col_2` varchar(255) NOT NULL, +`col_3` int(11) NOT NULL DEFAULT '0', +`col_4` int(11) NOT NULL DEFAULT '0' +) ENGINE=Aria TRANSACTIONAL=0 PAGE_CHECKSUM=0; +insert into t values +('foobar','qux',0,0),('abcdef','qux',0,0); +Compressing test/t.MAD: (2 records) +- Calculating statistics + +normal: 0 empty-space: 0 empty-zero: 0 empty-fill: 0 +pre-space: 0 end-space: 0 intervall-fields: 0 zero: 2 +Original trees: 4 After join: 1 +- Compressing file +Min record length: 5 Max length: 5 Mean total length: 35 +99.57% +SELECT * FROM t; +col_1 col_2 col_3 col_4 +foobar qux 0 0 +abcdef qux 0 0 +DROP TABLE t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/maria/aria_pack_mdev14183.test mariadb-10.3-10.3.22/mysql-test/suite/maria/aria_pack_mdev14183.test --- mariadb-10.3-10.3.18/mysql-test/suite/maria/aria_pack_mdev14183.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/maria/aria_pack_mdev14183.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,23 @@ +--source include/have_aria.inc +--source include/have_debug.inc +--source include/not_embedded.inc + +CREATE TABLE `t` ( + `col_1` varchar(255) NOT NULL DEFAULT '', + `col_2` varchar(255) NOT NULL, + `col_3` int(11) NOT NULL DEFAULT '0', + `col_4` int(11) NOT NULL DEFAULT '0' +) ENGINE=Aria TRANSACTIONAL=0 PAGE_CHECKSUM=0; + +insert into t values + ('foobar','qux',0,0),('abcdef','qux',0,0); + +--let $datadir= `SELECT @@datadir` +--source include/shutdown_mysqld.inc +# maria_pack crashes by assert() if the bug is not fixed +--exec cd $datadir && $MARIA_PACK -t test/t + +--source include/start_mysqld.inc +SELECT * FROM t; + +DROP TABLE t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/maria/icp.result mariadb-10.3-10.3.22/mysql-test/suite/maria/icp.result --- mariadb-10.3-10.3.18/mysql-test/suite/maria/icp.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/maria/icp.result 2020-01-26 18:37:28.000000000 +0000 @@ -167,7 +167,7 @@ ORDER BY ts DESC LIMIT 2; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using where +1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where DROP TABLE t1; # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/maria/lock.result mariadb-10.3-10.3.22/mysql-test/suite/maria/lock.result --- mariadb-10.3-10.3.18/mysql-test/suite/maria/lock.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/maria/lock.result 2020-01-26 18:37:28.000000000 +0000 @@ -109,6 +109,39 @@ ERROR 23000: Duplicate entry 'foo' for key 'f1' ALTER TABLE t1 ADD KEY (f2); DROP TABLE t1; +# +# MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE +# +CREATE TABLE t1 (a INT, b INT) ENGINE=Aria; +SELECT * FROM t1; +a b +CREATE TABLE t2 (c INT) ENGINE=Aria; +LOCK TABLE t2 READ, t1 WRITE; +ALTER TABLE t1 CHANGE b a INT; +ERROR 42S21: Duplicate column name 'a' +UNLOCK TABLES; +DROP TABLE t1, t2; +# +# MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE +# +CREATE TABLE t1 (a INT) ENGINE=Aria; +CREATE TABLE t2 (b INT) ENGINE=Aria; +LOCK TABLES t1 WRITE, t2 AS t2a WRITE, t2 WRITE; +ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY; +UNLOCK TABLES; +DROP TABLE t1, t2; +# More complex test, from RQG +CREATE TABLE t1 (a INT) ENGINE=Aria; +CREATE TABLE t2 (b INT) ENGINE=Aria; +CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2 ; +LOCK TABLES t1 WRITE, t2 AS t2a WRITE, v2 WRITE CONCURRENT, t2 WRITE; +ALTER TABLE t1 FORCE; +ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY +ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY; +UNLOCK TABLES; +DROP VIEW v2; +DROP TABLE t1, t2; # End of 10.2 tests # # MDEV-14669 Assertion `file->trn == trn' failed in ha_maria::start_stmt diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/maria/lock.test mariadb-10.3-10.3.22/mysql-test/suite/maria/lock.test --- mariadb-10.3-10.3.18/mysql-test/suite/maria/lock.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/maria/lock.test 2020-01-26 18:37:28.000000000 +0000 @@ -118,6 +118,52 @@ ALTER TABLE t1 ADD KEY (f2); DROP TABLE t1; + +--echo # +--echo # MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE +--echo # + +CREATE TABLE t1 (a INT, b INT) ENGINE=Aria; +SELECT * FROM t1; +CREATE TABLE t2 (c INT) ENGINE=Aria; + +LOCK TABLE t2 READ, t1 WRITE; +--error ER_DUP_FIELDNAME +ALTER TABLE t1 CHANGE b a INT; + +# Cleanup +UNLOCK TABLES; +DROP TABLE t1, t2; + +--echo # +--echo # MDEV-10748 Server crashes in ha_maria::implicit_commit upon ALTER TABLE +--echo # + +CREATE TABLE t1 (a INT) ENGINE=Aria; +CREATE TABLE t2 (b INT) ENGINE=Aria; + +LOCK TABLES t1 WRITE, t2 AS t2a WRITE, t2 WRITE; +ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY; +UNLOCK TABLES; +DROP TABLE t1, t2; + +--echo # More complex test, from RQG + +CREATE TABLE t1 (a INT) ENGINE=Aria; +CREATE TABLE t2 (b INT) ENGINE=Aria; +CREATE OR REPLACE VIEW v2 AS SELECT * FROM t2 ; + +LOCK TABLES t1 WRITE, t2 AS t2a WRITE, v2 WRITE CONCURRENT, t2 WRITE; + +ALTER TABLE t1 FORCE; +--error ER_ALTER_OPERATION_NOT_SUPPORTED +ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=INPLACE; +ALTER TABLE t2 CHANGE b c VARBINARY(30000), ALGORITHM=COPY; + +UNLOCK TABLES; +DROP VIEW v2; +DROP TABLE t1, t2; + --echo # End of 10.2 tests --echo # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/extra_lsndir_stream.result mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/extra_lsndir_stream.result --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/extra_lsndir_stream.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/extra_lsndir_stream.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,2 @@ +xtrabackup_checkpoints +xtrabackup_info diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/extra_lsndir_stream.test mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/extra_lsndir_stream.test --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/extra_lsndir_stream.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/extra_lsndir_stream.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,7 @@ +let $extra_lsndir=$MYSQLTEST_VARDIR/tmp/extra_lsndir; +mkdir $extra_lsndir; +--disable_result_log +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --stream=xbstream --extra-lsndir=$extra_lsndir > /dev/null; +--enable_result_log +list_files $extra_lsndir; +rmdir $extra_lsndir; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/incremental_backup.result mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/incremental_backup.result --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/incremental_backup.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/incremental_backup.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,5 @@ call mtr.add_suppression("InnoDB: New log files created"); +CREATE TABLE t_aria(i INT) ENGINE ARIA; CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; BEGIN; INSERT INTO t VALUES(2); @@ -11,11 +12,13 @@ DELETE FROM t WHERE i=0; connection default; COMMIT; +# Generate enough aria log records to increase area log file size SELECT * FROM t; i 1 2 # Prepare full backup, apply incremental one +# Aria log file was updated during applying incremental backup disconnect con1; # Restore and check results # shutdown server @@ -27,3 +30,4 @@ 1 2 DROP TABLE t; +DROP TABLE t_aria; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/incremental_backup.test mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/incremental_backup.test --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/incremental_backup.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/incremental_backup.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,10 +1,12 @@ +--source include/have_aria.inc --source include/innodb_page_size.inc call mtr.add_suppression("InnoDB: New log files created"); -let $basedir=$MYSQLTEST_VARDIR/tmp/backup; -let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; +let basedir=$MYSQLTEST_VARDIR/tmp/backup; +let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; +CREATE TABLE t_aria(i INT) ENGINE ARIA; CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB; BEGIN; INSERT INTO t VALUES(2); @@ -14,21 +16,73 @@ 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; +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir; --enable_result_log BEGIN; INSERT INTO t VALUES(0); DELETE FROM t WHERE i=0; connection default; COMMIT; + +--echo # Generate enough aria log records to increase area log file size +--disable_query_log +--disable_result_log +INSERT INTO t_aria VALUES + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), + (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); +--let $i = 4 +while ($i) { +INSERT INTO t_aria SELECT * FROM seq_1_to_2000; +--dec $i +} +--enable_query_log +--enable_result_log + SELECT * FROM t; -exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir; +# wf_incremental_init() allocates (page_size/4)*page_size bytes with mmap() +# in each data file copy thread, what can fail on 32-bit platforms if threads +# are too much, that's why don't set too big --parallel option value. +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=2 --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir; --disable_result_log echo # Prepare full backup, apply incremental one; exec $XTRABACKUP --prepare --target-dir=$basedir; exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ; +let perl_result_file=$MYSQLTEST_VARDIR/tmp/check_file_size_result.inc; + +--perl END_OF_FILE + use strict; + use warnings; + + my $dst_file = "$ENV{'basedir'}/aria_log.00000001"; + my $src_file = "$ENV{'incremental_dir'}/aria_log.00000001"; + my $out_file = $ENV{'perl_result_file'}; + + my $dst_size = -s $dst_file; + my $src_size = -s $src_file; + + open (my $output, '>', $out_file) or die $!; + if ($dst_size >= $src_size) { + print $output '--echo # Aria log file was updated during applying incremental backup'."\n"; + } + else { + print $output '--echo # Aria log file was NOT updated during applying incremental backup'."\n"; + } + close $output; +END_OF_FILE + +--source $perl_result_file +--remove_file $perl_result_file + disconnect con1; echo # Restore and check results; let $targetdir=$basedir; @@ -37,6 +91,7 @@ SELECT * FROM t; DROP TABLE t; +DROP TABLE t_aria; # Cleanup rmdir $basedir; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--loose-innodb-log-file-size=1048576 --loose-innodb-log-files-in-group=2 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,2 @@ +CREATE TABLE t(i INT) ENGINE=INNODB; +DROP TABLE t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/innodb_redo_log_overwrite.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,20 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_sequence.inc + +CREATE TABLE t(i INT) ENGINE=INNODB; + +--let $targetdir=$MYSQLTEST_VARDIR/tmp/backup + +# Generate enough redo log records to make at least one loop in log group +--let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * from test.seq_1_to_102400 + +--disable_result_log +# mariabackup must exit with error instead of hanging +--error 1 +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events; +--enable_result_log + +DROP TABLE t; +--rmdir $targetdir + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/mdev-18438.result mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/mdev-18438.result --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/mdev-18438.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/mdev-18438.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +stream.xb diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/mdev-18438.test mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/mdev-18438.test --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/mdev-18438.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/mdev-18438.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,11 @@ +let $basedir=$MYSQLTEST_VARDIR/tmp/mdev-18438; +mkdir $basedir; +exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --extra-lsndir=$basedir/extra_lsndir --stream=xbstream > $basedir/stream.xb; +mkdir $basedir/backup; +rmdir $basedir/extra_lsndir; +--disable_result_log +exec $XBSTREAM -x -C $basedir/backup < $basedir/stream.xb; +--enable_result_log +rmdir $basedir/backup; +list_files $basedir; +rmdir $basedir; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/partial.test mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/partial.test --- mariadb-10.3-10.3.18/mysql-test/suite/mariabackup/partial.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/mariabackup/partial.test 2020-01-26 18:37:28.000000000 +0000 @@ -12,7 +12,7 @@ echo # xtrabackup backup; -let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; +let targetdir=$MYSQLTEST_VARDIR/tmp/backup; --disable_result_log exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables=test.*1" --target-dir=$targetdir; --enable_result_log @@ -25,13 +25,27 @@ write_file $targetdir/test/junk.frm; EOF +let server_cnf=$targetdir/server.cnf; +copy_file $MYSQLTEST_VARDIR/my.cnf $server_cnf; + +# Emulate server config file turnes on binary logs +perl; +my $binlog_path="$ENV{'targetdir'}/mysqld-bin"; +my $config_path=$ENV{'server_cnf'}; +open(my $fd, '>>', "$config_path"); +print $fd "\n[mysqld]\n"; +print $fd "log-bin=$binlog_path\n"; +close $fd; +EOF echo # xtrabackup prepare; --disable_result_log -exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir; +exec $XTRABACKUP --defaults-file=$server_cnf --defaults-group-suffix=.1 --prepare --export --target-dir=$targetdir; --enable_result_log list_files $targetdir/test *.cfg; +# There must not be binary logs created on --prepare step +list_files $targetdir/ mysqld-bin.*; let $MYSQLD_DATADIR= `select @@datadir`; ALTER TABLE t1 DISCARD TABLESPACE; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; create table `t1` (`c1` char(1) default null,`c2` char(10) default null, key (`c1`)) @@ -7,3 +8,4 @@ c1 c2 3 NULL drop table `t1`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ # # Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on # +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t ( dummy INT PRIMARY KEY, @@ -13,3 +14,4 @@ 3 3 3 5 5 5 DROP TABLE t; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; drop table if exists `t1`; Warnings: @@ -6,3 +7,4 @@ insert into `t1` values(2,2); delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ; drop table `t1`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -252,3 +253,4 @@ Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DOUBLE value: 'd' drop table `table5`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY KEY(c1), UNIQUE INDEX(c2)) engine=innodb; @@ -9,3 +10,4 @@ c1 c2 c3 08:29:45 NULL 2009-02-01 drop table `t1`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ # # Bug#43360 - Server crash with a simple multi-table update # +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1 ( a CHAR(2) NOT NULL PRIMARY KEY, @@ -42,3 +43,4 @@ MS United States of Ame JA USA DROP TABLE t1,t2; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ # # Bug#43448 - Server crashes on multi table delete with Innodb # +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1 ( id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -28,3 +29,4 @@ FROM t1, t2, t3 WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5; DROP TABLE t1, t2, t3; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ set storage_engine=innodb; set @save_time_zone= @@time_zone; set time_zone='+03:00'; +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2)); INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28'); @@ -100,3 +101,4 @@ 2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00 DROP TABLE t1; set time_zone= @save_time_zone; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test 2020-01-26 18:37:28.000000000 +0000 @@ -4,6 +4,7 @@ --source include/have_innodb.inc # crash requires this +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; create table `t1` (`c1` char(1) default null,`c2` char(10) default null, @@ -12,3 +13,4 @@ insert into `t1` values ('3',null); select * from `t1` where `c1`='3' for update; drop table `t1`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,6 +5,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +SET @saved_dbug = @@SESSION.debug_dbug; # Crash requires that we enable Index Condition Pushdown in InnoDB set session debug_dbug="+d,optimizer_innodb_icp"; @@ -19,3 +20,4 @@ SELECT * FROM t WHERE a > 2 FOR UPDATE; DROP TABLE t; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,6 +5,7 @@ --source include/have_innodb.inc # crash requires this +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; drop table if exists `t1`; @@ -12,3 +13,4 @@ insert into `t1` values(2,2); delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ; drop table `t1`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ --source include/have_innodb.inc +SET @saved_dbug = @@SESSION.debug_dbug; # Valgrind errors happen only with this: set session debug_dbug="+d,optimizer_innodb_icp"; @@ -246,3 +247,4 @@ select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ; drop table `table5`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test 2020-01-26 18:37:28.000000000 +0000 @@ -4,6 +4,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY @@ -15,3 +16,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; drop table `t1`; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +SET @saved_dbug = @@SESSION.debug_dbug; # crash requires this set session debug_dbug="+d,optimizer_innodb_icp"; @@ -42,3 +43,4 @@ SELECT * FROM t2; DROP TABLE t1,t2; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,6 +5,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +SET @saved_dbug = @@SESSION.debug_dbug; # crash requires ICP support in InnoDB set session debug_dbug="+d,optimizer_innodb_icp"; @@ -58,3 +59,4 @@ WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5; DROP TABLE t1, t2, t3; +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test --- mariadb-10.3-10.3.18/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ set storage_engine=innodb; set @save_time_zone= @@time_zone; set time_zone='+03:00'; +SET @saved_dbug = @@SESSION.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; ######## Running INSERT tests for TIMESTAMP ######## @@ -83,4 +84,4 @@ DROP TABLE t1; set time_zone= @save_time_zone; - +SET debug_dbug= @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_add.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_add.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_add.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_add.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1,33 +1,34 @@ # To be used with partition mgm commands like # ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING). --echo # Crash testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_add_partition_1"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_2"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_3"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_4"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_5"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_6"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_7"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_8"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_9"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_10"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_change.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_change.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_change.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_change.inc 2020-01-26 18:37:28.000000000 +0000 @@ -2,39 +2,40 @@ # ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION. --echo # Test change partition (REORGANIZE/REBUILD/COALESCE --echo # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_change_partition_1"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_2"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_3"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_4"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_5"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_6"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_7"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_8"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_9"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_10"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_11"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_12"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_drop.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_drop.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_drop.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_drop.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1,30 +1,31 @@ # To be used with partition mgm commands like # ALTER TABLE t1 DROP PARTITION. --echo # Test DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_1"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_2"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_3"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_4"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_5"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_6"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_7"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_8"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_9"; --source suite/parts/inc/partition_crash.inc -SET SESSION debug_dbug="-d,crash_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_exchange.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_exchange.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_crash_exchange.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_crash_exchange.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1,29 +1,30 @@ # To be used with WL#4445: EXCHANGE PARTITION WITH TABLE. +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_1"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_2"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_3"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_4"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_5"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_6"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_7"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_8"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_9"; --source suite/parts/inc/partition_crash_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_abort_9"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_add.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_add.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_add.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_add.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1,33 +1,34 @@ # To be used with partition mgm commands like # ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING). --echo # Error recovery testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_add_partition_1"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_2"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_3"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_4"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_5"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_6"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_7"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_8"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_9"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_10"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_change.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_change.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_change.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_change.inc 2020-01-26 18:37:28.000000000 +0000 @@ -2,39 +2,40 @@ # ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION. --echo # Error recovery change partition (REORGANIZE/REBUILD/COALESCE --echo # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_change_partition_1"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_2"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_3"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_4"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_5"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_6"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_7"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_8"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_9"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_10"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_11"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_12"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_drop.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_drop.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_drop.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_drop.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1,30 +1,31 @@ # To be used with partition mgm commands like # ALTER TABLE t1 DROP PARTITION. --echo # Error recovery DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_1"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_2"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_3"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_4"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_5"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_6"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_7"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_8"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_9"; --source suite/parts/inc/partition_fail.inc -SET SESSION debug_dbug="-d,fail_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_exchange.inc mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_exchange.inc --- mariadb-10.3-10.3.18/mysql-test/suite/parts/inc/partition_fail_exchange.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/inc/partition_fail_exchange.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1,27 +1,28 @@ +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_1"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_2"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_3"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_4"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_5"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_6"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_7"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_8"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_9"; --source suite/parts/inc/partition_fail_t2.inc -SET SESSION debug_dbug="-d,exchange_partition_fail_9"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/r/alter_data_directory_innodb.result mariadb-10.3-10.3.22/mysql-test/suite/parts/r/alter_data_directory_innodb.result --- mariadb-10.3-10.3.18/mysql-test/suite/parts/r/alter_data_directory_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/r/alter_data_directory_innodb.result 2020-01-26 18:37:28.000000000 +0000 @@ -57,6 +57,9 @@ PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB ); +Warnings: +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition SHOW CREATE TABLE t; Table Create Table t CREATE TABLE `t` ( diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/r/partition_debug.result mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/parts/r/partition_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1; # # Bug#13737949: CRASH IN HA_PARTITION::INDEX_INIT # Bug#18694052: SERVER CRASH IN HA_PARTITION::INIT_RECORD_PRIORITY_QUEUE @@ -7,10 +6,11 @@ PARTITION BY HASH (a) PARTITIONS 3; INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"), (6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine"); +SET @saved_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,ha_partition_fail_index_init"; SELECT * FROM t1 WHERE b = "Seven"; ERROR HY000: Table has no partition for value 0 -SET SESSION debug_dbug="-d,ha_partition_fail_index_init"; +SET SESSION debug_dbug=@saved_dbug; SELECT * FROM t1 WHERE b = "Seven"; a b 7 Seven @@ -20,6 +20,7 @@ # Verify ddl_log in case of crashing. call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); call mtr.add_suppression('InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!'); +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_1"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -134,7 +135,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_2"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -249,7 +250,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_3"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -364,7 +365,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_4"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -479,7 +480,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_5"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -594,7 +595,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_6"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -709,7 +710,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_7"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -824,7 +825,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_8"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -939,7 +940,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_9"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1054,7 +1055,8 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_9"; +SET SESSION debug_dbug=@save_dbug; +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_1"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1158,7 +1160,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_2"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1262,7 +1264,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_3"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1366,7 +1368,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_4"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1470,7 +1472,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_5"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1574,7 +1576,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_6"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1678,7 +1680,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_7"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1782,7 +1784,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_8"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1886,7 +1888,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_9"; CREATE TABLE t2 (a INT, b VARCHAR(64)); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -1990,4 +1992,4 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_9"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/r/partition_debug_innodb.result mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug_innodb.result --- mariadb-10.3-10.3.18/mysql-test/suite/parts/r/partition_debug_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug_innodb.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1; call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was"); call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal"); call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table "); @@ -12,6 +11,7 @@ call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); flush tables; # Crash testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_add_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -79,7 +79,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -149,7 +149,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -219,7 +219,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -289,7 +289,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -360,7 +360,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -431,7 +431,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -502,7 +502,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -575,7 +575,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -646,7 +646,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -717,8 +717,9 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; # Error recovery testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_add_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -843,7 +844,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -968,7 +969,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1093,7 +1094,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1218,7 +1219,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1343,7 +1344,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1468,7 +1469,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1593,7 +1594,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1722,7 +1723,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1851,7 +1852,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -1980,8 +1981,9 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; # Test DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2048,7 +2050,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2117,7 +2119,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2186,7 +2188,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2249,7 +2251,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2312,7 +2314,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2375,7 +2377,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2436,7 +2438,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2496,7 +2498,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2556,8 +2558,9 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; # Error recovery DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2680,7 +2683,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2803,7 +2806,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -2926,7 +2929,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3037,7 +3040,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3148,7 +3151,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3259,7 +3262,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3370,7 +3373,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3481,7 +3484,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3592,9 +3595,10 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; # Test change partition (REORGANIZE/REBUILD/COALESCE # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_change_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3663,7 +3667,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3734,7 +3738,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3805,7 +3809,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3878,7 +3882,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -3951,7 +3955,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4024,7 +4028,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4099,7 +4103,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4174,7 +4178,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4247,7 +4251,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4320,7 +4324,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_11"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4392,7 +4396,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_12"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4464,9 +4468,10 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; # Error recovery change partition (REORGANIZE/REBUILD/COALESCE # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_change_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4593,7 +4598,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4720,7 +4725,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4847,7 +4852,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -4974,7 +4979,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5101,7 +5106,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5228,7 +5233,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5359,7 +5364,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5490,7 +5495,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5621,7 +5626,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5752,7 +5757,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_11"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -5883,7 +5888,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_12"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'InnoDB' @@ -6014,13 +6019,14 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; # # WL#4445: EXCHANGE PARTITION WITH TABLE # Verify ddl_log and InnoDB in case of crashing. call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was "); call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); call mtr.add_suppression("table .* does not exist in the InnoDB internal"); +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_1"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6128,7 +6134,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_2"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6236,7 +6242,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_3"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6344,7 +6350,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_4"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6452,7 +6458,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_5"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6560,7 +6566,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_6"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6668,7 +6674,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_7"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6776,7 +6782,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_8"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6884,7 +6890,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_9"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6992,7 +6998,8 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_9"; +SET SESSION debug_dbug=@save_dbug; +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_1"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7092,7 +7099,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_2"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7192,7 +7199,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_3"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7292,7 +7299,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_4"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7392,7 +7399,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_5"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7492,7 +7499,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_6"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7592,7 +7599,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_7"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7692,7 +7699,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_8"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7792,7 +7799,7 @@ 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_9"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7892,4 +7899,4 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_9"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/r/partition_debug_myisam.result mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug_myisam.result --- mariadb-10.3-10.3.18/mysql-test/suite/parts/r/partition_debug_myisam.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/r/partition_debug_myisam.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1; # Test crash and failure recovery in fast_alter_partition_table. # # Bug#53676: Unexpected errors and possible table corruption on @@ -9,6 +8,7 @@ call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); flush tables; # Crash testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_add_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -82,7 +82,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -158,7 +158,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -234,7 +234,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -310,7 +310,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -388,7 +388,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -466,7 +466,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -544,7 +544,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -625,7 +625,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -704,7 +704,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -783,8 +783,9 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; # Error recovery testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_add_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -917,7 +918,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1050,7 +1051,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1183,7 +1184,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1316,7 +1317,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1449,7 +1450,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1582,7 +1583,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1715,7 +1716,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1854,7 +1855,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -1993,7 +1994,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2132,8 +2133,9 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; # Test DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2206,7 +2208,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2281,7 +2283,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2356,7 +2358,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2424,7 +2426,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2492,7 +2494,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2560,7 +2562,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2626,7 +2628,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2690,7 +2692,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2754,8 +2756,9 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; # Error recovery DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -2886,7 +2889,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3017,7 +3020,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3148,7 +3151,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3265,7 +3268,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3382,7 +3385,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3499,7 +3502,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3616,7 +3619,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3733,7 +3736,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3850,9 +3853,10 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; # Test change partition (REORGANIZE/REBUILD/COALESCE # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_change_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -3927,7 +3931,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4004,7 +4008,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4081,7 +4085,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4162,7 +4166,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4243,7 +4247,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4324,7 +4328,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4408,7 +4412,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4492,7 +4496,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4574,7 +4578,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4656,7 +4660,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_11"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4736,7 +4740,7 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_12"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4816,9 +4820,10 @@ 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; # Error recovery change partition (REORGANIZE/REBUILD/COALESCE # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_change_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -4953,7 +4958,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5088,7 +5093,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5223,7 +5228,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5358,7 +5363,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5493,7 +5498,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5628,7 +5633,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5769,7 +5774,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -5910,7 +5915,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -6051,7 +6056,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -6192,7 +6197,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_11"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -6333,7 +6338,7 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_12"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'MyISAM' @@ -6474,4 +6479,4 @@ 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/r/reorganize_partition_innodb.result mariadb-10.3-10.3.22/mysql-test/suite/parts/r/reorganize_partition_innodb.result --- mariadb-10.3-10.3.18/mysql-test/suite/parts/r/reorganize_partition_innodb.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/r/reorganize_partition_innodb.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,160 @@ +# +# MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally not in the datadir) to the datadir +# +CREATE TABLE t ( +a INT NOT NULL +) ENGINE=INNODB +PARTITION BY HASH (a) ( +PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB, +PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB +); +INSERT INTO t VALUES (1); +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +ALTER TABLE t ADD PRIMARY KEY pk(a), ALGORITHM=INPLACE; +Warnings: +Warning 1280 Name 'pk' ignored for PRIMARY key. +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +ALTER TABLE t DROP PRIMARY KEY, ALGORITHM=COPY; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +SET @TMP = @@GLOBAL.INNODB_FILE_PER_TABLE; +SET GLOBAL INNODB_FILE_PER_TABLE=OFF; +ALTER TABLE t ADD PRIMARY KEY pk(a), ALGORITHM=INPLACE; +Warnings: +Warning 1280 Name 'pk' ignored for PRIMARY key. +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +SET GLOBAL INNODB_FILE_PER_TABLE=@TMP; +ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( +PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB, +PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB +); +Warnings: +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( +PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/', +PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' +); +Warnings: +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( +PARTITION p1 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB, +PARTITION p2 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB +); +Warnings: +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY HASH (`a`) +(PARTITION `p1` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB, + PARTITION `p2` DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here' ENGINE = InnoDB) +DROP TABLE t; +SET @strict = @@innodb_strict_mode; +SET innodb_strict_mode=OFF; +CREATE TABLE t ( +a INT NOT NULL +) ENGINE=INNODB +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +SUBPARTITIONS 2 +( +PARTITION p1 VALUES LESS THAN (7) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' + INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' + ENGINE = INNODB, +PARTITION p2 VALUES LESS THAN MAXVALUE +DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' + INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_here/' + ENGINE = INNODB +); +Warnings: +Warning 1618 option ignored +Warning 1618 option ignored +Warning 1618 option ignored +Warning 1618 option ignored +SET innodb_strict_mode=@strict; +ALTER TABLE t +REORGANIZE PARTITION p1,p2 INTO +( +PARTITION p1 VALUES LESS THAN (7) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + ENGINE = INNODB, +PARTITION p2 VALUES LESS THAN MAXVALUE +DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + ENGINE = INNODB +); +Warnings: +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +Warning 1982 option ignored for InnoDB partition +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 + PARTITION BY RANGE (`a`) +SUBPARTITION BY HASH (`a`) +SUBPARTITIONS 2 +(PARTITION `p1` VALUES LESS THAN (7) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = InnoDB, + PARTITION `p2` VALUES LESS THAN MAXVALUE DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = InnoDB) +DROP TABLE t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/t/partition_debug.test mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/parts/t/partition_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -8,10 +8,6 @@ # Crash tests don't work with embedded --source include/not_embedded.inc ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - # Partitioning test that require debug features --echo # @@ -22,10 +18,11 @@ PARTITION BY HASH (a) PARTITIONS 3; INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"), (6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine"); +SET @saved_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,ha_partition_fail_index_init"; --error ER_NO_PARTITION_FOR_GIVEN_VALUE SELECT * FROM t1 WHERE b = "Seven"; -SET SESSION debug_dbug="-d,ha_partition_fail_index_init"; +SET SESSION debug_dbug=@saved_dbug; SELECT * FROM t1 WHERE b = "Seven"; DROP TABLE t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/t/partition_debug_innodb.test mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug_innodb.test --- mariadb-10.3-10.3.18/mysql-test/suite/parts/t/partition_debug_innodb.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug_innodb.test 2020-01-26 18:37:28.000000000 +0000 @@ -9,10 +9,6 @@ # Crash tests don't work with embedded --source include/not_embedded.inc ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - --let $DATADIR= `SELECT @@datadir;` # Waiting for wl#6723 @@ -34,6 +30,7 @@ ALTER TABLE t1 ADD INDEX new_b_index (b); ALTER TABLE t1 DROP INDEX new_b_index; +SET @saved_dbug=@@debug_dbug; SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index"; --error ER_NO_PARTITION_FOR_GIVEN_VALUE @@ -49,7 +46,7 @@ --sorted_result SELECT * FROM t1; -SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index"; +SET SESSION debug_dbug = @saved_dbug; SHOW CREATE TABLE t1; DROP TABLE t1; } diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/t/partition_debug_myisam.test mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug_myisam.test --- mariadb-10.3-10.3.18/mysql-test/suite/parts/t/partition_debug_myisam.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/t/partition_debug_myisam.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,10 +6,6 @@ --source include/not_valgrind.inc --source include/not_embedded.inc ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - --let $DATADIR= `SELECT @@datadir;` let $engine= 'MyISAM'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/parts/t/reorganize_partition_innodb.test mariadb-10.3-10.3.22/mysql-test/suite/parts/t/reorganize_partition_innodb.test --- mariadb-10.3-10.3.18/mysql-test/suite/parts/t/reorganize_partition_innodb.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/parts/t/reorganize_partition_innodb.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,103 @@ +--source include/have_innodb.inc +--source include/have_partition.inc + +--echo # +--echo # MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally not in the datadir) to the datadir +--echo # + +mkdir $MYSQLTEST_VARDIR/tmp/partitions_here; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t ( + a INT NOT NULL + ) ENGINE=INNODB +PARTITION BY HASH (a) ( + PARTITION p1 DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB, + PARTITION p2 DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_here/' ENGINE = INNODB +); +INSERT INTO t VALUES (1); + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; +ALTER TABLE t ADD PRIMARY KEY pk(a), ALGORITHM=INPLACE; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; +ALTER TABLE t DROP PRIMARY KEY, ALGORITHM=COPY; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; +SET @TMP = @@GLOBAL.INNODB_FILE_PER_TABLE; +SET GLOBAL INNODB_FILE_PER_TABLE=OFF; +ALTER TABLE t ADD PRIMARY KEY pk(a), ALGORITHM=INPLACE; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; +SET GLOBAL INNODB_FILE_PER_TABLE=@TMP; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( + PARTITION p1 DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB, + PARTITION p2 DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB +); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( + PARTITION p1 DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/', + PARTITION p2 DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' +); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval ALTER TABLE t REORGANIZE PARTITION p1,p2 INTO ( + PARTITION p1 INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB, + PARTITION p2 INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' ENGINE = INNODB +); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; + +DROP TABLE t; + +SET @strict = @@innodb_strict_mode; +SET innodb_strict_mode=OFF; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t ( + a INT NOT NULL + ) ENGINE=INNODB +PARTITION BY RANGE (a) + SUBPARTITION BY HASH (a) + SUBPARTITIONS 2 + ( + PARTITION p1 VALUES LESS THAN (7) + DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_here/' + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_here/' + ENGINE = INNODB, + PARTITION p2 VALUES LESS THAN MAXVALUE + DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_here/' + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_here/' + ENGINE = INNODB + ); +SET innodb_strict_mode=@strict; + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval ALTER TABLE t +REORGANIZE PARTITION p1,p2 INTO +( + PARTITION p1 VALUES LESS THAN (7) + DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + ENGINE = INNODB, + PARTITION p2 VALUES LESS THAN MAXVALUE + DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp/partitions_somewhere_else/' + ENGINE = INNODB +); + +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t; + +DROP TABLE t; + +rmdir $MYSQLTEST_VARDIR/tmp/partitions_here/test; +rmdir $MYSQLTEST_VARDIR/tmp/partitions_here; + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN set revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN set revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN null revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -103,4 +104,4 @@ revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; uninstall plugin test_plugin_server; ERROR HY000: Plugin 'test_plugin_server' is not loaded @@ -194,5 +195,5 @@ FROM 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply"; ERROR 08S01: Bad handshake connection default; @@ -427,4 +428,4 @@ revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,; select "Con2a is alive"; @@ -702,4 +703,4 @@ set global max_connections = @saved_max_connections; set global max_user_connections = @saved_max_user_connections; drop user 'quota'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -178,4 +179,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -142,4 +143,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN set revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES) connection default; @@ -207,4 +208,4 @@ LAST_ERROR_SEEN set drop user 'user_with'@'santa.claus.ipv4.example.com'; drop user 'user_without'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result 2020-01-26 18:37:28.000000000 +0000 @@ -28,6 +28,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO) connection default; @@ -151,4 +152,4 @@ LAST_ERROR_SEEN set drop user 'user_ssl'@'santa.claus.ipv4.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN set revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN set revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN null revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -19,6 +19,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server connection default; @@ -80,4 +81,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -103,4 +104,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; uninstall plugin test_plugin_server; ERROR HY000: Plugin 'test_plugin_server' is not loaded @@ -194,5 +195,5 @@ FROM 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply"; ERROR 08S01: Bad handshake connection default; @@ -427,4 +428,4 @@ revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect con2a,"::1",quota,,test,$MASTER_MYPORT,; select "Con2a is alive"; @@ -702,4 +703,4 @@ set global max_connections = @saved_max_connections; set global max_user_connections = @saved_max_user_connections; drop user 'quota'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -178,4 +179,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -142,4 +143,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ LAST_ERROR_SEEN set revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result 2020-01-26 18:37:28.000000000 +0000 @@ -20,6 +20,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES) connection default; @@ -207,4 +208,4 @@ LAST_ERROR_SEEN set drop user 'user_with'@'santa.claus.ipv6.example.com'; drop user 'user_without'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result 2020-01-26 18:37:28.000000000 +0000 @@ -28,6 +28,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO) connection default; @@ -151,4 +152,4 @@ LAST_ERROR_SEEN set drop user 'user_ssl'@'santa.claus.ipv6.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_peer_addr.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_peer_addr.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/hostcache_peer_addr.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/hostcache_peer_addr.result 2020-01-26 18:37:28.000000000 +0000 @@ -27,6 +27,7 @@ root@localhost disconnect con1; connection default; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_error"; ERROR HY000: Can't get hostname for your address connection default; @@ -50,7 +51,7 @@ Connection_errors_select 0 Connection_errors_tcpwrap 0 "Dumping performance_schema.host_cache" -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; flush status; show global status like "connection_errors_%"; Variable_name Value diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/misc.result mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/misc.result --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/r/misc.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/r/misc.result 2020-01-26 18:37:28.000000000 +0000 @@ -134,3 +134,19 @@ select * from t1 3 insert into t1 select RAND()*10000 from t1 6 drop table t1; +# +# MDEV-17896 Assertion `pfs->get_refcount() > 0' failed +# in release_table_share +# +SELECT COUNT(*)<@@performance_schema_max_table_instances FROM +performance_schema.objects_summary_global_by_type WHERE OBJECT_TYPE='TABLE'; +COUNT(*)<@@performance_schema_max_table_instances +1 +CREATE TABLE t0(a INT); +SELECT * FROM t0; +a +DROP TEMPORARY TABLE IF EXISTS t0; +Warnings: +Note 1051 Unknown table 'test.t0' +FLUSH TABLE t0; +DROP TABLE t0; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/ddl_esms_by_digest.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,13 +1,20 @@ # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # # 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 Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/dml_esms_by_digest.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/dml_esms_by_digest.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/dml_esms_by_digest.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/dml_esms_by_digest.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,13 +1,20 @@ # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # # 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 Foundation; version 2 of the License. +# it under the terms of the GNU General Public License, version 2.0, +# as published by the Free Software Foundation. +# +# This program is also distributed with certain software (including +# but not limited to OpenSSL) that is licensed under separate terms, +# as designated in a particular file or component or in included license +# documentation. The authors of MySQL hereby grant you an additional +# permission to link the program and your derivative works with the +# separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -27,6 +27,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -48,5 +49,5 @@ revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; --disable_query_log @@ -43,5 +44,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -30,6 +30,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -51,5 +52,5 @@ revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -27,6 +27,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; --disable_query_log @@ -45,5 +46,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -28,6 +28,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -49,5 +50,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; --disable_query_log @@ -43,5 +44,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -30,6 +30,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -53,5 +54,5 @@ drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; --disable_query_log @@ -43,5 +44,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test 2020-01-26 18:37:28.000000000 +0000 @@ -30,6 +30,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; uninstall plugin test_plugin_server; @@ -86,6 +87,6 @@ DROP USER 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test 2020-01-26 18:37:28.000000000 +0000 @@ -33,6 +33,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply"; --disable_query_log @@ -156,5 +157,5 @@ drop user 'quota'@'santa.claus.ipv4.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test 2020-01-26 18:37:28.000000000 +0000 @@ -24,6 +24,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4"; --disable_query_log @@ -42,5 +43,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect (con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,); @@ -259,5 +260,5 @@ # revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -30,6 +30,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -71,5 +72,5 @@ drop user 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; --disable_query_log @@ -61,5 +62,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -28,6 +28,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -49,5 +50,5 @@ revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -25,6 +25,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; --disable_query_log @@ -43,5 +44,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test 2020-01-26 18:37:28.000000000 +0000 @@ -29,6 +29,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; --disable_query_log @@ -82,5 +83,5 @@ drop user 'user_with'@'santa.claus.ipv4.example.com'; drop user 'user_without'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test 2020-01-26 18:37:28.000000000 +0000 @@ -30,6 +30,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; --disable_query_log @@ -67,5 +68,5 @@ drop user 'user_ssl'@'santa.claus.ipv4.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -29,6 +29,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -50,5 +51,5 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -26,6 +26,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; --disable_query_log @@ -44,5 +45,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -52,5 +53,5 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -28,6 +28,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; --disable_query_log @@ -46,5 +47,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -29,6 +29,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -50,5 +51,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; --disable_query_log @@ -40,5 +41,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -54,5 +55,4 @@ drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; - +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -26,6 +26,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; --disable_query_log @@ -44,5 +45,4 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; - +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; uninstall plugin test_plugin_server; @@ -87,6 +88,6 @@ DROP USER 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test 2020-01-26 18:37:28.000000000 +0000 @@ -33,6 +33,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply"; --disable_query_log @@ -156,5 +157,5 @@ drop user 'quota'@'santa.claus.ipv6.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test 2020-01-26 18:37:28.000000000 +0000 @@ -32,6 +32,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect (con2a,"::1",quota,,test,$MASTER_MYPORT,); @@ -241,5 +242,5 @@ # revoke all privileges on test.* from 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -72,5 +73,5 @@ drop user 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -26,6 +26,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; --disable_query_log @@ -62,5 +63,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test 2020-01-26 18:37:28.000000000 +0000 @@ -29,6 +29,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -50,5 +51,5 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test 2020-01-26 18:37:28.000000000 +0000 @@ -26,6 +26,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; --disable_query_log @@ -44,5 +45,5 @@ --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test 2020-01-26 18:37:28.000000000 +0000 @@ -27,6 +27,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; --disable_query_log @@ -80,5 +81,5 @@ drop user 'user_with'@'santa.claus.ipv6.example.com'; drop user 'user_without'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test 2020-01-26 18:37:28.000000000 +0000 @@ -31,6 +31,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; --disable_query_log @@ -68,5 +69,5 @@ drop user 'user_ssl'@'santa.claus.ipv6.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_peer_addr.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_peer_addr.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/hostcache_peer_addr.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/hostcache_peer_addr.test 2020-01-26 18:37:28.000000000 +0000 @@ -22,6 +22,7 @@ disconnect con1; --connection default +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_error"; --disable_query_log @@ -42,7 +43,7 @@ show global status like "connection_errors_%"; --source ../include/hostcache_dump.inc -set global debug_dbug= default; +SET @@GLOBAL.debug_dbug = @saved_dbug; flush status; show global status like "connection_errors_%"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/misc.test mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/misc.test --- mariadb-10.3-10.3.18/mysql-test/suite/perfschema/t/misc.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/perfschema/t/misc.test 2020-01-26 18:37:28.000000000 +0000 @@ -222,3 +222,51 @@ select sql_text, rows_examined from performance_schema.events_statements_history; drop table t1; +--echo # +--echo # MDEV-17896 Assertion `pfs->get_refcount() > 0' failed +--echo # in release_table_share +--echo # + +# There must be at least one available slot in PFS table_share_array for +# this test to be meaningful. If there are no free slots we must +# restart mysqld, it is the only way to reset PFS table_share_array +let $query= SELECT COUNT(*)<@@performance_schema_max_table_instances FROM + performance_schema.objects_summary_global_by_type WHERE OBJECT_TYPE='TABLE'; + +let $free_slots_available= `$query`; + +if (!$free_slots_available) +{ + source include/restart_mysqld.inc; +} +eval $query; + +CREATE TABLE t0(a INT); + +# TABLE_SHARE must be cached in the table definition cache. +SELECT * FROM t0; + +# Dropping t0 using DROP TEMPORARY frees up a slot in table_share_array, +# but the persistent table is not correctly dropped, i.e. TABLE_SHARE::m_psi +# still points to that slot in table_share_array. +DROP TEMPORARY TABLE IF EXISTS t0; + +# Try re-using each and every slot in PFS table_share_array. If bug is +# there, we re-use t0 slot. +# The newly created table that re-uses the t0 slot ends up +# resetting the PFS_table_share refcount. +let $i= `SELECT @@performance_schema_max_table_instances`; +disable_query_log; +while ($i) +{ + # Memory engine is here to reduce disk IO + eval CREATE TABLE t$i(a INT) ENGINE=MEMORY; + eval DROP TABLE t$i; + dec $i; +} +enable_query_log; + +# FLUSH TABLE crashes the server when PFS_table_share is found with +# an unexpected refcount. +FLUSH TABLE t0; +DROP TABLE t0; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/plugins/r/server_audit.result mariadb-10.3-10.3.22/mysql-test/suite/plugins/r/server_audit.result --- mariadb-10.3-10.3.18/mysql-test/suite/plugins/r/server_audit.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/plugins/r/server_audit.result 2020-01-26 18:37:28.000000000 +0000 @@ -212,8 +212,22 @@ 2 2 drop table t1; +set global server_audit_events='table'; +set global server_audit_incl_users='user1'; +create user user1@localhost; +grant all on sa_db.* to user1@localhost; +connect cn1,localhost,user1,,sa_db; +connection cn1; +create table t1(id int) engine=myisam; +insert delayed into t1 values (1), (2); +connection default; +# Waiting until INSERT DELAYED thread does the insert. +drop table t1; set global server_audit_logging= off; +set global server_audit_incl_users='root'; set global server_audit_logging= on; +disconnect cn1; +drop user user1@localhost; set global server_audit_events=''; set global server_audit_query_log_limit= 15; select (1), (2), (3), (4); @@ -250,7 +264,7 @@ server_audit_file_rotate_now OFF server_audit_file_rotate_size 1000000 server_audit_file_rotations 9 -server_audit_incl_users odin, root, dva, tri +server_audit_incl_users root server_audit_logging ON server_audit_mode 1 server_audit_output_type file @@ -381,8 +395,16 @@ 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 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0 +TIME,HOSTNAME,user1,localhost,ID,ID,CREATE,sa_db,t1, +TIME,HOSTNAME,user1,localhost,ID,ID,WRITE,sa_db,t1, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_logging= off',0 -TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_logging= on',0 +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv, +TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping, TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0 TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/plugins/t/feedback_plugin_load.test mariadb-10.3-10.3.22/mysql-test/suite/plugins/t/feedback_plugin_load.test --- mariadb-10.3-10.3.18/mysql-test/suite/plugins/t/feedback_plugin_load.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/plugins/t/feedback_plugin_load.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,4 +1,8 @@ -if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'feedback' and plugin_status='active' and @@feedback_url <> ""`) +if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'feedback' and plugin_status='active'`) +{ + --skip Feedback plugin is not active +} +if (`select @@feedback_url = ""`) { --skip Feedback plugin is not active } diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/plugins/t/server_audit.test mariadb-10.3-10.3.22/mysql-test/suite/plugins/t/server_audit.test --- mariadb-10.3-10.3.18/mysql-test/suite/plugins/t/server_audit.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/plugins/t/server_audit.test 2020-01-26 18:37:28.000000000 +0000 @@ -136,8 +136,28 @@ select 2; drop table t1; +set global server_audit_events='table'; +set global server_audit_incl_users='user1'; + +create user user1@localhost; +grant all on sa_db.* to user1@localhost; + +connect (cn1,localhost,user1,,sa_db); +connection cn1; + +create table t1(id int) engine=myisam; +insert delayed into t1 values (1), (2); +connection default; +--echo # Waiting until INSERT DELAYED thread does the insert. +let $wait_condition= SELECT COUNT(*) = 2 FROM t1; +--source include/wait_condition.inc +drop table t1; + set global server_audit_logging= off; +set global server_audit_incl_users='root'; set global server_audit_logging= on; +disconnect cn1; +drop user user1@localhost; set global server_audit_events=''; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_binlog_errors.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_binlog_errors.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_binlog_errors.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_binlog_errors.inc 2020-01-26 18:37:28.000000000 +0000 @@ -431,5 +431,7 @@ -- source include/stop_slave_sql.inc RESET SLAVE; RESET MASTER; +--remove_file $load_file +--remove_file $load_file2 --let $rpl_only_running_threads= 1 --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_checksum.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_checksum.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_checksum.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_checksum.inc 2020-01-26 18:37:28.000000000 +0000 @@ -108,6 +108,7 @@ # instruction to the dump thread connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; --let $slave_io_errno= 1236 @@ -116,8 +117,7 @@ select count(*) as zero from t1; -###connection master; -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; connection slave; source include/start_slave.inc; @@ -129,10 +129,11 @@ # C1. Failure by a client thread connection master; set @@global.master_verify_checksum = 1; +set @save_dbug = @@session.debug_dbug; set @@session.debug_dbug='d,simulate_checksum_test_failure'; --error ER_ERROR_WHEN_EXECUTING_COMMAND show binlog events; -set @@session.debug_dbug=''; +SET debug_dbug= @save_dbug; set @@global.master_verify_checksum = default; #connection master; @@ -149,6 +150,7 @@ # C2. Failure by IO thread # instruction to io thread +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave io_thread; # When the checksum error is detected, the slave sets error code 1913 @@ -158,7 +160,7 @@ --let $slave_io_errno= 1595,1913 --let $show_slave_io_error= 0 source include/wait_for_slave_io_error.inc; -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; # to make IO thread re-read it again w/o the failure start slave io_thread; @@ -179,7 +181,7 @@ # resuming SQL thread to parse out the event w/o the failure -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; source include/start_slave.inc; connection master; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_corruption.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_corruption.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_corruption.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_corruption.inc 2020-01-26 18:37:28.000000000 +0000 @@ -73,6 +73,7 @@ # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing --echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; --echo SHOW BINLOG EVENTS; --disable_query_log @@ -122,23 +123,24 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set"; --connection slave START SLAVE IO_THREAD; -# When the checksum error is detected, the slave sets error code 1913 +# When the checksum error is detected, the slave sets error code 1743 # (ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE) in queue_event(), then immediately # sets error 1595 (ER_SLAVE_RELAY_LOG_WRITE_FAILURE) in handle_slave_io(). -# So we usually get 1595, but it is occasionally possible to get 1913. -let $slave_io_errno= 1595,1913; +# So we usually get 1595, but it is occasionally possible to get 1743. +let $slave_io_errno= 1595,1743; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE --source include/wait_for_slave_io_error.inc --connection master SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # Emulate corruption in network --echo # 5. Slave. Corruption in network --connection slave +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; -let $slave_io_errno= 1595,1913; +let $slave_io_errno= 1595,1743; # ER_SLAVE_RELAY_LOG_WRITE_FAILURE, ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE --source include/wait_for_slave_io_error.inc SET GLOBAL debug_dbug="-d,corrupt_queue_event"; @@ -152,7 +154,7 @@ --source include/wait_for_slave_sql_error.inc SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # Start normal replication and compare same table on master # and slave @@ -167,10 +169,9 @@ # Clean up --echo # 8. Clean up --connection master -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; --sync_slave_with_master -SET GLOBAL debug_dbug= ""; --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_incident.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_incident.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_incident.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_incident.inc 2020-01-26 18:37:28.000000000 +0000 @@ -20,7 +20,7 @@ INSERT INTO t1 VALUES (1),(2),(3); SELECT * FROM t1; -let $debug_save= `SELECT @@GLOBAL.debug`; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,incident_database_resync_on_replace,*'; # This will generate an incident log event and store it in the binary @@ -29,9 +29,7 @@ --save_master_pos SELECT * FROM t1; ---disable_query_log -eval SET GLOBAL debug_dbug= '$debug_save'; ---enable_query_log +set @@global.debug_dbug = @saved_dbug; connection slave; # Wait until SQL thread stops with error LOST_EVENT on master diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc 2020-01-26 18:37:28.000000000 +0000 @@ -51,6 +51,7 @@ connection slave; # Set debug flags on slave to force errors to occur +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; @@ -66,7 +67,7 @@ call mtr.add_suppression("Failed during slave.* thread initialization"); -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; ###################################################################### # Injecting faults in the init_slave option diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_parallel.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_parallel.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_parallel.inc 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_parallel.inc 2020-01-26 18:37:28.000000000 +0000 @@ -1951,7 +1951,6 @@ --source include/stop_slave.inc SET GLOBAL debug_dbug=@old_dbug; - --echo *** MDEV-6676 - test disabling domain-based parallel replication *** --connection server_1 # Let's do a bunch of transactions that will conflict if run out-of-order in @@ -2000,7 +1999,7 @@ # so sleep is ok here. And it's in general not possible to trigger reliably # the race with debug_sync, since the bugfix makes the race impossible). -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; # Group commit with cid=10000, two event groups. @@ -2012,7 +2011,7 @@ SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; --source include/save_master_gtid.inc @@ -2044,7 +2043,7 @@ # We inject a small sleep in the corresponding record_gtid() to make the race # easier to hit. -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; # Group commit with cid=10010, two event groups. @@ -2059,8 +2058,7 @@ SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; - +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; --source include/save_master_gtid.inc @@ -2097,7 +2095,7 @@ # complete. Finally an extra KILL check catches an unhandled, lingering # deadlock kill. So rather artificial, but at least it exercises the # relevant code paths. -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; @@ -2119,7 +2117,7 @@ UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/save_master_gtid.inc @@ -2144,7 +2142,7 @@ SET GLOBAL max_relay_log_size= 4096; --connection server_1 -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; --let $large= `SELECT REPEAT("*", 8192)` @@ -2167,7 +2165,7 @@ eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */; eval UPDATE t3 SET b=b+1 WHERE a=205 /* $large */; --enable_query_log -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/save_master_gtid.inc @@ -2178,7 +2176,7 @@ SELECT * FROM t3 WHERE a>=200 ORDER BY a; --source include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; --source include/start_slave.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,112 @@ +# ==== Purpose ==== +# +# Test verifies that, in parallel replication, transaction failure notification +# is propagated to all the workers. Workers should abort the execution of +# transaction event groups, whose event positions are higher than the failing +# transaction group. +# +# ==== Implementation ==== +# +# Steps: +# 0 - Create a table t1 on master which has a primary key. Enable parallel +# replication on slave with slave_parallel_mode='optimistic' and +# slave_parallel_threads=3. +# 1 - On slave start a transaction and execute a local INSERT statement +# which will insert value 32. This is done to block the INSERT coming +# from master. +# 2 - On master execute an INSERT statement with value 32, so that it is +# blocked on slave. +# 3 - On slave enable a debug sync point such that it holds the worker thread +# execution as soon as work is scheduled to it. +# 4 - INSERT value 33 on master. It will be held on slave by other worker +# thread due to debug simulation. +# 5 - INSERT value 34 on master. +# 6 - On slave, enusre that INSERT 34 has reached a state where it waits for +# its prior transactions to commit. +# 7 - Commit the local INSERT 32 on slave server so that first worker will +# error out. +# 8 - Now send a continue signal to second worker processing 33. It should +# wakeup and propagate the error to INSERT 34. +# 9 - Upon slave stop due to error, check that no rows are found after the +# failed INSERT 32. +# +# ==== References ==== +# +# MDEV-20645: Replication consistency is broken as workers miss the error +# notification from an earlier failed group. +# + +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc +--source include/have_binlog_format_statement.inc +--source include/master-slave.inc + +--enable_connect_log +--connection server_2 +--source include/stop_slave.inc +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; +SET @old_debug= @@GLOBAL.debug_dbug; +SET GLOBAL slave_parallel_mode='optimistic'; +SET GLOBAL slave_parallel_threads= 3; +CHANGE MASTER TO master_use_gtid=slave_pos; +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +--source include/start_slave.inc + +--connection server_1 +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=InnoDB; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc + +--connect (con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,) +BEGIN; +INSERT INTO t1 VALUES (32); + +--connection server_1 +INSERT INTO t1 VALUES (32); + +--connection server_2 +--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE info like "INSERT INTO t1 VALUES (32)" +--source include/wait_condition.inc +SET GLOBAL debug_dbug="+d,hold_worker_on_schedule"; +SET debug_sync="debug_sync_action SIGNAL reached_pause WAIT_FOR continue_worker"; + +--connection server_1 +SET gtid_seq_no=100; +INSERT INTO t1 VALUES (33); + +--connection server_2 +SET debug_sync='now WAIT_FOR reached_pause'; + +--connection server_1 +INSERT INTO t1 VALUES (34); + +--connection server_2 +--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE state like "Waiting for prior transaction to commit" +--source include/wait_condition.inc +--connection con_temp2 +COMMIT; + +# Clean up. +--connection server_2 +--source include/stop_slave.inc +--let $assert_cond= COUNT(*) = 0 FROM t1 WHERE a>32 +--let $assert_text= table t1 should have zero rows where a>32 +--source include/assert.inc +SELECT * FROM t1 WHERE a>32; +DELETE FROM t1 WHERE a=32; + +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +SET GLOBAL slave_parallel_mode=@old_parallel_mode; +SET GLOBAL debug_dbug=@old_debug; +SET DEBUG_SYNC= 'RESET'; +--source include/start_slave.inc + +--connection server_1 +DROP TABLE t1; +--disable_connect_log +--source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_stop_middle_group.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_stop_middle_group.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/include/rpl_stop_middle_group.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/include/rpl_stop_middle_group.test 2020-01-26 18:37:28.000000000 +0000 @@ -13,6 +13,7 @@ create table ti (a int auto_increment primary key) engine=innodb; sync_slave_with_master; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,stop_slave_middle_group"; connection master; @@ -135,8 +136,7 @@ select max(a) as two from tm; select max(a) as one from ti; -set @@global.debug_dbug="-d"; - +SET @@GLOBAL.debug_dbug = @saved_dbug; # # clean-up # diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/circular_serverid0.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/circular_serverid0.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/circular_serverid0.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/circular_serverid0.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,9 +1,9 @@ include/rpl_init.inc [topology=1->2->1] include/rpl_connect.inc [creating M4] include/rpl_connect.inc [creating M2] -SET @old_debug= @@global.debug; connection M2; STOP SLAVE; +SET @old_debug= @@global.debug; SET GLOBAL debug_dbug= "+d,dbug.rows_events_to_delay_relay_logging"; START SLAVE IO_THREAD; include/wait_for_slave_io_to_start.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/kill_race_condition.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/kill_race_condition.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/kill_race_condition.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/kill_race_condition.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,6 +4,7 @@ create table t1 (a int); connection slave; connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug='d,rows_log_event_before_open_table'; connection master; insert t1 values (1),(2),(3); @@ -13,7 +14,7 @@ set debug_sync='now SIGNAL go_ahead_sql'; include/wait_for_slave_sql_error.inc [errno=1927] Last_SQL_Error = Error executing row event: 'Connection was killed' -set global debug_dbug=''; +SET @@GLOBAL.debug_dbug = @saved_dbug; set debug_sync='RESET'; connection master; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_000011.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_000011.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_000011.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_000011.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,15 +1,13 @@ include/master-slave.inc [connection master] +connection slave; +connection master; create table t1 (n int); insert into t1 values(1); connection slave; -show global status like 'com_insert'; -Variable_name Value -Com_insert 1 +# Com_insert = 1 stop slave; -show global status like 'com_insert'; -Variable_name Value -Com_insert 1 +# Com_insert = 1 include/wait_for_slave_to_stop.inc start slave; include/wait_for_slave_to_start.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_binlog_rollback_cleanup.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,9 @@ +include/master-slave.inc +[connection master] +connection master; +SET GLOBAL max_binlog_cache_size = 65536; +CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=INNODB; +ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again +SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE; +DROP TABLE t1; +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_bug33931.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_bug33931.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_bug33931.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_bug33931.result 2020-01-26 18:37:28.000000000 +0000 @@ -5,10 +5,11 @@ call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593"); include/stop_slave.inc reset slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Failed during slave thread initialization' -SET GLOBAL debug_dbug=""; +SET @@GLOBAL.debug_dbug = @saved_dbug; RESET SLAVE; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_bug41902.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_bug41902.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_bug41902.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_bug41902.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,6 +2,7 @@ [connection master] connection slave; stop slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; reset slave; ERROR HY000: Target log not found in binlog index @@ -19,6 +20,7 @@ reset slave; change master to master_host='dummy'; connection master; +SET @saved_dbug_m = @@global.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; reset master; ERROR HY000: Target log not found in binlog index @@ -29,6 +31,7 @@ ERROR HY000: Target log not found in binlog index SET @@debug_dbug=""; purge binary logs to 'master-bin.000001'; +SET @@GLOBAL.debug_dbug = @saved_dbug; ==== clean up ==== CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_checksum.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_checksum.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_checksum.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_checksum.result 2020-01-26 18:37:28.000000000 +0000 @@ -76,6 +76,7 @@ set @@global.binlog_checksum = CRC32; insert into t1 values (1) /* will not be applied on slave due to simulation */; connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; include/wait_for_slave_io_error.inc [errno=1236] @@ -83,15 +84,16 @@ select count(*) as zero from t1; zero 0 -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; connection slave; include/start_slave.inc connection master; set @@global.master_verify_checksum = 1; +set @save_dbug = @@session.debug_dbug; set @@session.debug_dbug='d,simulate_checksum_test_failure'; show binlog events; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error -set @@session.debug_dbug=''; +SET debug_dbug= @save_dbug; set @@global.master_verify_checksum = default; connection slave; connection slave; @@ -99,10 +101,11 @@ connection master; create table t2 (a int); connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave io_thread; include/wait_for_slave_io_error.inc [errno=1595,1913] -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; start slave io_thread; include/wait_for_slave_param.inc [Read_Master_Log_Pos] set @@global.slave_sql_verify_checksum = 1; @@ -110,7 +113,7 @@ start slave sql_thread; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Error initializing relay log position: I/O error reading event at position 4' -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; include/start_slave.inc connection master; connection slave; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_corruption.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_corruption.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_corruption.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_corruption.result 2020-01-26 18:37:28.000000000 +0000 @@ -13,6 +13,7 @@ CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c VARCHAR(100)); include/stop_slave.inc # 2. Corruption in master binlog and SHOW BINLOG EVENTS +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; SHOW BINLOG EVENTS; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error @@ -30,23 +31,24 @@ SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set"; connection slave; START SLAVE IO_THREAD; -include/wait_for_slave_io_error.inc [errno=1595,1913] +include/wait_for_slave_io_error.inc [errno=1595,1743] connection master; SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network connection slave; +SET @saved_dbug_slave = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; -include/wait_for_slave_io_error.inc [errno=1595,1913] +include/wait_for_slave_io_error.inc [errno=1595,1743] SET GLOBAL debug_dbug="-d,corrupt_queue_event"; # 6. Slave. Corruption in relay log SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char"; START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char"; -SET GLOBAL debug_dbug= ""; +SET GLOBAL debug_dbug=@saved_dbug_slave; # 7. Seek diff for tables on master and slave connection slave; include/start_slave.inc @@ -55,9 +57,8 @@ include/diff_tables.inc [master:test.t1, slave:test.t1] # 8. Clean up connection master; -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; connection slave; -SET GLOBAL debug_dbug= ""; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_domain_id_filter_io_crash.result 2020-01-26 18:37:28.000000000 +0000 @@ -26,6 +26,7 @@ include/start_slave.inc DO_DOMAIN_IDS (AFTER) : IGNORE_DOMAIN_IDS (AFTER) : +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug="+d,kill_slave_io_before_commit"; connection master; START TRANSACTION; @@ -414,4 +415,5 @@ include/stop_slave.inc CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(); include/start_slave.inc +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_domain_id_filter_master_crash.result 2020-01-26 18:37:28.000000000 +0000 @@ -37,7 +37,6 @@ connection master; include/rpl_start_server.inc [server_number=1] # Master has restarted successfully -set @@global.debug_dbug="-d"; connection slave; include/stop_slave.inc include/start_slave.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_gtid_reconnect.result 2020-01-26 18:37:28.000000000 +0000 @@ -27,7 +27,7 @@ connection server_1; include/kill_binlog_dump_threads.inc INSERT INTO t1 VALUES (10); -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_force_reconnect_at_10_1_100"; connection server_2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -7,7 +7,7 @@ show status like 'Slave_heartbeat_period';; Variable_name Slave_heartbeat_period Value 60.000 -SET @save_dbug= @@GLOBAL.debug_dbug; +SET @saved_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error"; CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error'); CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again'); @@ -25,7 +25,7 @@ drop table t1; connection slave; include/stop_slave.inc -SET GLOBAL debug_dbug=@save_dbug; +SET GLOBAL debug_dbug=@saved_dbug; set @@global.slave_net_timeout= @restore_slave_net_timeout; include/start_slave.inc include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_incident.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_incident.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_incident.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_incident.result 2020-01-26 18:37:28.000000000 +0000 @@ -14,6 +14,7 @@ 1 2 3 +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,incident_database_resync_on_replace,*'; REPLACE INTO t1 VALUES (4); SELECT * FROM t1; @@ -22,6 +23,7 @@ 2 3 4 +set @@global.debug_dbug = @saved_dbug; connection slave; call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occurred on the master.* 1590"); include/wait_for_slave_sql_error.inc [errno=1590] diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_init_slave_errors.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_init_slave_errors.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_init_slave_errors.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_init_slave_errors.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,12 +4,13 @@ stop slave; reset slave; connection slave; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave.* thread initialization"); -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; connection slave; reset slave; SET GLOBAL init_slave= "garbage"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_ip_mix.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_ip_mix.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_ip_mix.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_ip_mix.result 2020-01-26 18:37:28.000000000 +0000 @@ -64,3 +64,5 @@ change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; +connection slave; +reset slave all; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_ip_mix2.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_ip_mix2.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_ip_mix2.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_ip_mix2.result 2020-01-26 18:37:28.000000000 +0000 @@ -64,3 +64,5 @@ change master to master_host='0:0:0:0:0:0:0:1'; Master-Host: 0:0:0:0:0:0:0:1 CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; +connection slave; +reset slave all; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,10 +2,10 @@ [connection master] connection master; set @old_master_binlog_checksum= @@global.binlog_checksum; -set @old_slave_dbug= @@global.debug_dbug; connection slave; include/stop_slave.inc # Test slave with no capability gets dummy event, which is ignored. +set @old_dbug= @@global.debug_dbug; SET @@global.debug_dbug='+d,simulate_slave_capability_none'; include/start_slave.inc connection master; @@ -50,7 +50,7 @@ slave-relay-bin.000005 # Table_map # # table_id: # (test.t1) slave-relay-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F slave-relay-bin.000005 # Query # # COMMIT -set @@global.debug_dbug= @old_slave_dbug; +set @@global.debug_dbug= @old_dbug; # Test dummy event is checksummed correctly. connection master; set @@global.binlog_checksum = CRC32; @@ -148,10 +148,10 @@ select @@global.replicate_annotate_row_events; @@global.replicate_annotate_row_events 1 -set @@global.debug_dbug= @old_slave_dbug; Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; DROP TABLE t1, t2; connection slave; +set @@global.debug_dbug= @old_dbug; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_mdev-11092.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_mdev-11092.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_mdev-11092.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_mdev-11092.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,7 +1,7 @@ include/master-slave.inc [connection master] call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -call mtr.add_suppression("Slave SQL: The incident LOST_EVENTS occured on the master. .*"); +call mtr.add_suppression("Slave SQL: The incident LOST_EVENTS occurred on the master. .*"); SET GLOBAL max_binlog_cache_size = 4096; SET GLOBAL binlog_cache_size = 4096; SET GLOBAL max_binlog_stmt_cache_size = 4096; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_parallel.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_parallel.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel.result 2020-01-26 18:37:28.000000000 +0000 @@ -1512,7 +1512,7 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10000; ANALYZE TABLE t2; @@ -1521,7 +1521,7 @@ INSERT INTO t3 VALUES (120, 0); SET @commit_id= 10001; INSERT INTO t3 VALUES (121, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 120 ORDER BY a; a b 120 0 @@ -1543,7 +1543,7 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_record_gtid_serverid_100_sleep'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @old_server_id= @@SESSION.server_id; SET SESSION server_id= 100; @@ -1553,7 +1553,7 @@ INSERT INTO t3 VALUES (130, 0); SET @commit_id= 10011; INSERT INTO t3 VALUES (131, 0); -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a >= 130 ORDER BY a; a b 130 0 @@ -1579,7 +1579,7 @@ SET @old_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_mdev8031'; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10200; INSERT INTO t3 VALUES (203, 1); @@ -1600,7 +1600,7 @@ UPDATE t3 SET b=b+1 WHERE a=203; UPDATE t3 SET b=b+1 WHERE a=205; UPDATE t3 SET b=b+1 WHERE a=205; -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 3 @@ -1630,11 +1630,11 @@ SET @old_max= @@GLOBAL.max_relay_log_size; SET GLOBAL max_relay_log_size= 4096; connection server_1; -SET @old_dbug= @@SESSION.debug_dbug; +SET @old_dbug_slave= @@SESSION.debug_dbug; SET SESSION debug_dbug="+d,binlog_force_commit_id"; SET @commit_id= 10210; Omit long queries that cause relaylog rotations and transaction retries... -SET SESSION debug_dbug=@old_dbug; +SET SESSION debug_dbug=@old_dbug_slave; SELECT * FROM t3 WHERE a>=200 ORDER BY a; a b 201 6 @@ -1654,7 +1654,7 @@ 204 7 205 5 include/stop_slave.inc -SET GLOBAL debug_dbug= @old_debg; +SET GLOBAL debug_dbug= @old_dbug; SET GLOBAL max_relay_log_size= @old_max; include/start_slave.inc *** MDEV-8725: Assertion on ROLLBACK statement in the binary log *** diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel_ignored_errors.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,50 @@ +include/master-slave.inc +[connection master] +connection server_2; +include/stop_slave.inc +SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; +SET @old_parallel_mode=@@GLOBAL.slave_parallel_mode; +SET @old_debug= @@GLOBAL.debug_dbug; +SET GLOBAL slave_parallel_mode='optimistic'; +SET GLOBAL slave_parallel_threads= 3; +CHANGE MASTER TO master_use_gtid=slave_pos; +CALL mtr.add_suppression("Commit failed due to failure of an earlier commit on which this one depends"); +include/start_slave.inc +connection server_1; +ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; +CREATE TABLE t1 (a int PRIMARY KEY) ENGINE=InnoDB; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +connect con_temp2,127.0.0.1,root,,test,$SERVER_MYPORT_2,; +BEGIN; +INSERT INTO t1 VALUES (32); +connection server_1; +INSERT INTO t1 VALUES (32); +connection server_2; +SET GLOBAL debug_dbug="+d,hold_worker_on_schedule"; +SET debug_sync="debug_sync_action SIGNAL reached_pause WAIT_FOR continue_worker"; +connection server_1; +SET gtid_seq_no=100; +INSERT INTO t1 VALUES (33); +connection server_2; +SET debug_sync='now WAIT_FOR reached_pause'; +connection server_1; +INSERT INTO t1 VALUES (34); +connection server_2; +connection con_temp2; +COMMIT; +connection server_2; +include/stop_slave.inc +include/assert.inc [table t1 should have zero rows where a>32] +SELECT * FROM t1 WHERE a>32; +a +DELETE FROM t1 WHERE a=32; +SET GLOBAL slave_parallel_threads=@old_parallel_threads; +SET GLOBAL slave_parallel_mode=@old_parallel_mode; +SET GLOBAL debug_dbug=@old_debug; +SET DEBUG_SYNC= 'RESET'; +include/start_slave.inc +connection server_1; +DROP TABLE t1; +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result 2020-01-26 18:37:28.000000000 +0000 @@ -352,7 +352,7 @@ connection server_2; include/sync_with_master_gtid.inc include/stop_slave.inc -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; connection server_1; ALTER TABLE t2 COMMENT "123abc"; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_read_only2.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_read_only2.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_read_only2.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_read_only2.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,53 @@ +include/master-slave.inc +[connection master] +# +# Ensure that read-only slave logs temporary table statements under statement based +# replication. This is related to MDEV-17863. +# +connection slave; +set global read_only=1; +connection master; +create table t1(a int) engine=MyISAM; +create temporary table tmp1 (a int) engine=MyISAM; +insert into t1 values(1); +insert into tmp1 values (2); +insert into t1 select * from tmp1; +insert into t1 values(3); +select * from t1; +a +1 +2 +3 +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +drop table t1; +drop temporary table tmp1; +connection slave; +include/show_binlog_events.inc +Log_name Pos Event_type Server_id End_log_pos Info +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create table t1(a int) engine=MyISAM +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; create temporary table tmp1 (a int) engine=MyISAM +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 values(1) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into tmp1 values (2) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 select * from tmp1 +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # BEGIN GTID #-#-# +slave-bin.000001 # Query # # use `test`; insert into t1 values(3) +slave-bin.000001 # Query # # COMMIT +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; analyze table t1 +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +slave-bin.000001 # Gtid # # GTID #-#-# +slave-bin.000001 # Query # # DROP TEMPORARY TABLE IF EXISTS `test`.`tmp1` /* generated by server */ +set global read_only=0; +connection master; +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_rotate_logs.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_rotate_logs.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_rotate_logs.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_rotate_logs.result 2020-01-26 18:37:28.000000000 +0000 @@ -128,4 +128,6 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log purge master logs before now(); End of 5.0 tests +#cleanup include/stop_slave.inc +reset slave all; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_row_big_table_id.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_row_big_table_id.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_row_big_table_id.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_row_big_table_id.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,6 +2,7 @@ [connection master] connection master; include/rpl_restart_server.inc [server_number=1] +SET @saved_dbug = @@SESSION.debug_dbug; SET @@debug_dbug="d,simulate_big_table_id"; CREATE TABLE t (a int); INSERT INTO t SET a= 0; @@ -42,5 +43,6 @@ connection slave; connection master; DROP TABLE t; +SET debug_dbug= @saved_dbug; connection slave; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,6 +2,7 @@ [connection master] connection slave; include/stop_slave.inc +SET @saved_dbug = @@GLOBAL.debug_dbug; SET GLOBAL log_warnings = 2; SET GLOBAL debug_dbug="d,inject_long_find_row_note"; include/start_slave.inc @@ -15,9 +16,10 @@ DROP TABLE t1; connection slave; # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log -Occurrences: update=1, delete=1 +FOUND 1 /The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount/ in mysqld.2.err +FOUND 1 /The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/ in mysqld.2.err include/stop_slave.inc -SET GLOBAL debug_dbug = ''; +SET @@GLOBAL.debug_dbug = @saved_dbug; SET GLOBAL log_warnings = 2; include/start_slave.inc include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_semi_sync_gtid_reconnect.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_gtid_reconnect.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_semi_sync_gtid_reconnect.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_gtid_reconnect.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,40 @@ +include/master-slave.inc +[connection master] +connection master; +RESET MASTER; +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; +connection slave; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; +include/start_slave.inc +connection master; +CREATE TABLE t1 (a INT); +INSERT INTO t1 SET a = 1; +include/save_master_gtid.inc +FLUSH LOGS; +INSERT INTO t1 SET a = 2; +connection slave; +connection slave; +include/stop_slave_sql.inc +connection master; +INSERT INTO t1 SET a = 3; +include/sync_slave_io_with_master.inc +connection slave; +include/stop_slave_io.inc +connection master; +RESET MASTER; +SET @@global.gtid_binlog_state = '0-1-2'; +connection slave; +CHANGE MASTER TO MASTER_USE_GTID = slave_pos; +SET @@global.gtid_slave_pos = '0-1-2'; +include/start_slave.inc +connection master; +INSERT INTO t1 SET a = 4; +connection master; +DROP TABLE t1; +SET @@GLOBAL. rpl_semi_sync_master_enabled = 0; +connection slave; +include/stop_slave.inc +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 0; +include/start_slave.inc +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result 2020-01-26 18:37:28.000000000 +0000 @@ -11,6 +11,7 @@ include/start_slave.inc connection master; CREATE TABLE t1 (a INT) ENGINE=innodb; +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB"; SET @@SESSION.skip_replication=1; INSERT INTO t1 SET a=1; @@ -20,7 +21,7 @@ FLUSH LOGS; connection slave; connection master; -SET @@GLOBAL.debug_dbug=@@GLOBAL.debug_dbug; +SET @@GLOBAL.debug_dbug = @saved_dbug; SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000; SET @@GLOBAL.rpl_semi_sync_master_enabled = 0; connection master; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_semi_sync_slave_reply_fail.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,40 @@ +include/master-slave.inc +[connection master] +connection slave; +include/stop_slave.inc +connection master; +call mtr.add_suppression("Timeout waiting for reply of binlog*"); +set global rpl_semi_sync_master_enabled = ON; +SET @@GLOBAL.rpl_semi_sync_master_timeout=100; +create table t1 (i int); +connection slave; +set global rpl_semi_sync_slave_enabled = ON; +CALL mtr.add_suppression("Semi-sync slave net_flush*"); +SET @save_debug= @@global.debug; +SET GLOBAL debug_dbug="+d,semislave_failed_net_flush"; +include/start_slave.inc +connection master; +connection slave; +"Assert that the net_fulsh() reply failed is present in slave error log. +FOUND 1 /Semi-sync slave net_flush\(\) reply failed/ in mysqld.2.err +"Assert that Slave IO thread is up and running." +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running ON +Slave_IO_Running= Yes +"Clear the network failure simulation." +SET GLOBAL debug_dbug= @save_debug; +connection master; +insert into t1 values (10); +connection slave; +connection slave; +# Compare the tables on master and slave. +include/diff_tables.inc [master:t1, slave:t1] +connection master; +drop table t1; +connection slave; +set global rpl_semi_sync_slave_enabled = OFF; +connection master; +set global rpl_semi_sync_master_enabled = OFF; +SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000; +include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_show_slave_running.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_show_slave_running.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_show_slave_running.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_show_slave_running.result 2020-01-26 18:37:28.000000000 +0000 @@ -3,6 +3,7 @@ connection slave; SET DEBUG_SYNC= 'RESET'; include/stop_slave.inc +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= 'd,dbug.before_get_running_status_yes'; Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries SHOW STATUS LIKE 'Slave_running'; @@ -34,7 +35,7 @@ Slave_IO_Running= Yes Slave_SQL_Running= Yes connection slave; -set global debug_dbug= ''; +SET @@GLOBAL.debug_dbug = @saved_dbug; SET DEBUG_SYNC= 'RESET'; End of tests include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_skip_error.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_skip_error.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_skip_error.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_skip_error.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,5 +1,7 @@ include/master-slave.inc [connection master] +connection slave; +connection master; ==== Test Without sql_mode=strict_trans_tables ==== create table t1 (n int not null primary key); connection slave; @@ -105,9 +107,7 @@ `data` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -show global status like 'slave_skipped_errors'; -Variable_name Value -Slave_skipped_errors 4 +# Slave_skipped_errros = 4 connection master; INSERT INTO t2 VALUES(1, 1); INSERT INTO t2 VALUES(2, 1); @@ -119,9 +119,7 @@ UPDATE t2 SET id= id + 3, data = 2; connection slave; -show global status like 'slave_skipped_errors'; -Variable_name Value -Slave_skipped_errors 5 +# Slave_skipped_errros = 5 **** We cannot execute a select as there are differences in the **** behavior between STMT and RBR. ==== Clean Up ==== diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ include/master-slave.inc [connection master] connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write'; connection master; create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; @@ -21,5 +22,5 @@ call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* error.* 13"); call mtr.add_suppression("Slave: File.* not found.*"); call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29"); -SET @@global.debug_dbug= ''; +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result 2020-01-26 18:37:28.000000000 +0000 @@ -6,6 +6,7 @@ create table tm (a int auto_increment primary key) engine=myisam; create table ti (a int auto_increment primary key) engine=innodb; connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; set @@global.debug_dbug="+d,stop_slave_middle_group"; connection master; begin; @@ -74,7 +75,7 @@ select max(a) as one from ti; one 1 -set @@global.debug_dbug="-d"; +SET @@GLOBAL.debug_dbug = @saved_dbug; include/rpl_reset.inc connection master; drop table tm, ti; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_stop_slave.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_stop_slave.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_stop_slave.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_stop_slave.result 2020-01-26 18:37:28.000000000 +0000 @@ -15,7 +15,7 @@ # Suspend the INSERT statement in current transaction on SQL thread. # It guarantees that SQL thread is applying the transaction when # STOP SLAVE command launchs. -set @old_debug=@@global.debug; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= '+d,after_mysql_insert'; include/start_slave.inc @@ -75,6 +75,7 @@ connection slave; # Test end +SET @@GLOBAL.debug_dbug = @saved_dbug; include/restart_slave.inc connection slave; call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); @@ -99,7 +100,7 @@ include/stop_slave.inc connection master; include/stop_dump_threads.inc -set @old_debug=@@global.debug; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= '+d,dump_thread_wait_before_send_xid'; connection slave; include/start_slave.inc @@ -122,6 +123,7 @@ include/wait_for_slave_to_stop.inc connection slave1; connection master; +SET @@GLOBAL.debug_dbug = @saved_dbug; include/stop_dump_threads.inc connection slave1; include/start_slave.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_view_debug.result mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_view_debug.result --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/r/rpl_view_debug.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/r/rpl_view_debug.result 2020-01-26 18:37:28.000000000 +0000 @@ -21,6 +21,7 @@ t1 v1 connection master; +SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug="d,simulate_register_view_failure"; CREATE VIEW v2 as SELECT * FROM t1; ERROR HY000: Out of memory. @@ -36,4 +37,5 @@ connection master; DROP VIEW IF EXISTS v1; DROP TABLE t1; +SET debug_dbug= @saved_dbug; include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/circular_serverid0.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/circular_serverid0.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/circular_serverid0.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/circular_serverid0.test 2020-01-26 18:37:28.000000000 +0000 @@ -22,10 +22,9 @@ # The parameter reflects binlog-row-event-max-size @cnf. --let $row_size=1024 -SET @old_debug= @@global.debug; - --connection M2 STOP SLAVE; +SET @old_debug= @@global.debug; SET GLOBAL debug_dbug= "+d,dbug.rows_events_to_delay_relay_logging"; START SLAVE IO_THREAD; --source include/wait_for_slave_io_to_start.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/kill_race_condition.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/kill_race_condition.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/kill_race_condition.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/kill_race_condition.test 2020-01-26 18:37:28.000000000 +0000 @@ -7,6 +7,7 @@ --sync_slave_with_master connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug='d,rows_log_event_before_open_table'; connection master; @@ -22,7 +23,7 @@ --source include/wait_for_slave_sql_error.inc let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); --echo Last_SQL_Error = $error -set global debug_dbug=''; +SET @@GLOBAL.debug_dbug = @saved_dbug; set debug_sync='RESET'; connection master; drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_000011.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_000011.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_000011.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_000011.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,19 +5,19 @@ # source include/master-slave.inc; - +--connection slave +let $initial_com_insert= query_get_value(show global status like "Com_insert", Value, 1); +--connection master create table t1 (n int); insert into t1 values(1); -sync_slave_with_master; -show global status like 'com_insert'; +sync_slave_with_master; +let $current_com_insert= query_get_value(show global status like "Com_insert", Value, 1); +--let $delta_com_insert= `select $current_com_insert - $initial_com_insert from dual` +--echo # Com_insert = $delta_com_insert stop slave; -# Temporary work-around for bug MDEV-8301. There is a small window during -# thread exit where the local status values of a thread are counted twice -# in the global status. Remove this wait_condition.inc once MDEV-8301 is -# fixed. ---let $wait_condition= SELECT variable_value=1 FROM information_schema.global_status WHERE variable_name="Com_insert"; ---source include/wait_condition.inc -show global status like 'com_insert'; +let $current_com_insert= query_get_value(show global status like "Com_insert", Value, 1); +--let $delta_com_insert= `select $current_com_insert - $initial_com_insert from dual` +--echo # Com_insert = $delta_com_insert --source include/wait_for_slave_to_stop.inc start slave; --source include/wait_for_slave_to_start.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_binlog_rollback_cleanup.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_binlog_rollback_cleanup.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_binlog_rollback_cleanup.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_binlog_rollback_cleanup.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,46 @@ +# ==== Purpose ==== +# +# Test verifies that when flushing an event to binary log fails the transaction +# is successfully rolled back and following COMMIT command doesn't report any +# assert. +# +# ==== Implementation ==== +# +# Steps: +# 0 - SET max_binlog_cache_size=64K +# 1 - Create an Innodb table and insert required amount of data. Execute an +# UPDATE operation which generates a big update event whose size exceeds +# max_binlog_cache_size. +# 2 - Wait for error 1197. Execute COMMIT command. +# 3 - COMMIT should be successful. +# +# ==== References ==== +# +# MDEV-18514: Assertion `!writer.checksum_len || writer.remains == 0' failed +# +--source include/have_innodb.inc +--source include/have_binlog_format_row.inc +--source include/master-slave.inc +--connection master +let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1); +SET GLOBAL max_binlog_cache_size = 65536; +CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=INNODB; +let $data = `select concat('"', repeat('a',6000), '"')`; +let $data1 = `select concat('"', repeat('b',6000), '"')`; +--disable_query_log +eval INSERT INTO t1 (a, data) VALUES (1, CONCAT($data, $data)); +eval INSERT INTO t1 (a, data) VALUES (2, CONCAT($data, $data)); +eval INSERT INTO t1 (a, data) VALUES (3, CONCAT($data, $data)); +eval INSERT INTO t1 (a, data) VALUES (4, CONCAT($data, $data)); +eval INSERT INTO t1 (a, data) VALUES (5, CONCAT($data, $data)); +START TRANSACTION; +--error ER_TRANS_CACHE_FULL +eval UPDATE t1 SET data=$data1; +COMMIT; +--enable_query_log + +--replace_result $old_max_binlog_cache_size ORIGINAL_VALUE +--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size +DROP TABLE t1; + +--source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_bug33931.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_bug33931.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_bug33931.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_bug33931.test 2020-01-26 18:37:28.000000000 +0000 @@ -15,6 +15,7 @@ reset slave; # Set debug flags on slave to force errors to occur +SET @saved_dbug = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; --disable_query_log @@ -39,7 +40,7 @@ # # Cleanup # -SET GLOBAL debug_dbug=""; +SET @@GLOBAL.debug_dbug = @saved_dbug; # Clear Last_SQL_Error RESET SLAVE; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_bug41902.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_bug41902.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_bug41902.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_bug41902.test 2020-01-26 18:37:28.000000000 +0000 @@ -15,7 +15,7 @@ connection slave; stop slave; - +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; --error ER_UNKNOWN_TARGET_BINLOG @@ -36,6 +36,7 @@ change master to master_host='dummy'; connection master; +SET @saved_dbug_m = @@global.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; --error ER_UNKNOWN_TARGET_BINLOG reset master; @@ -53,10 +54,12 @@ --disable_query_log call mtr.add_suppression("Failed to locate old binlog or relay log files"); call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index"); +set @@global.debug_dbug = @saved_dbug_m; connection slave; call mtr.add_suppression("Failed to locate old binlog or relay log files"); call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index"); --enable_query_log +SET @@GLOBAL.debug_dbug = @saved_dbug; --echo ==== clean up ==== CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_domain_id_filter_io_crash.test 2020-01-26 18:37:28.000000000 +0000 @@ -35,6 +35,7 @@ --echo DO_DOMAIN_IDS (AFTER) : $do_domain_ids_after --echo IGNORE_DOMAIN_IDS (AFTER) : $ignore_domain_ids_after +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug="+d,kill_slave_io_before_commit"; connection master; @@ -379,5 +380,5 @@ --source include/stop_slave.inc CHANGE MASTER TO DO_DOMAIN_IDS=(), IGNORE_DOMAIN_IDS=(); --source include/start_slave.inc - +SET @@GLOBAL.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_domain_id_filter_master_crash.test 2020-01-26 18:37:28.000000000 +0000 @@ -64,7 +64,6 @@ #--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --source include/wait_until_connected_again.inc --echo # Master has restarted successfully -set @@global.debug_dbug="-d"; save_master_pos; --connection slave diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test 2020-01-26 18:37:28.000000000 +0000 @@ -26,7 +26,7 @@ call mtr.add_suppression("Slave I/O thread .* register on master"); #Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection -let $debug_saved= `select @@global.debug`; +SET @saved_dbug = @@GLOBAL.debug_dbug; # set up two parameters to pass into include/rpl_get_master_version_and_clock let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP'; @@ -40,11 +40,9 @@ let $debug_sync_action= 'now SIGNAL signal.get_server_id'; source include/rpl_get_master_version_and_clock.test; -eval set global debug_dbug= '$debug_saved'; - # cleanup - +SET @@GLOBAL.debug_dbug = @saved_dbug; # is not really necessary but avoids mtr post-run env check warnings SET DEBUG_SYNC= 'RESET'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_gtid_reconnect.test 2020-01-26 18:37:28.000000000 +0000 @@ -42,7 +42,7 @@ # interfere with our DBUG error injection. --source include/kill_binlog_dump_threads.inc INSERT INTO t1 VALUES (10); -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,dummy_disable_default_dbug_output"; SET GLOBAL debug_dbug="+d,gtid_force_reconnect_at_10_1_100"; --save_master_pos diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -18,7 +18,7 @@ # default period slave_net_timeout/2 # --query_vertical show status like 'Slave_heartbeat_period'; -SET @save_dbug= @@GLOBAL.debug_dbug; +SET @saved_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error"; CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error'); CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again'); @@ -44,7 +44,7 @@ connection slave; --source include/stop_slave.inc --disable_warnings -SET GLOBAL debug_dbug=@save_dbug; +SET GLOBAL debug_dbug=@saved_dbug; set @@global.slave_net_timeout= @restore_slave_net_timeout; --enable_warnings --source include/start_slave.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_ip_mix.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_ip_mix.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_ip_mix.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_ip_mix.test 2020-01-26 18:37:28.000000000 +0000 @@ -44,3 +44,5 @@ # clean up CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; +--connection slave +reset slave all; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_ip_mix2.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_ip_mix2.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_ip_mix2.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_ip_mix2.test 2020-01-26 18:37:28.000000000 +0000 @@ -45,3 +45,5 @@ # clean up CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root'; +connection slave; +reset slave all; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test 2020-01-26 18:37:28.000000000 +0000 @@ -5,9 +5,7 @@ --source include/master-slave.inc connection master; - set @old_master_binlog_checksum= @@global.binlog_checksum; -set @old_slave_dbug= @@global.debug_dbug; # MDEV-4475: Cannot replicate to old server when binlog contains # empty Gtid_list event @@ -16,6 +14,7 @@ connection slave; --source include/stop_slave.inc --echo # Test slave with no capability gets dummy event, which is ignored. +set @old_dbug= @@global.debug_dbug; SET @@global.debug_dbug='+d,simulate_slave_capability_none'; --source include/start_slave.inc @@ -52,7 +51,7 @@ let $binlog_start= $relaylog_start; let $binlog_limit=0,10; --source include/show_relaylog_events.inc -set @@global.debug_dbug= @old_slave_dbug; +set @@global.debug_dbug= @old_dbug; --echo # Test dummy event is checksummed correctly. @@ -150,11 +149,10 @@ select @@global.log_slave_updates; select @@global.replicate_annotate_row_events; -set @@global.debug_dbug= @old_slave_dbug; - --echo Clean up. connection master; set @@global.binlog_checksum = @old_master_binlog_checksum; DROP TABLE t1, t2; sync_slave_with_master; +set @@global.debug_dbug= @old_dbug; --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_mdev-11092.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_mdev-11092.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_mdev-11092.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_mdev-11092.test 2020-01-26 18:37:28.000000000 +0000 @@ -6,7 +6,7 @@ ######################################################################################## call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); -call mtr.add_suppression("Slave SQL: The incident LOST_EVENTS occured on the master. .*"); +call mtr.add_suppression("Slave SQL: The incident LOST_EVENTS occurred on the master. .*"); let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1); let $old_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "binlog_cache_size", Value, 1); diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_parallel_ignored_errors.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_parallel_ignored_errors.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_parallel_ignored_errors.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_parallel_ignored_errors.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--source include/rpl_parallel_ignored_errors.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test 2020-01-26 18:37:28.000000000 +0000 @@ -325,7 +325,7 @@ --connection server_2 --source include/sync_with_master_gtid.inc --source include/stop_slave.inc -SET @old_dbug= @@GLOBAL.debug_dbug; +SET @old_debug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug= '+d,inject_analyze_table_sleep'; --connection server_1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_read_only2.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_read_only2.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_read_only2.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_read_only2.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,30 @@ +--source include/have_binlog_format_statement.inc +--source include/master-slave.inc + +--echo # +--echo # Ensure that read-only slave logs temporary table statements under statement based +--echo # replication. This is related to MDEV-17863. +--echo # + +connection slave; +set global read_only=1; + +connection master; + +create table t1(a int) engine=MyISAM; +create temporary table tmp1 (a int) engine=MyISAM; +insert into t1 values(1); +insert into tmp1 values (2); +insert into t1 select * from tmp1; +insert into t1 values(3); +select * from t1; +analyze table t1; +drop table t1; +drop temporary table tmp1; + +sync_slave_with_master; +--source include/show_binlog_events.inc +set global read_only=0; +connection master; + +--source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_rotate_logs.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_rotate_logs.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_rotate_logs.test 2020-01-26 18:37:28.000000000 +0000 @@ -193,4 +193,8 @@ purge master logs before now(); --echo End of 5.0 tests +--echo #cleanup + +--remove_file $MYSQLD_SLAVE_DATADIR/master.info --source include/stop_slave.inc +reset slave all; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_row_big_table_id.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_big_table_id.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_row_big_table_id.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_big_table_id.test 2020-01-26 18:37:28.000000000 +0000 @@ -17,6 +17,7 @@ --let $rpl_server_number= 1 --source include/rpl_restart_server.inc +SET @saved_dbug = @@SESSION.debug_dbug; SET @@debug_dbug="d,simulate_big_table_id"; CREATE TABLE t (a int); @@ -51,7 +52,7 @@ --connection master DROP TABLE t; - +SET debug_dbug= @saved_dbug; --sync_slave_with_master --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -9,7 +9,7 @@ # - setup log_warnings and debug --connection slave --source include/stop_slave.inc ---let $debug_save= `SELECT @@GLOBAL.debug_dbug` +SET @saved_dbug = @@GLOBAL.debug_dbug; --let $log_warnings_save= `SELECT @@GLOBAL.log_warnings` SET GLOBAL log_warnings = 2; @@ -42,20 +42,15 @@ --sync_slave_with_master --echo # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log -perl; - use strict; - my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set"; - open(FILE, "$log_error") or die("Unable to open $log_error: $!\n"); - my $upd_count = () = grep(/The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount/g,); - seek(FILE, 0, 0) or die "Can't seek to beginning of file: $!"; - my $del_count = () = grep(/The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/g,); - print "Occurrences: update=$upd_count, delete=$del_count\n"; - close(FILE); -EOF +--let SEARCH_FILE=$log_error_ +--let SEARCH_PATTERN=The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount +--source include/search_pattern_in_file.inc +--let SEARCH_PATTERN=The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount +--source include/search_pattern_in_file.inc # cleanup --source include/stop_slave.inc ---eval SET GLOBAL debug_dbug = '$debug_save' +SET @@GLOBAL.debug_dbug = @saved_dbug; --eval SET GLOBAL log_warnings = $log_warnings_save --source include/start_slave.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_row_index_choice.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_index_choice.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_row_index_choice.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_row_index_choice.test 2020-01-26 18:37:28.000000000 +0000 @@ -47,6 +47,7 @@ connection slave; ANALYZE TABLE t2; --echo # Slave will crash if using the wrong or no index +SET @saved_dbug = @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; connection master; @@ -238,6 +239,5 @@ DROP TABLE t1; sync_slave_with_master; connection slave; -SET GLOBAL debug_dbug=""; - +SET @@GLOBAL.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_semi_sync_gtid_reconnect.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_gtid_reconnect.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_semi_sync_gtid_reconnect.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_gtid_reconnect.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,74 @@ +source include/not_embedded.inc; +source include/have_binlog_format_mixed.inc; +source include/master-slave.inc; + +# +# Semisync initialization +# +--connection master +RESET MASTER; +--let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled` +SET @@GLOBAL.rpl_semi_sync_master_enabled = 1; + +--connection slave +source include/stop_slave.inc; +--let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled` +SET @@GLOBAL. rpl_semi_sync_slave_enabled = 1; +source include/start_slave.inc; + +# Prove fixes to +# MDEV-19376 Assert (!m_active_tranxs->is_tranx_end_pos(trx_wait_binlog_name...) +# +# +# Run few queries to replicate/execute on slave. +# Stop the slave applier. +# Replicate/not-executed few more. +# Restart the slave. +# +--connection master +CREATE TABLE t1 (a INT); +INSERT INTO t1 SET a = 1; +--source include/save_master_gtid.inc +--let $resume_gtid = $master_pos +FLUSH LOGS; +INSERT INTO t1 SET a = 2; + +--sync_slave_with_master +--connection slave +--source include/stop_slave_sql.inc + +--connection master +INSERT INTO t1 SET a = 3; + +# the sync connection is 'slave' by default +--source include/sync_slave_io_with_master.inc +--connection slave +--source include/stop_slave_io.inc + +--connection master +RESET MASTER; +--eval SET @@global.gtid_binlog_state = '$resume_gtid' + +# The resume gtid is set up to point to the very first binlog file +--connection slave +CHANGE MASTER TO MASTER_USE_GTID = slave_pos; +--eval SET @@global.gtid_slave_pos = '$resume_gtid' +# Yet the slave io first submits the last received binlog file name:pos. +--source include/start_slave.inc + +# Here goes the cracker. +--connection master +INSERT INTO t1 SET a = 4; + +# +# Clean up +# +--connection master +DROP TABLE t1; +--eval SET @@GLOBAL. rpl_semi_sync_master_enabled = $sav_enabled_master + +--sync_slave_with_master +source include/stop_slave.inc; +--eval SET @@GLOBAL. rpl_semi_sync_slave_enabled = $sav_enabled_slave +source include/start_slave.inc; +--source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test 2020-01-26 18:37:28.000000000 +0000 @@ -32,7 +32,7 @@ CREATE TABLE t1 (a INT) ENGINE=innodb; # Make the following events as if they offset over 2GB from the beginning of binlog ---let $sav_debug_dbug=@@GLOBAL.debug_dbug +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB"; SET @@SESSION.skip_replication=1; INSERT INTO t1 SET a=1; @@ -50,7 +50,7 @@ # Clean up # --connection master ---eval SET @@GLOBAL.debug_dbug=$sav_debug_dbug +SET @@GLOBAL.debug_dbug = @saved_dbug; --eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master --eval SET @@GLOBAL.rpl_semi_sync_master_enabled = $sav_enabled_master diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_semi_sync_slave_reply_fail.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,87 @@ +# ==== Purpose ==== +# +# Test verifies that slave IO thread doesn't report an error, when slave fails +# to send an acknowledgment to master with semi sync replication in use. +# +# ==== Implementation ==== +# +# Steps: +# 0 - Have semi synchronous replication in use. +# 1 - Enable a debug simulation point which simulates network flush failure +# at the time of slave reply operation. +# 2 - Do some operation on master and wait for it to be replicated. Master +# will timeout waiting for reply from slave. +# 3 - Check the slave error log for appropriate error message regarding +# net_flush operation failure. +# 4 - Remove the debug simulation and do some more DML operations on master +# and wait for them to be replicated. +# 5 - Slave will be able to replicate and data is consistent on both master +# and slave. Semi sync will be automatically turned on. +# +# ==== References ==== +# +# MDEV-20217: Semi_sync: Last_IO_Error: Fatal error: Failed to run +# 'after_queue_event' hook +# +--source include/have_debug.inc +--source include/master-slave.inc + +--connection slave +--source include/stop_slave.inc + +--connection master +call mtr.add_suppression("Timeout waiting for reply of binlog*"); +--let $sav_timeout_master=`SELECT @@GLOBAL.rpl_semi_sync_master_timeout` +set global rpl_semi_sync_master_enabled = ON; +SET @@GLOBAL.rpl_semi_sync_master_timeout=100; +create table t1 (i int); + +--connection slave +set global rpl_semi_sync_slave_enabled = ON; +CALL mtr.add_suppression("Semi-sync slave net_flush*"); +SET @save_debug= @@global.debug; +SET GLOBAL debug_dbug="+d,semislave_failed_net_flush"; +--source include/start_slave.inc + +--connection master +--sync_slave_with_master + +# Check error log for correct messages. +let $log_error_= `SELECT @@GLOBAL.log_error`; +if(!$log_error_) +{ + # MySQL Server on windows is started with --console and thus + # does not know the location of its .err log, use default location + let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.2.err; +} +--echo "Assert that the net_fulsh() reply failed is present in slave error log. +--let SEARCH_FILE=$log_error_ +--let SEARCH_PATTERN=Semi-sync slave net_flush\(\) reply failed +--source include/search_pattern_in_file.inc + +--echo "Assert that Slave IO thread is up and running." +SHOW STATUS LIKE 'Slave_running'; +let $status= query_get_value("show slave status", Slave_IO_Running, 1); +echo Slave_IO_Running= $status; + +--echo "Clear the network failure simulation." +SET GLOBAL debug_dbug= @save_debug; + +--connection master +insert into t1 values (10); +--sync_slave_with_master + +--connection slave +--echo # Compare the tables on master and slave. +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc + +--connection master +drop table t1; +--sync_slave_with_master +set global rpl_semi_sync_slave_enabled = OFF; + +--connection master +set global rpl_semi_sync_master_enabled = OFF; +--eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master +--source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_show_slave_running.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_show_slave_running.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_show_slave_running.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_show_slave_running.test 2020-01-26 18:37:28.000000000 +0000 @@ -11,7 +11,7 @@ SET DEBUG_SYNC= 'RESET'; source include/stop_slave.inc; -let $debug_saved= `select @@global.debug`; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= 'd,dbug.before_get_running_status_yes'; # to block due-started IO # Test 1. Slave is stopped @@ -77,7 +77,7 @@ connection slave; -eval set global debug_dbug= '$debug_saved'; +SET @@GLOBAL.debug_dbug = @saved_dbug; SET DEBUG_SYNC= 'RESET'; --echo End of tests --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_skip_error.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_skip_error.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_skip_error.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_skip_error.test 2020-01-26 18:37:28.000000000 +0000 @@ -26,6 +26,10 @@ source include/have_innodb.inc; source include/master-slave.inc; +--connection slave +let $initial_skipped_error= query_get_value(show global status like "Slave_skipped_errors", Value, 1); + +connection master; --echo ==== Test Without sql_mode=strict_trans_tables ==== create table t1 (n int not null primary key); @@ -133,8 +137,9 @@ CREATE TABLE t2(id INT NOT NULL PRIMARY KEY, data INT) Engine=MyIsam; SHOW CREATE TABLE t2; -show global status like 'slave_skipped_errors'; - +let $current_skipped_error= query_get_value(show global status like "Slave_skipped_errors", Value, 1); +--let $delta_skipped_error= `select $current_skipped_error - $initial_skipped_error from dual` +--echo # Slave_skipped_errros = $delta_skipped_error connection master; INSERT INTO t2 VALUES(1, 1); @@ -151,7 +156,10 @@ let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); echo $error; -show global status like 'slave_skipped_errors'; + +let $current_skipped_error= query_get_value(show global status like "Slave_skipped_errors", Value, 1); +--let $delta_skipped_error= `select $current_skipped_error - $initial_skipped_error from dual` +--echo # Slave_skipped_errros = $delta_skipped_error --echo **** We cannot execute a select as there are differences in the --echo **** behavior between STMT and RBR. diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test 2020-01-26 18:37:28.000000000 +0000 @@ -29,7 +29,7 @@ ########################################################################## connection slave; ---let $old_debug= `SELECT @@global.debug_dbug` +SET @saved_dbug = @@GLOBAL.debug_dbug; SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write'; connection master; @@ -74,7 +74,7 @@ call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29"); --let $rpl_only_running_threads= 1 -eval SET @@global.debug_dbug= '$old_debug'; +SET @@GLOBAL.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test 2020-01-26 18:37:28.000000000 +0000 @@ -3,10 +3,10 @@ # For details look into extra/rpl_tests/rpl_lower_case_table_names.test # +-- source include/have_binlog_format_mixed_or_statement.inc -- source include/master-slave.inc -- source include/have_innodb.inc -- source include/not_windows.inc --- source include/have_binlog_format_mixed_or_statement.inc -- let $engine=InnoDB -- source include/rpl_lower_case_table_names.test diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_stop_slave.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_stop_slave.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_stop_slave.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_stop_slave.test 2020-01-26 18:37:28.000000000 +0000 @@ -22,7 +22,7 @@ --echo # Suspend the INSERT statement in current transaction on SQL thread. --echo # It guarantees that SQL thread is applying the transaction when --echo # STOP SLAVE command launchs. -set @old_debug=@@global.debug; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= '+d,after_mysql_insert'; source include/start_slave.inc; @@ -44,9 +44,7 @@ --echo --echo # Test end ---disable_query_log -set global debug_dbug= @old_debug; ---enable_query_log +SET @@GLOBAL.debug_dbug = @saved_dbug; source include/restart_slave_sql.inc; connection slave; @@ -79,7 +77,7 @@ # make sure that there are no zombie threads --source include/stop_dump_threads.inc -set @old_debug=@@global.debug; +SET @saved_dbug = @@GLOBAL.debug_dbug; set global debug_dbug= '+d,dump_thread_wait_before_send_xid'; connection slave; @@ -126,9 +124,7 @@ # sure that we disable the DBUG_EXECUTE_IF # that would set the dump thread to wait connection master; ---disable_query_log -set global debug_dbug= @old_debug; ---enable_query_log +SET @@GLOBAL.debug_dbug = @saved_dbug; # make sure that there are no zombie threads --source include/stop_dump_threads.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_view_debug.test mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_view_debug.test --- mariadb-10.3-10.3.18/mysql-test/suite/rpl/t/rpl_view_debug.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/rpl/t/rpl_view_debug.test 2020-01-26 18:37:28.000000000 +0000 @@ -18,6 +18,7 @@ # view already has to be on slave show tables; connection master; +SET @saved_dbug = @@SESSION.debug_dbug; set @@debug_dbug="d,simulate_register_view_failure"; --error ER_OUT_OF_RESOURCES @@ -30,5 +31,5 @@ connection master; DROP VIEW IF EXISTS v1; DROP TABLE t1; - +SET debug_dbug= @saved_dbug; --source include/rpl_end.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/other.result mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/other.result --- mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/other.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/other.result 2020-01-26 18:37:28.000000000 +0000 @@ -209,4 +209,95 @@ ERROR HY000: Storage engine SEQUENCE of the table `test`.`s` doesn't have this option DROP SEQUENCE s; DROP TABLE t1; +# +# MDEV-20074: Lost connection on update trigger +# +# INSERT & table +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +INSERT INTO t2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name); +END; +$$ +update t1 set p_first_name='Yunxi' where p_id=1; +drop sequence s1; +drop table t1,t2; +# INSERT & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +INSERT INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name); +END; +$$ +update t1 set p_first_name='Yunxi' where p_id=1; +drop view v2; +drop table t1,t2; +drop sequence s1; +# INSERT SELECT & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +INSERT INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name; +END; +$$ +update t1 set p_first_name='Yunxi' where p_id=1; +drop view v2; +drop table t1,t2; +drop sequence s1; +# REPLACE & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +REPLACE INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name); +END; +$$ +update t1 set p_first_name='Yunxi' where p_id=1; +drop view v2; +drop table t1,t2; +drop sequence s1; +# REPLACE SELECT & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +REPLACE INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name; +END; +$$ +update t1 set p_first_name='Yunxi' where p_id=1; +drop view v2; +drop table t1,t2; +drop sequence s1; # End of 10.3 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/other.test mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/other.test --- mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/other.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/other.test 2020-01-26 18:37:28.000000000 +0000 @@ -179,4 +179,140 @@ DROP TABLE t1; +--echo # +--echo # MDEV-20074: Lost connection on update trigger +--echo # + +--echo # INSERT & table +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); + +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); + +DELIMITER $$; + +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +INSERT INTO t2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name); +END; +$$ +DELIMITER ;$$ + +update t1 set p_first_name='Yunxi' where p_id=1; + +drop sequence s1; +drop table t1,t2; + + +--echo # INSERT & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; + +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); + +DELIMITER $$; + +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +INSERT INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name); +END; +$$ +DELIMITER ;$$ + +update t1 set p_first_name='Yunxi' where p_id=1; + +drop view v2; +drop table t1,t2; +drop sequence s1; + + +--echo # INSERT SELECT & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; + +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); + +DELIMITER $$; + +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +INSERT INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name; +END; +$$ +DELIMITER ;$$ + +update t1 set p_first_name='Yunxi' where p_id=1; + +drop view v2; +drop table t1,t2; +drop sequence s1; + + +--echo # REPLACE & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; + +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); + +DELIMITER $$; + +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +REPLACE INTO v2(a_p_name, a_p_first_name) VALUES(old.p_name, old.p_first_name); +END; +$$ +DELIMITER ;$$ + +update t1 set p_first_name='Yunxi' where p_id=1; + +drop view v2; +drop table t1,t2; +drop sequence s1; + + +--echo # REPLACE SELECT & view +create sequence s1 increment by 1 start with 1; +create table t1 (p_id integer, p_name varchar(128), p_first_name varchar(128)); +create table t2 (a_id integer default nextval(s1), a_p_name varchar(128), a_p_first_name varchar(128), t timestamp default current_timestamp); +create view v2 as select * from t2; + +insert into t1 values +(1, 'Luo','Frank'),(2, 'Xe','Emma'),(3, 'Li','Anna'),(4, 'Lun','Serg'),(5, 'Xu','Nils'),(6, 'Ja','Ute'),(7, 'Jin','Mike'),(8, 'Lio','Carl'),(9, 'Lang','Kevin'),(10, 'Ling','Lisa'),(11, 'Fang','Frank'),(12, 'Feng','Emma'),(13, 'Tuo','Anna'),(14, 'Tua','Serg'),(15, 'Moa','Nils'),(16, 'Hua','Ute'),(17, 'Xufa','Mike'),(18, 'Lulu','Carl'),(19, 'Hoho','Kevin'),(20, 'Tata','Lisa'); + +DELIMITER $$; + +CREATE TRIGGER tr_upd +BEFORE UPDATE on t1 +FOR EACH ROW +BEGIN +REPLACE INTO v2(a_p_name, a_p_first_name) SELECT old.p_name, old.p_first_name; +END; +$$ +DELIMITER ;$$ + +update t1 set p_first_name='Yunxi' where p_id=1; + +drop view v2; +drop table t1,t2; +drop sequence s1; + --echo # End of 10.3 tests diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/rebuild.result mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/rebuild.result --- mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/rebuild.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/rebuild.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,161 @@ +# +# MDEV-15977 Assertion `! thd->in_sub_stmt' failed in trans_commit_stmt +# +CREATE SEQUENCE s1 ENGINE=InnoDB; +ALTER TABLE s1 FORCE; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +CREATE TABLE t2 (b VARCHAR(64)) ENGINE=MyISAM; +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.PARTITIONS; +INSERT INTO t1 VALUES (1); +select * from t1; +a +1 +select * from t2; +b +ALL_PLUGINS +APPLICABLE_ROLES +CHARACTER_SETS +CHECK_CONSTRAINTS +CLIENT_STATISTICS +COLLATIONS +COLLATION_CHARACTER_SET_APPLICABILITY +COLUMNS +COLUMN_PRIVILEGES +ENABLED_ROLES +ENGINES +EVENTS +FILES +GEOMETRY_COLUMNS +GLOBAL_STATUS +GLOBAL_VARIABLES +INDEX_STATISTICS +INNODB_BUFFER_PAGE +INNODB_BUFFER_PAGE_LRU +INNODB_BUFFER_POOL_STATS +INNODB_CMPMEM +INNODB_CMP_PER_INDEX +INNODB_LOCKS +INNODB_LOCK_WAITS +INNODB_METRICS +INNODB_SYS_COLUMNS +INNODB_SYS_FIELDS +INNODB_SYS_FOREIGN +INNODB_SYS_FOREIGN_COLS +INNODB_SYS_INDEXES +INNODB_SYS_TABLES +INNODB_SYS_VIRTUAL +INNODB_TRX +KEY_CACHES +KEY_COLUMN_USAGE +PARAMETERS +PARTITIONS +PLUGINS +PROCESSLIST +PROFILING +REFERENTIAL_CONSTRAINTS +ROUTINES +SCHEMATA +SCHEMA_PRIVILEGES +SESSION_STATUS +SESSION_VARIABLES +SPATIAL_REF_SYS +STATISTICS +SYSTEM_VARIABLES +TABLES +TABLESPACES +TABLE_CONSTRAINTS +TABLE_PRIVILEGES +TABLE_STATISTICS +TRIGGERS +USER_PRIVILEGES +USER_STATISTICS +VIEWS +accounts +column_stats +columns_priv +cond_instances +db +event +events_stages_current +events_stages_history +events_stages_history_long +events_stages_summary_by_account_by_event_name +events_stages_summary_by_host_by_event_name +events_stages_summary_by_thread_by_event_name +events_stages_summary_by_user_by_event_name +events_stages_summary_global_by_event_name +events_statements_current +events_statements_history +events_statements_history_long +events_statements_summary_by_account_by_event_name +events_statements_summary_by_digest +events_statements_summary_by_host_by_event_name +events_statements_summary_by_thread_by_event_name +events_statements_summary_by_user_by_event_name +events_statements_summary_global_by_event_name +events_waits_current +events_waits_history +events_waits_history_long +events_waits_summary_by_account_by_event_name +events_waits_summary_by_host_by_event_name +events_waits_summary_by_instance +events_waits_summary_by_thread_by_event_name +events_waits_summary_by_user_by_event_name +events_waits_summary_global_by_event_name +file_instances +file_summary_by_event_name +file_summary_by_instance +func +general_log +global_suppressions +gtid_slave_pos +help_category +help_keyword +help_relation +help_topic +host +host_cache +hosts +index_stats +innodb_index_stats +innodb_table_stats +mutex_instances +objects_summary_global_by_type +performance_timers +plugin +proc +procs_priv +proxies_priv +roles_mapping +rwlock_instances +s1 +servers +session_account_connect_attrs +session_connect_attrs +setup_actors +setup_consumers +setup_instruments +setup_objects +setup_timers +slow_log +socket_instances +socket_summary_by_event_name +socket_summary_by_instance +t1 +t2 +table_io_waits_summary_by_index_usage +table_io_waits_summary_by_table +table_lock_waits_summary_by_table +table_stats +tables_priv +test_suppressions +threads +time_zone +time_zone_leap_second +time_zone_name +time_zone_transition +time_zone_transition_type +transaction_registry +user +users +DROP TABLE t1, t2, s1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/rebuild.test mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/rebuild.test --- mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/rebuild.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/rebuild.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,20 @@ +--source include/have_innodb.inc + +--echo # +--echo # MDEV-15977 Assertion `! thd->in_sub_stmt' failed in trans_commit_stmt +--echo # + +CREATE SEQUENCE s1 ENGINE=InnoDB; +ALTER TABLE s1 FORCE; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +CREATE TABLE t2 (b VARCHAR(64)) ENGINE=MyISAM; +CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 SELECT TABLE_NAME FROM INFORMATION_SCHEMA.PARTITIONS; +INSERT INTO t1 VALUES (1); +--sorted_result +select * from t1; +--sorted_result +select * from t2; + +# Cleanup +DROP TABLE t1, t2, s1; + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/view.result mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/view.result --- mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/view.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/view.result 2020-01-26 18:37:28.000000000 +0000 @@ -24,3 +24,13 @@ SELECT PREVIOUS VALUE FOR v1; ERROR 42S02: 'test.v1' is not a SEQUENCE drop view v1; +# +# MDEV 17978 Server crashes in mysqld_show_create_get_fields +# upon SHOW CREATE SEQUENCE on a broken view +# +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +DROP TABLE t1; +SHOW CREATE SEQUENCE v1; +ERROR 42S02: 'test.v1' is not a SEQUENCE +DROP VIEW v1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/view.test mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/view.test --- mariadb-10.3-10.3.18/mysql-test/suite/sql_sequence/view.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sql_sequence/view.test 2020-01-26 18:37:28.000000000 +0000 @@ -27,3 +27,14 @@ --error ER_NOT_SEQUENCE SELECT PREVIOUS VALUE FOR v1; drop view v1; + +--echo # +--echo # MDEV 17978 Server crashes in mysqld_show_create_get_fields +--echo # upon SHOW CREATE SEQUENCE on a broken view +--echo # +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT * FROM t1; +DROP TABLE t1; +--error ER_NOT_SEQUENCE +SHOW CREATE SEQUENCE v1; +DROP VIEW v1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/debug_dbug_func.result mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/debug_dbug_func.result --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/debug_dbug_func.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/debug_dbug_func.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,55 +1,55 @@ -SET @old_debug = @@GLOBAL.debug; -set debug_dbug= 'T'; -select @@debug; -@@debug +SET @old_debug = @@GLOBAL.debug_dbug; +SET debug_dbug= 'T'; +select @@debug_dbug; +@@debug_dbug T -set debug_dbug= '+P'; -select @@debug; -@@debug +SET debug_dbug= '+P'; +select @@debug_dbug; +@@debug_dbug P:T -set debug_dbug= '-P'; -select @@debug; -@@debug +SET debug_dbug= '-P'; +select @@debug_dbug; +@@debug_dbug T -SELECT @@session.debug, @@global.debug; -@@session.debug @@global.debug +SELECT @@session.debug_dbug, @@global.debug_dbug; +@@session.debug_dbug @@global.debug_dbug T SET SESSION debug_dbug= ''; -SELECT @@session.debug, @@global.debug; -@@session.debug @@global.debug +SELECT @@session.debug_dbug, @@global.debug_dbug; +@@session.debug_dbug @@global.debug_dbug # # Bug #52629: memory leak from sys_var_thd_dbug in # binlog.binlog_write_error # SET GLOBAL debug_dbug='d,injecting_fault_writing'; -SELECT @@global.debug; -@@global.debug +SELECT @@global.debug_dbug; +@@global.debug_dbug d,injecting_fault_writing SET GLOBAL debug_dbug=''; -SELECT @@global.debug; -@@global.debug +SELECT @@global.debug_dbug; +@@global.debug_dbug SET GLOBAL debug_dbug=@old_debug; # # Bug #56709: Memory leaks at running the 5.1 test suite # -SET @old_local_debug = @@debug; +SET @old_local_debug = @@debug_dbug; SET @@debug_dbug='d,foo'; -SELECT @@debug; -@@debug +SELECT @@debug_dbug; +@@debug_dbug d,foo SET @@debug_dbug=''; -SELECT @@debug; -@@debug +SELECT @@debug_dbug; +@@debug_dbug SET @@debug_dbug= @old_local_debug; End of 5.1 tests # # Bug#46165 server crash in dbug # -SET @old_globaldebug = @@global.debug; -SET @old_sessiondebug= @@session.debug; +SET @old_globaldebug = @@global.debug_dbug; +SET @old_sessiondebug= @@session.debug_dbug; # Test 1 - Bug test case, single connection SET GLOBAL debug_dbug= '+O,MYSQL_TMP_DIR/bug46165.1.trace'; SET SESSION debug_dbug= '-d:-t:-i'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/delayed_insert_limit_func.result 2020-01-26 18:37:28.000000000 +0000 @@ -52,14 +52,12 @@ INSERT DELAYED INTO t1 VALUES('40','1','1'); INSERT DELAYED INTO t1 VALUES('41','1','1'); INSERT DELAYED INTO t1 VALUES('42','1','1'); -INSERT DELAYED INTO t1 VALUES('43','1','1');| +INSERT DELAYED INTO t1 VALUES('43','1','1'); connection con0; SELECT COUNT(*) FROM t1; connection default; ** Wait till con0 is blocked ** UNLOCK TABLES; -connection con1; -Asynchronous "reap" result connection con0; Asynchronous "reap" result The next result suffers from @@ -85,7 +83,6 @@ INSERT INTO t1 VALUES('6'); LOCK TABLE v1 READ; connection con1; -Asynchronous execute INSERT DELAYED INTO t1 VALUES('7'); INSERT DELAYED INTO t1 VALUES('8'); INSERT DELAYED INTO t1 VALUES('9'); @@ -101,23 +98,22 @@ INSERT DELAYED INTO t1 VALUES('19'); INSERT DELAYED INTO t1 VALUES('20'); INSERT DELAYED INTO t1 VALUES('21'); -INSERT DELAYED INTO t1 VALUES('22');| +INSERT DELAYED INTO t1 VALUES('22'); connection con0; Asynchronous execute -SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1; +SELECT COUNT(*) FROM t1; connection default; ** Wait till con0 is blocked ** UNLOCK TABLES; -connection con1; connection con0; Asynchronous "reap" result -COUNT(*) BETWEEN 6 AND 22 -1 +COUNT(*) +22 connection default; Checking if the delayed insert gives the same result afterwards -SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1; -COUNT(*) BETWEEN 6 AND 22 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +22 connection default; DROP TABLE t1; DROP VIEW v1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/innodb_buffer_pool_size_basic.result 2020-01-26 18:37:28.000000000 +0000 @@ -50,5 +50,3 @@ 1 Expected SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size; ERROR 42S22: Unknown column 'innodb_buffer_pool_size' in 'field list' -Expected error 'Readonly variable' -SET @@GLOBAL.innodb_buffer_pool_size = @start_buffer_pool_size; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result 2020-01-26 18:37:28.000000000 +0000 @@ -55,6 +55,12 @@ Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '-2' set global innodb_change_buffering_debug=1e1; ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug' +set global innodb_change_buffering_debug=2; +Warnings: +Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '2' +select @@global.innodb_change_buffering_debug; +@@global.innodb_change_buffering_debug +1 SET @@global.innodb_change_buffering_debug = @start_global_value; SELECT @@global.innodb_change_buffering_debug; @@global.innodb_change_buffering_debug diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/sysvars_innodb.result mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/sysvars_innodb.result --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/sysvars_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/sysvars_innodb.result 2020-01-26 18:37:28.000000000 +0000 @@ -326,13 +326,25 @@ DEFAULT_VALUE 0 VARIABLE_SCOPE GLOBAL VARIABLE_TYPE INT UNSIGNED -VARIABLE_COMMENT Debug flags for InnoDB change buffering (0=none, 2=crash at merge) +VARIABLE_COMMENT Debug flags for InnoDB change buffering (0=none, 1=try to buffer) NUMERIC_MIN_VALUE 0 -NUMERIC_MAX_VALUE 2 +NUMERIC_MAX_VALUE 1 NUMERIC_BLOCK_SIZE 0 ENUM_VALUE_LIST NULL READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME INNODB_CHANGE_BUFFER_DUMP +SESSION_VALUE NULL +DEFAULT_VALUE OFF +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE BOOLEAN +VARIABLE_COMMENT Dump the change buffer at startup. +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST OFF,ON +READ_ONLY YES +COMMAND_LINE_ARGUMENT NONE VARIABLE_NAME INNODB_CHANGE_BUFFER_MAX_SIZE SESSION_VALUE NULL DEFAULT_VALUE 25 @@ -525,6 +537,18 @@ ENUM_VALUE_LIST OFF,ON READ_ONLY NO COMMAND_LINE_ARGUMENT REQUIRED +VARIABLE_NAME INNODB_DEBUG_SYNC +SESSION_VALUE NULL +DEFAULT_VALUE +VARIABLE_SCOPE GLOBAL +VARIABLE_TYPE VARCHAR +VARIABLE_COMMENT debug_sync for innodb purge threads. Use it to set up sync points for all purge threads at once. The commands will be applied sequentially at the beginning of purging the next undo record. +NUMERIC_MIN_VALUE NULL +NUMERIC_MAX_VALUE NULL +NUMERIC_BLOCK_SIZE NULL +ENUM_VALUE_LIST NULL +READ_ONLY NO +COMMAND_LINE_ARGUMENT NONE VARIABLE_NAME INNODB_DEFAULT_ENCRYPTION_KEY_ID SESSION_VALUE 1 DEFAULT_VALUE 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result 2020-01-26 18:37:28.000000000 +0000 @@ -3355,7 +3355,7 @@ VARIABLE_NAME SESSION_TRACK_TRANSACTION_INFO VARIABLE_SCOPE SESSION VARIABLE_TYPE ENUM -VARIABLE_COMMENT Track changes to the transaction attributes. OFF to disable; STATE to track just transaction state (Is there an active transaction? Does it have any data? etc.); CHARACTERISTICS to track transaction state and report all statements needed to start a transaction withthe same characteristics (isolation level, read only/read write,snapshot - but not any work done / data modified within the transaction). +VARIABLE_COMMENT Track changes to the transaction attributes. OFF to disable; STATE to track just transaction state (Is there an active transaction? Does it have any data? etc.); CHARACTERISTICS to track transaction state and report all statements needed to start a transaction with the same characteristics (isolation level, read only/read write,snapshot - but not any work done / data modified within the transaction). NUMERIC_MIN_VALUE NULL NUMERIC_MAX_VALUE NULL NUMERIC_BLOCK_SIZE NULL diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/debug_dbug_func.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/debug_dbug_func.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/debug_dbug_func.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/debug_dbug_func.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,27 +1,27 @@ --source include/have_debug.inc -SET @old_debug = @@GLOBAL.debug; +SET @old_debug = @@GLOBAL.debug_dbug; # -# Bug#34678 @@debug variable's incremental mode +# Bug#34678 @@debug_dbug variable's incremental mode # -set debug_dbug= 'T'; -select @@debug; -set debug_dbug= '+P'; -select @@debug; -set debug_dbug= '-P'; -select @@debug; +SET debug_dbug= 'T'; +select @@debug_dbug; +SET debug_dbug= '+P'; +select @@debug_dbug; +SET debug_dbug= '-P'; +select @@debug_dbug; # -# Bug#38054: "SET SESSION debug" modifies @@global.debug variable +# Bug#38054: "SET SESSION debug" modifies @@global.debug_dbug variable # -SELECT @@session.debug, @@global.debug; +SELECT @@session.debug_dbug, @@global.debug_dbug; SET SESSION debug_dbug= ''; -SELECT @@session.debug, @@global.debug; +SELECT @@session.debug_dbug, @@global.debug_dbug; --echo # --echo # Bug #52629: memory leak from sys_var_thd_dbug in @@ -29,9 +29,9 @@ --echo # SET GLOBAL debug_dbug='d,injecting_fault_writing'; -SELECT @@global.debug; +SELECT @@global.debug_dbug; SET GLOBAL debug_dbug=''; -SELECT @@global.debug; +SELECT @@global.debug_dbug; SET GLOBAL debug_dbug=@old_debug; @@ -39,12 +39,12 @@ --echo # Bug #56709: Memory leaks at running the 5.1 test suite --echo # -SET @old_local_debug = @@debug; +SET @old_local_debug = @@debug_dbug; SET @@debug_dbug='d,foo'; -SELECT @@debug; +SELECT @@debug_dbug; SET @@debug_dbug=''; -SELECT @@debug; +SELECT @@debug_dbug; SET @@debug_dbug= @old_local_debug; @@ -55,8 +55,8 @@ --echo # Bug#46165 server crash in dbug --echo # -SET @old_globaldebug = @@global.debug; -SET @old_sessiondebug= @@session.debug; +SET @old_globaldebug = @@global.debug_dbug; +SET @old_sessiondebug= @@session.debug_dbug; --echo # Test 1 - Bug test case, single connection --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test 2020-01-26 18:37:28.000000000 +0000 @@ -63,8 +63,6 @@ connection con1; -delimiter |; -send INSERT DELAYED INTO t1 VALUES('7','1','1'); INSERT DELAYED INTO t1 VALUES('8','1','1'); INSERT DELAYED INTO t1 VALUES('9','1','1'); @@ -101,8 +99,7 @@ INSERT DELAYED INTO t1 VALUES('40','1','1'); INSERT DELAYED INTO t1 VALUES('41','1','1'); INSERT DELAYED INTO t1 VALUES('42','1','1'); -INSERT DELAYED INTO t1 VALUES('43','1','1');| -delimiter ;| +INSERT DELAYED INTO t1 VALUES('43','1','1'); connection con0; let $wait_condition= @@ -121,10 +118,6 @@ --source include/wait_condition.inc UNLOCK TABLES; -connection con1; ---echo Asynchronous "reap" result -reap; - connection con0; --echo Asynchronous "reap" result --echo The next result suffers from @@ -161,10 +154,6 @@ connection con1; ---echo Asynchronous execute -delimiter |; - -send INSERT DELAYED INTO t1 VALUES('7'); INSERT DELAYED INTO t1 VALUES('8'); INSERT DELAYED INTO t1 VALUES('9'); @@ -180,9 +169,7 @@ INSERT DELAYED INTO t1 VALUES('19'); INSERT DELAYED INTO t1 VALUES('20'); INSERT DELAYED INTO t1 VALUES('21'); -INSERT DELAYED INTO t1 VALUES('22');| - -delimiter ;| +INSERT DELAYED INTO t1 VALUES('22'); connection con0; let $wait_condition= @@ -192,7 +179,7 @@ --echo Asynchronous execute # Due to performance and server behaveiour the test observes values between 6 and 22. # In any case the value must not be outside of that range. -let $my_select= SELECT COUNT(*) BETWEEN 6 AND 22 FROM t1; +let $my_select= SELECT COUNT(*) FROM t1; send; eval $my_select; @@ -204,9 +191,6 @@ --source include/wait_condition.inc UNLOCK TABLES; -connection con1; -reap; - connection con0; --echo Asynchronous "reap" result reap; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/ft_boolean_syntax_basic.test 2020-01-26 18:37:28.000000000 +0000 @@ -64,7 +64,7 @@ --echo '#--------------------FN_DYNVARS_033_03-------------------------#' ###################################################################### -# see if it is accessable using session scope # +# see if it is accessible using session scope # ###################################################################### --Error ER_GLOBAL_VARIABLE SET @@session.ft_boolean_syntax = '# -><()!*:""&|'; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/init_connect_basic.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/init_connect_basic.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/init_connect_basic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/init_connect_basic.test 2020-01-26 18:37:28.000000000 +0000 @@ -66,7 +66,7 @@ --echo '#--------------------FN_DYNVARS_036_03-------------------------#' ###################################################################### -# see if it is accessable using session scope # +# see if it is accessible using session scope # ###################################################################### --Error ER_GLOBAL_VARIABLE SET @@session.init_connect = ''; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/init_slave_basic.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/init_slave_basic.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/init_slave_basic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/init_slave_basic.test 2020-01-26 18:37:28.000000000 +0000 @@ -66,7 +66,7 @@ --echo '#--------------------FN_DYNVARS_037_03-------------------------#' ###################################################################### -# see if it is accessable using session scope # +# see if it is accessible using session scope # ###################################################################### --Error ER_GLOBAL_VARIABLE SET @@session.init_slave = ''; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/innodb_buffer_pool_size_basic.test 2020-01-26 18:37:28.000000000 +0000 @@ -27,7 +27,6 @@ --disable_query_log if (`select (version() like '%debug%') > 0`) { - set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug; set global innodb_disable_resize_buffer_pool_debug = OFF; } --enable_query_log @@ -116,15 +115,7 @@ --Error ER_BAD_FIELD_ERROR SELECT innodb_buffer_pool_size = @@SESSION.innodb_buffer_pool_size; ---echo Expected error 'Readonly variable' -SET @@GLOBAL.innodb_buffer_pool_size = @start_buffer_pool_size; ---source include/wait_condition.inc - ---disable_query_log -if (`select (version() like '%debug%') > 0`) -{ - set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize; -} ---enable_query_log +# Restore the original buffer pool size. +--source include/restart_mysqld.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test 2020-01-26 18:37:28.000000000 +0000 @@ -48,9 +48,8 @@ set global innodb_change_buffering_debug=-2; --error ER_WRONG_TYPE_FOR_VAR set global innodb_change_buffering_debug=1e1; -# The value 2 is supposed to kill the server if there are unmerged changes. -# Do not try to set the value to 2 or anything that can be clamped to 2. -#set global innodb_change_buffering_debug=2; +set global innodb_change_buffering_debug=2; +select @@global.innodb_change_buffering_debug; # # Cleanup diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/timestamp_basic.test mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/timestamp_basic.test --- mariadb-10.3-10.3.18/mysql-test/suite/sys_vars/t/timestamp_basic.test 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/sys_vars/t/timestamp_basic.test 2020-01-26 18:37:28.000000000 +0000 @@ -47,7 +47,7 @@ --echo '#---------------------FN_DYNVARS_001_02-------------------------#' ############################################################## -# see if accessable using global scope # +# see if accessible using global scope # ############################################################## --Error ER_LOCAL_VARIABLE diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/vcol/r/vcol_keys_innodb.result mariadb-10.3-10.3.22/mysql-test/suite/vcol/r/vcol_keys_innodb.result --- mariadb-10.3-10.3.18/mysql-test/suite/vcol/r/vcol_keys_innodb.result 2019-09-08 16:52:59.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/vcol/r/vcol_keys_innodb.result 2020-01-26 18:37:28.000000000 +0000 @@ -269,3 +269,18 @@ insert ignore into t1 (pk) values (1),(2); update t1 set col_char = 'foo' where pk = 1; drop table t1; +create table t1 ( +id int not null primary key, +a varchar(200), +b varchar(200), +c int, +va char(200) generated always as (ucase(a)) virtual, +vb char(200) generated always as (ucase(b)) virtual, +key (c,va,vb) +) engine=innodb; +insert t1 (id,a,c) select seq,seq,seq from seq_1_to_330; +select IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') from t1; +IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') +GOOD +alter table t1 drop column va; +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/vcol/t/vcol_keys_innodb.opt mariadb-10.3-10.3.22/mysql-test/suite/vcol/t/vcol_keys_innodb.opt --- mariadb-10.3-10.3.18/mysql-test/suite/vcol/t/vcol_keys_innodb.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/vcol/t/vcol_keys_innodb.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1 @@ +--innodb-sort-buffer-size=64k diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/vcol/t/vcol_keys_innodb.test mariadb-10.3-10.3.22/mysql-test/suite/vcol/t/vcol_keys_innodb.test --- mariadb-10.3-10.3.18/mysql-test/suite/vcol/t/vcol_keys_innodb.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/vcol/t/vcol_keys_innodb.test 2020-01-26 18:37:28.000000000 +0000 @@ -117,3 +117,21 @@ insert ignore into t1 (pk) values (1),(2); update t1 set col_char = 'foo' where pk = 1; drop table t1; + +# +# MDEV-20799 DROP Virtual Column crashes MariaDB +# +--source include/have_sequence.inc +create table t1 ( + id int not null primary key, + a varchar(200), + b varchar(200), + c int, + va char(200) generated always as (ucase(a)) virtual, + vb char(200) generated always as (ucase(b)) virtual, + key (c,va,vb) +) engine=innodb; +insert t1 (id,a,c) select seq,seq,seq from seq_1_to_330; +select IF(@@innodb_sort_buffer_size < count(*)*200, 'GOOD', 'WRONG SIZE') from t1; +alter table t1 drop column va; +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/common.inc mariadb-10.3-10.3.22/mysql-test/suite/versioning/common.inc --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/common.inc 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/common.inc 2020-01-26 18:37:28.000000000 +0000 @@ -4,8 +4,6 @@ --skip needs test_versioning plugin } source include/have_innodb.inc; -create database test2 character set latin1; -use test2; set @@session.time_zone='+00:00'; select ifnull(max(transaction_id), 0) into @start_trx_id from mysql.transaction_registry; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/common_finish.inc mariadb-10.3-10.3.22/mysql-test/suite/versioning/common_finish.inc --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/common_finish.inc 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/common_finish.inc 2020-01-26 18:37:28.000000000 +0000 @@ -5,7 +5,4 @@ drop function if exists current_row; drop function if exists check_row; --enable_warnings - -use test; -drop database test2; --enable_query_log diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/key_type.combinations mariadb-10.3-10.3.22/mysql-test/suite/versioning/key_type.combinations --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/key_type.combinations 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/key_type.combinations 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,3 @@ +[unique] +[pk] +[sec] diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/key_type.inc mariadb-10.3-10.3.22/mysql-test/suite/versioning/key_type.inc --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/key_type.inc 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/key_type.inc 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,14 @@ +--disable_query_log +if ($MTR_COMBINATION_UNIQUE) +{ + let $KEY_TYPE= unique; +} +if ($MTR_COMBINATION_PK) +{ + let $KEY_TYPE= primary key; +} +if ($MTR_COMBINATION_SEC) +{ + let $KEY_TYPE= key; +} +--enable_query_log diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/alter.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/alter.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/alter.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/alter.result 2020-01-26 18:37:28.000000000 +0000 @@ -18,13 +18,13 @@ `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING alter table t add column y int; -ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change @@system_versioning_alter_history to proceed with ALTER. +ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER. alter table t add primary key (a); -ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change @@system_versioning_alter_history to proceed with ALTER. +ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER. alter table t add unique key (a); -ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change @@system_versioning_alter_history to proceed with ALTER. +ERROR HY000: Not allowed for system-versioned `test`.`t`. Change @@system_versioning_alter_history to proceed with ALTER. alter table t engine innodb; -ERROR HY000: Not allowed for system-versioned `test2`.`t`. Change to/from native system versioning engine is not supported. +ERROR HY000: Not allowed for system-versioned `test`.`t`. Change to/from native system versioning engine is not supported. alter table t drop system versioning; show create table t; Table Create Table @@ -80,13 +80,17 @@ `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t add column trx_start timestamp(6) as row start; -ERROR HY000: Table `t` is not system-versioned +ERROR HY000: Duplicate ROW START column `trx_start` alter table t add system versioning; show create table t; Table Create Table t CREATE TABLE `t` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +alter table t add column trx_start timestamp(6) as row start; +ERROR HY000: Duplicate ROW START column `trx_start` +alter table t modify a int as row start; +ERROR HY000: Duplicate ROW START column `a` alter table t add column b int; show create table t; Table Create Table @@ -524,23 +528,23 @@ # use mysql; create or replace table t (x int) with system versioning; -ERROR HY000: System versioning tables in the `mysql` database are not suported +ERROR HY000: System versioning tables in the `mysql` database are not supported alter table user add system versioning; -ERROR HY000: System versioning tables in the `mysql` database are not suported -use test2; +ERROR HY000: System versioning tables in the `mysql` database are not supported +use test; # MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column create or replace table t1 (i int, j int as (i), s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning; alter table t1 modify s timestamp(6) as row start; -ERROR HY000: Can not change system versioning field `s` +ERROR HY000: Duplicate ROW START column `s` # ignore CHECK for historical rows create or replace table t (a int) with system versioning; insert into t values (0), (1); delete from t where a = 0; alter table t add check (a > 1); -ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test2`.`t` +ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t` alter table t add check (a > 0); insert into t values (0); -ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test2`.`t` +ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t` insert into t values (2); # # MDEV-18869 Assertion `!((field)->vcol_info && (field)->stored_in_db())' failed in innodb_col_no upon altering table with system versioning @@ -639,3 +643,44 @@ alter table t1 drop system versioning, add f2 int with system versioning; ERROR HY000: Table `t1` is not system-versioned drop table t1; +# MDEV-16490 It's possible to make a system versioned table without any versioning field +set @@system_versioning_alter_history=keep; +create or replace table t (a int) with system versioning engine=innodb; +alter table t change column a a int without system versioning; +ERROR HY000: Table `t` must have at least one versioned column +alter table t +change column a a int without system versioning, +add column b int with system versioning; +show create table t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +alter table t +change column a new_a int, +drop system versioning; +show create table t; +Table Create Table +t CREATE TABLE `t` ( + `new_a` int(11) DEFAULT NULL, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +alter table t add system versioning; +alter table t change column new_a a int without system versioning; +show create table t; +Table Create Table +t CREATE TABLE `t` ( + `a` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING, + `b` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING +alter table t +add column c int, +change column c c int without system versioning, +change column b b int without system versioning; +ERROR HY000: Table `t` must have at least one versioned column +alter table t +add column c int without system versioning, +change column c c int, +change column b b int without system versioning; +drop table t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/create.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/create.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/create.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/create.result 2020-01-26 18:37:28.000000000 +0000 @@ -15,7 +15,7 @@ ) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING select table_catalog,table_schema,table_name,table_type,version,table_rows,data_free,auto_increment,check_time,table_collation,checksum,create_options,table_comment from information_schema.tables where table_name='t1'; table_catalog def -table_schema test2 +table_schema test table_name t1 table_type SYSTEM VERSIONED version 10 @@ -29,7 +29,7 @@ table_comment select table_catalog,table_schema,table_name,column_name,ordinal_position,column_default,character_maximum_length,character_octet_length,character_set_name,collation_name,column_key,extra,column_comment,is_generated,generation_expression from information_schema.columns where table_name='t1'; table_catalog def -table_schema test2 +table_schema test table_name t1 column_name x1 ordinal_position 1 @@ -44,7 +44,7 @@ is_generated NEVER generation_expression NULL table_catalog def -table_schema test2 +table_schema test table_name t1 column_name Sys_start ordinal_position 2 @@ -59,7 +59,7 @@ is_generated ALWAYS generation_expression ROW START table_catalog def -table_schema test2 +table_schema test table_name t1 column_name Sys_end ordinal_position 3 @@ -235,7 +235,7 @@ drop table tt1; create temporary table tt1 like t1; Warnings: -Warning 1105 System versioning is stripped from temporary `test2.tt1` +Warning 1105 System versioning is stripped from temporary `test.tt1` # Temporary is stripped from versioning show create table tt1; Table Create Table @@ -515,3 +515,12 @@ period for system_time(row_start, row_end) ) with system versioning; ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `t` +# MDEV-16490 It's possible to make a system versioned table without any versioning field +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as y; +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as x; +ERROR HY000: Table `t1` must have at least one versioned column +drop tables t0, t1, t2, t3; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/delete.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/delete.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/delete.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/delete.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,3 +1,4 @@ +# Basic + delete from view create or replace table t1( XNo int unsigned, sys_start SYS_DATATYPE as row start invisible, @@ -44,6 +45,7 @@ 5 drop view vt1; drop table t1; +# Check sys_start, sys_end create or replace table t1( x int, sys_start SYS_DATATYPE as row start invisible, @@ -59,6 +61,7 @@ A B C 1 1 1 drop table t1; +# Multi-delete create or replace table t1( x int, y int, @@ -103,9 +106,6 @@ 14 drop table t1; drop table t2; -# Basic + delete from view -# Check sys_start, sys_end -# Multi-delete # Update + delete create or replace table t1 (x int) with system versioning; insert into t1 values (1); @@ -115,3 +115,18 @@ x 2 1 +drop table t1; +# +# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +# +create or replace table t1 (a int) with system versioning; +replace into t1 values (1), (2); +create or replace trigger tr before delete on t1 for each row delete from xx; +create or replace procedure pr() delete from t1; +call pr; +ERROR 42S02: Table 'test.xx' doesn't exist +call pr; +ERROR 42S02: Table 'test.xx' doesn't exist +drop procedure pr; +drop trigger tr; +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/delete_history.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/delete_history.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/delete_history.result 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/delete_history.result 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,131 @@ +create table t (a int); +delete history from t before system_time now(); +ERROR HY000: Table `t` is not system-versioned +create or replace table t ( +a int, +row_start SYS_TYPE as row start invisible, +row_end SYS_TYPE as row end invisible, +period for system_time (row_start, row_end)) +with system versioning; +insert into t values (1); +update t set a=2; +set @test = 'correct'; +create trigger trg_before before delete on t for each row set @test = 'incorrect'; +create trigger trg_after after delete on t for each row set @test = 'incorrect'; +delete history from t; +select @test from t; +@test +correct +drop table t; +create or replace table t ( +a int, +row_start SYS_TYPE as row start invisible, +row_end SYS_TYPE as row end invisible, +period for system_time (row_start, row_end)) +with system versioning; +insert into t values (1), (2); +update t set a=11 where a=1; +set @ts1=now(6); +update t set a=22 where a=2; +select * from t for system_time all; +a +11 +22 +1 +2 +delete history from t before system_time timestamp @ts1; +select * from t for system_time all; +a +11 +22 +2 +prepare stmt from 'delete history from t'; +execute stmt; +drop prepare stmt; +select * from t for system_time all; +a +11 +22 +delete from t; +create or replace procedure truncate_sp() +begin +delete history from t before system_time timestamp now(6); +end~~ +call truncate_sp; +select * from t for system_time all; +a +drop procedure truncate_sp; +# Truncate partitioned +create or replace table t (a int) +with system versioning +partition by system_time limit 1 ( +partition p0 history, +partition p1 history, +partition pn current); +insert into t values (1); +update t set a= 2; +update t set a= 3; +delete history from t; +select * from t for system_time all; +a +3 +# VIEW +create or replace table t ( +i int, +row_start SYS_TYPE as row start invisible, +row_end SYS_TYPE as row end invisible, +period for system_time (row_start, row_end)) +with system versioning; +delete history from t; +create or replace view v as select * from t; +delete history from v; +ERROR 42S02: 'v' is a view +create or replace table t (i int); +delete history from t; +ERROR HY000: Table `t` is not system-versioned +create or replace view v as select * from t; +delete history from v; +ERROR 42S02: 'v' is a view +prepare stmt from 'delete history from t'; +ERROR HY000: Table `t` is not system-versioned +drop table t; +drop view v; +create or replace table t (i int); +create or replace view v as select * from t; +drop table v; +ERROR 42S02: 'test.v' is a view +lock table v write; +delete history from v before system_time now(6); +ERROR 42S02: 'v' is a view +unlock tables; +drop view v; +drop table t; +create table t1 (i int) with system versioning; +create procedure pr() delete history from t1 before system_time now(); +call pr; +call pr; +drop procedure pr; +drop table t1; +# +# MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY +# +create or replace table t1 ( +f varchar(1), +row_start SYS_TYPE as row start, +row_end SYS_TYPE as row end, +period for system_time (row_start, row_end)) +with system versioning; +insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h'); +delete from t1; +delete history from t1; +drop table t1; +# +# MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY +# +create or replace table t1 (a int check (a > 0)) with system versioning; +delete history from t1; +insert into t1 values (1); +select * from t1; +a +1 +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/foreign.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/foreign.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/foreign.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/foreign.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,7 +2,8 @@ # Test RESTRICT # ################# create table parent( -id int unique key +id int, +KEY_TYPE (id) ) engine innodb; create table child( parent_id int, @@ -16,13 +17,13 @@ insert into parent values(1); insert into child values(1); delete from parent where id = 1; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) delete from child where parent_id = 1; delete from parent where id = 1; insert into parent values(1); insert into child values(1); update parent set id=id+1; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) delete from child; update parent set id=id+1; select * from child for system_time all; @@ -35,7 +36,8 @@ # Test when clustered index is a foreign key # ############################################## create table parent( -id int(10) unsigned unique key +id int(10) unsigned, +KEY_TYPE (id) ) engine innodb; create table child( parent_id int(10) unsigned primary key, @@ -47,14 +49,15 @@ insert into parent values(1); insert into child values(1); delete from parent where id = 1; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) drop table child; drop table parent; ################ # Test CASCADE # ################ create table parent( -id int unique key +id int, +KEY_TYPE (id) ) engine innodb; create table child( parent_id int, @@ -87,7 +90,8 @@ drop table child; drop table parent; create or replace table parent ( -id int primary key, +id int, +KEY_TYPE(id), sys_start SYS_DATATYPE as row start invisible, sys_end SYS_DATATYPE as row end invisible, period for system_time(sys_start, sys_end) @@ -110,7 +114,8 @@ drop table child; drop table parent; create or replace table parent ( -id int primary key +id int, +KEY_TYPE(id) ) engine innodb; create or replace table child ( @@ -138,8 +143,9 @@ ################# # Test SET NULL # ################# -create or replace table parent( -id int unique key +create table parent( +id int, +KEY_TYPE (id) ) engine innodb; create or replace table child( parent_id int, @@ -183,7 +189,8 @@ # Parent table is foreign # ########################### create or replace table parent( -id int unique key, +id int, +KEY_TYPE (id), sys_start SYS_DATATYPE as row start invisible, sys_end SYS_DATATYPE as row end invisible, period for system_time(sys_start, sys_end) @@ -195,26 +202,27 @@ insert into parent values(1); insert into child values(1); delete from parent; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) update parent set id=2; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) delete from child; delete from parent; insert into child values(1); -ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) insert into parent values(1); insert into child values(1); delete from parent; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) update parent set id=2; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`child`, CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)) drop table child; drop table parent; ################### # crash on DELETE # ################### create or replace table a ( -cola int(10) primary key, +cola int(10), +KEY_TYPE (cola), v_cola int(10) as (cola mod 10) virtual, sys_start SYS_DATATYPE as row start invisible, sys_end SYS_DATATYPE as row end invisible, @@ -233,7 +241,7 @@ insert into a(cola) values (12); insert into b(cola, v_cola) values (10,2); delete from a; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test2`.`b`, CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`)) +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`b`, CONSTRAINT `v_cola_fk` FOREIGN KEY (`v_cola`) REFERENCES `a` (`v_cola`)) drop table b, a; ############################################### # CASCADE UPDATE foreign not system versioned # @@ -290,15 +298,18 @@ count(*) 0 drop table subchild, child, parent; -CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=InnoDB; -CREATE TABLE t2 (f2 INT, FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=InnoDB WITH SYSTEM VERSIONING; -SET FOREIGN_KEY_CHECKS= OFF; -INSERT IGNORE INTO t2 VALUES (1); -SET FOREIGN_KEY_CHECKS= ON; -UPDATE t2 SET f2= 2; -ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test2`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)) -DELETE FROM t2; -DROP TABLE t2, t1; +# +# MDEV-18057 Assertion `(node->state == 5) || (node->state == 6)' failed in row_upd_sec_step upon DELETE after UPDATE failed due to FK violation +# +create or replace table t1 (f1 int, key(f1)) engine=innodb; +create or replace table t2 (f2 int, foreign key (f2) references t1 (f1)) engine=innodb with system versioning; +set foreign_key_checks= off; +insert ignore into t2 values (1); +set foreign_key_checks= on; +update t2 set f2= 2; +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)) +delete from t2; +drop table t2, t1; # # MDEV-18879 Corrupted record inserted by FOREIGN KEY operation # @@ -387,3 +398,32 @@ SET timestamp = 9; REPLACE INTO t2 SELECT * FROM t2; DROP TABLE t1, t2; +# +# MDEV-16210 FK constraints on versioned tables use historical rows, which may cause constraint violation +# +create or replace table t1 (a int, key(a)) engine innodb with system versioning; +create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb; +insert into t1 values (1),(2); +insert into t2 values (1); +# DELETE from referenced table is not allowed +delete from t1 where a = 1; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`a`)) +drop tables t2, t1; +# +# MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 or server crash in row_ins_foreign_report_err upon DELETE from versioned table with FK +# +create or replace table t1 (x int primary key) engine innodb; +create or replace table t2 (x int, foreign key (x) references t1(x)) engine innodb with system versioning; +set foreign_key_checks= off; +insert into t2 values (1), (1); +set foreign_key_checks= on; +# DELETE from foreign table is allowed +delete from t2; +drop tables t2, t1; +create or replace table t1 (a int, key(a)) engine innodb; +insert into t1 values (1); +create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb with system versioning; +insert into t2 values (1), (1); +# DELETE from foreign table is allowed +delete from t2; +drop tables t2, t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/online.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/online.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/online.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/online.result 2020-01-26 18:37:28.000000000 +0000 @@ -89,13 +89,13 @@ insert into t values (1, 1); select c.prtype from information_schema.innodb_sys_columns as c join information_schema.innodb_sys_tables as t on c.table_id=t.table_id -where t.name='test2/t' and c.name='b'; +where t.name='test/t' and c.name='b'; prtype 50179 set @@system_versioning_alter_history=keep; select c.prtype from information_schema.innodb_sys_columns as c join information_schema.innodb_sys_tables as t on c.table_id=t.table_id -where t.name='test2/t' and c.name='b'; +where t.name='test/t' and c.name='b'; prtype 50179 show create table t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/partition.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/partition.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/partition.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/partition.result 2020-01-26 18:37:28.000000000 +0000 @@ -46,7 +46,7 @@ engine=DEFAULT_ENGINE with system versioning partition by hash(i); alter table t1 engine=NON_DEFAULT_ENGINE; -ERROR HY000: Not allowed for system-versioned `test2`.`t1`. Change to/from native system versioning engine is not supported. +ERROR HY000: Not allowed for system-versioned `test`.`t1`. Change to/from native system versioning engine is not supported. ## CREATE TABLE create or replace table t1 (x int) partition by system_time ( @@ -254,11 +254,11 @@ 6 insert into t1 values (7), (8); Warnings: -Warning 4114 Versioned table `test2`.`t1`: partition `p1` is full, add more HISTORY partitions +Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions ### warn about full partition delete from t1; Warnings: -Warning 4114 Versioned table `test2`.`t1`: partition `p1` is full, add more HISTORY partitions +Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions select * from t1 partition (p1) order by x; x 4 @@ -433,16 +433,16 @@ partition by system_time interval 1 hour ( partition p0 history, partition pn current); set @ts=(select partition_description from information_schema.partitions -where table_schema='test2' and table_name='t1' and partition_name='p0'); +where table_schema='test' and table_name='t1' and partition_name='p0'); alter table t1 add column b int; -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; partition_name partition_ordinal_position partition_method timediff(partition_description, @ts) p0 1 SYSTEM_TIME 00:00:00.000000 pn 2 SYSTEM_TIME NULL Warnings: Warning 1292 Truncated incorrect time value: 'CURRENT' alter table t1 add partition (partition p1 history, partition p2 history); -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; partition_name partition_ordinal_position partition_method timediff(partition_description, @ts) p0 1 SYSTEM_TIME 00:00:00.000000 p1 2 SYSTEM_TIME 01:00:00.000000 @@ -451,7 +451,7 @@ Warnings: Warning 1292 Truncated incorrect time value: 'CURRENT' alter table t1 drop partition p0; -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; partition_name partition_ordinal_position partition_method timediff(partition_description, @ts) p1 1 SYSTEM_TIME 01:00:00.000000 p2 2 SYSTEM_TIME 02:00:00.000000 @@ -460,7 +460,7 @@ Warning 1292 Truncated incorrect time value: 'CURRENT' alter table t1 drop partition p2; ERROR HY000: Can only drop oldest partitions when rotating by INTERVAL -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; partition_name partition_ordinal_position partition_method timediff(partition_description, @ts) p1 1 SYSTEM_TIME 01:00:00.000000 p2 2 SYSTEM_TIME 02:00:00.000000 @@ -504,6 +504,14 @@ create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current); select * from t1 partition (p0) for system_time all; ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query +# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +create or replace procedure sp() +select * from t1 partition (p0) for system_time all; +call sp; +ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query +call sp; +ERROR HY000: SYSTEM_TIME partitions in table `t1` does not support historical query +drop procedure sp; # MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE create or replace table t1 (pk int primary key) engine=myisam @@ -556,7 +564,7 @@ delete from t1 where x < 3; delete from t1; Warnings: -Warning 4114 Versioned table `test2`.`t1`: partition `p1` is full, add more HISTORY partitions +Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions unlock tables; # # MDEV-20336 Assertion bitmap_is_set(read_partitions) upon SELECT FOR UPDATE from versioned table @@ -564,4 +572,45 @@ create or replace table t1 (pk int primary key) with system versioning partition by system_time limit 100 (partition p1 history, partition pn current); execute immediate 'select * from t1 for update'; pk +drop view v1; +drop tables t, t1, t2, t3, t4; +# +# MDEV-18957 UPDATE with LIMIT clause is wrong for versioned partitioned tables +# +create or replace table t1 ( +x int, +a varchar(255) +) with system versioning partition by system_time (partition p1 history, partition pn current); +insert into t1 (x) values (1), (2), (3), (4); +update t1 set a= 'foo' limit 3; +update t1 set a= 'bar' limit 4; +select * from t1; +x a +1 bar +2 bar +3 bar +4 bar drop table t1; +# +# MDEV-21011 Table corruption reported for versioned partitioned table after DELETE: "Found a misplaced row" +# +create table t1 (a int) with system versioning +partition by system_time limit 3 +(partition p1 history, partition p2 history, partition pn current); +insert into t1 values (1),(2),(3),(4); +delete from t1; +delete from t1; +check table t1; +Table Op Msg_type Msg_text +test.t1 check note Not supported for non-INTERVAL history partitions +test.t1 check note The storage engine for the table doesn't support check +drop table t1; +# +# MDEV-21233 Assertion `m_extra_cache' failed in ha_partition::late_extra_cache +# +create table t1 (id int, a varchar(8)) with system versioning partition by key (id) partitions 2; +insert into t1 values (1,'foo'),(2,'bar'); +create table t2 (b int); +insert into t2 values (1),(2); +update t1, t2 set a = 1; +drop table t1, t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/partition_innodb.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/partition_innodb.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/partition_innodb.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/partition_innodb.result 2020-01-26 18:37:28.000000000 +0000 @@ -21,6 +21,7 @@ partition pn current ); ERROR HY000: `row_start` must be of type TIMESTAMP(6) for system-versioned table `#sql-temporary` +drop table t1; create or replace table t ( a int primary key, row_start bigint unsigned as row start invisible, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/replace.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/replace.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/replace.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/replace.result 2020-01-26 18:37:28.000000000 +0000 @@ -1,9 +1,10 @@ -create table t ( -id int primary key, +create or replace table t( +id int, +KEY_TYPE(id), x int, row_start SYS_DATATYPE as row start invisible, row_end SYS_DATATYPE as row end invisible, -period for system_time (row_start, row_end) +period for system_time(row_start, row_end) ) with system versioning; insert t values (1, 2); replace t values (1, 3); @@ -32,7 +33,8 @@ create or replace table t2 (c int); create or replace view v as select t1.* from t1 join t2; replace into v (a, b) select a, b from t1; -drop table t1; +drop view v; +drop tables t1, t2; CREATE TABLE t1 ( pk INT AUTO_INCREMENT, f INT, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/select.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/select.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/select.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/select.result 2020-01-26 18:37:28.000000000 +0000 @@ -153,21 +153,21 @@ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) Warnings: -Note 1003 select `test2`.`t1`.`x` AS `IJ2_x1`,`test2`.`t1`.`y` AS `y1`,`test2`.`t2`.`x` AS `x2`,`test2`.`t2`.`y` AS `y2` from `test2`.`t1` FOR SYSTEM_TIME ALL join `test2`.`t2` FOR SYSTEM_TIME ALL where `test2`.`t1`.`x` = `test2`.`t2`.`x` and `test2`.`t2`.`row_end` > @`t0` and `test2`.`t2`.`row_start` <= @`t0` and `test2`.`t1`.`row_end` > @`t0` and `test2`.`t1`.`row_start` <= @`t0` +Note 1003 select `test`.`t1`.`x` AS `IJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` FOR SYSTEM_TIME ALL where `test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0` explain extended select * from (select t1.x as LJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 left join t2 on t1.x = t2.x) for system_time as of timestamp @t0 as t; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) Warnings: -Note 1003 select `test2`.`t1`.`x` AS `LJ2_x1`,`test2`.`t1`.`y` AS `y1`,`test2`.`t2`.`x` AS `x2`,`test2`.`t2`.`y` AS `y2` from `test2`.`t1` FOR SYSTEM_TIME ALL left join `test2`.`t2` FOR SYSTEM_TIME ALL on(`test2`.`t2`.`x` = `test2`.`t1`.`x` and `test2`.`t2`.`row_end` > @`t0` and `test2`.`t2`.`row_start` <= @`t0`) where `test2`.`t1`.`row_end` > @`t0` and `test2`.`t1`.`row_start` <= @`t0` +Note 1003 select `test`.`t1`.`x` AS `LJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t1` FOR SYSTEM_TIME ALL left join `test`.`t2` FOR SYSTEM_TIME ALL on(`test`.`t2`.`x` = `test`.`t1`.`x` and `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0`) where `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0` explain extended select * from (select t1.x as RJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 right join t2 on t1.x = t2.x) for system_time as of timestamp @t0 as t; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where 1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00 Using where; Using join buffer (flat, BNL join) Warnings: -Note 1003 select `test2`.`t1`.`x` AS `RJ2_x1`,`test2`.`t1`.`y` AS `y1`,`test2`.`t2`.`x` AS `x2`,`test2`.`t2`.`y` AS `y2` from `test2`.`t2` FOR SYSTEM_TIME ALL left join `test2`.`t1` FOR SYSTEM_TIME ALL on(`test2`.`t1`.`x` = `test2`.`t2`.`x` and `test2`.`t1`.`row_end` > @`t0` and `test2`.`t1`.`row_start` <= @`t0`) where `test2`.`t2`.`row_end` > @`t0` and `test2`.`t2`.`row_start` <= @`t0` +Note 1003 select `test`.`t1`.`x` AS `RJ2_x1`,`test`.`t1`.`y` AS `y1`,`test`.`t2`.`x` AS `x2`,`test`.`t2`.`y` AS `y2` from `test`.`t2` FOR SYSTEM_TIME ALL left join `test`.`t1` FOR SYSTEM_TIME ALL on(`test`.`t1`.`x` = `test`.`t2`.`x` and `test`.`t1`.`row_end` > @`t0` and `test`.`t1`.`row_start` <= @`t0`) where `test`.`t2`.`row_end` > @`t0` and `test`.`t2`.`row_start` <= @`t0` select * from (select t1.x as IJ2_x1, t1.y as y1, t2.x as x2, t2.y as y2 from t1 inner join t2 on t1.x = t2.x) for system_time as of timestamp @t0 as t; IJ2_x1 y1 x2 y2 @@ -294,7 +294,7 @@ 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join) 1 SIMPLE t3 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join) Warnings: -Note 1003 select `test2`.`t1`.`a` AS `a`,`test2`.`t2`.`a` AS `a` from `test2`.`t1` FOR SYSTEM_TIME ALL left join (`test2`.`t1` FOR SYSTEM_TIME ALL `t2` left join `test2`.`t1` FOR SYSTEM_TIME ALL `t3` on(`test2`.`t3`.`a` = `test2`.`t2`.`a` and `test2`.`t3`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test2`.`t2`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' and `test2`.`t1`.`a` > 1) where `test2`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' +Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t2`.`a` AS `a` from `test`.`t1` FOR SYSTEM_TIME ALL left join (`test`.`t1` FOR SYSTEM_TIME ALL `t2` left join `test`.`t1` FOR SYSTEM_TIME ALL `t3` on(`test`.`t3`.`a` = `test`.`t2`.`a` and `test`.`t3`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t2`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' and `test`.`t1`.`a` > 1) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' select * from t1 left outer join (t1 as t2 left join t1 as t3 using (a)) on t1.a>1; a a 2 1 @@ -320,6 +320,21 @@ create or replace table t1 (x int) with system versioning engine myisam; select * from t1 for system_time as of transaction 1; ERROR HY000: Transaction-precise system versioning for `t1` is not supported +# MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +create or replace procedure sp() +select * from t1 for system_time as of transaction 1; +call sp; +ERROR HY000: Transaction-precise system versioning for `t1` is not supported +call sp; +ERROR HY000: Transaction-precise system versioning for `t1` is not supported +create or replace table t1 (a int); +create or replace procedure sp() +select * from t1 for system_time all; +call sp; +ERROR HY000: Table `t1` is not system-versioned +call sp; +ERROR HY000: Table `t1` is not system-versioned +drop procedure sp; create or replace table t1 ( x int, sys_trx_start bigint unsigned as row start invisible, @@ -511,7 +526,7 @@ 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join) 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join) Warnings: -Note 1003 select `test2`.`t1`.`f1` AS `f1` from `test2`.`t1` FOR SYSTEM_TIME ALL join `test2`.`t2` left join (`test2`.`t3` left join `test2`.`t4` FOR SYSTEM_TIME ALL on(`test2`.`t4`.`f4` = `test2`.`t2`.`f2` and `test2`.`t4`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test2`.`t3`.`f3` = `test2`.`t2`.`f2`) where `test2`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' +Note 1003 select `test`.`t1`.`f1` AS `f1` from `test`.`t1` FOR SYSTEM_TIME ALL join `test`.`t2` left join (`test`.`t3` left join `test`.`t4` FOR SYSTEM_TIME ALL on(`test`.`t4`.`f4` = `test`.`t2`.`f2` and `test`.`t4`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999')) on(`test`.`t3`.`f3` = `test`.`t2`.`f2`) where `test`.`t1`.`row_end` = TIMESTAMP'2038-01-19 03:14:07.999999' drop view v1; drop table t1, t2, t3, t4; # @@ -571,6 +586,30 @@ i drop procedure p; drop table t1; +# +# MDEV-21234 Server crashes in in setup_on_expr upon 3rd execution of SP +# +create table t1 (a varchar(8)); +insert into t1 values ('foo'),('bar'); +create table t2 (b date); +create procedure pr() insert into t2 select * from t1; +call pr; +ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1 +prepare stmt from 'insert into t2 select * from t1'; +execute stmt; +ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1 +alter table t1 add system versioning; +call pr; +ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1 +call pr; +ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1 +execute stmt; +ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1 +execute stmt; +ERROR 22007: Incorrect date value: 'foo' for column `test`.`t2`.`b` at row 1 +drop prepare stmt; +drop procedure pr; +drop table t1, t2; call verify_trt_dummy(34); No A B C D 1 1 1 1 1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/truncate.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/truncate.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/truncate.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/truncate.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ -create table t (a int); -delete history from t before system_time now(); -ERROR HY000: Table `t` is not system-versioned -create or replace table t ( -a int, -row_start SYS_TYPE as row start invisible, -row_end SYS_TYPE as row end invisible, -period for system_time (row_start, row_end)) -with system versioning; -insert into t values (1); -update t set a=2; -set @test = 'correct'; -create trigger trg_before before delete on t for each row set @test = 'incorrect'; -create trigger trg_after after delete on t for each row set @test = 'incorrect'; -delete history from t; -select @test from t; -@test -correct -drop table t; -create or replace table t ( -a int, -row_start SYS_TYPE as row start invisible, -row_end SYS_TYPE as row end invisible, -period for system_time (row_start, row_end)) -with system versioning; -insert into t values (1), (2); -update t set a=11 where a=1; -set @ts1=now(6); -update t set a=22 where a=2; -select * from t for system_time all; -a -11 -22 -1 -2 -delete history from t before system_time timestamp @ts1; -select * from t for system_time all; -a -11 -22 -2 -prepare stmt from 'delete history from t'; -execute stmt; -drop prepare stmt; -select * from t for system_time all; -a -11 -22 -delete from t; -create or replace procedure truncate_sp() -begin -delete history from t before system_time timestamp now(6); -end~~ -call truncate_sp; -select * from t for system_time all; -a -drop procedure truncate_sp; -# Truncate partitioned -create or replace table t (a int) -with system versioning -partition by system_time limit 1 ( -partition p0 history, -partition p1 history, -partition pn current); -insert into t values (1); -update t set a= 2; -update t set a= 3; -delete history from t; -select * from t for system_time all; -a -3 -# VIEW -create or replace table t ( -i int, -row_start SYS_TYPE as row start invisible, -row_end SYS_TYPE as row end invisible, -period for system_time (row_start, row_end)) -with system versioning; -delete history from t; -create or replace view v as select * from t; -delete history from v; -ERROR 42S02: 'v' is a view -create or replace table t (i int); -delete history from t; -ERROR HY000: Table `t` is not system-versioned -create or replace view v as select * from t; -delete history from v; -ERROR 42S02: 'v' is a view -prepare stmt from 'delete history from t'; -ERROR HY000: Table `t` is not system-versioned -drop table t; -drop view v; -create or replace table t (i int); -create or replace view v as select * from t; -drop table v; -ERROR 42S02: 'test2.v' is a view -lock table v write; -delete history from v before system_time now(6); -ERROR 42S02: 'v' is a view -unlock tables; -drop view v; -drop table t; -create table t1 (i int) with system versioning; -create procedure pr() delete history from t1 before system_time now(); -call pr; -call pr; -drop procedure pr; -drop table t1; -# -# MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY -# -create or replace table t1 ( -f varchar(1), -row_start SYS_TYPE as row start, -row_end SYS_TYPE as row end, -period for system_time (row_start, row_end)) -with system versioning; -insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h'); -delete from t1; -delete history from t1; -drop table t1; -# -# MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY -# -create or replace table t1 (a int check (a > 0)) with system versioning; -delete history from t1; -insert into t1 values (1); -select * from t1; -a -1 -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/trx_id.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/trx_id.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/trx_id.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/trx_id.result 2020-01-26 18:37:28.000000000 +0000 @@ -181,9 +181,7 @@ select trt_begin_ts(@trx_id) <= @ts1 as BEGIN_TS_GOOD; BEGIN_TS_GOOD 1 -drop database test; -create database test; -use test; +drop table t1; # # MDEV-16100 FOR SYSTEM_TIME erroneously resolves string user variables as transaction IDs # @@ -478,3 +476,25 @@ SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; count(*) 0 +# MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null || +# trans == &thd->transaction.stmt' failed or bogus ER_DUP_ENTRY upon +# ALTER TABLE with versioning +create or replace table t (x int) engine=innodb; +set autocommit= 0; +alter table t +algorithm=copy, +add column row_start bigint unsigned as row start, +add column row_end bigint unsigned as row end, +add period for system_time(row_start,row_end), +with system versioning; +set autocommit= 1; +# MDEV-18865 Assertion `t->first->versioned_by_id()' +# failed in innodb_prepare_commit_versioned +create or replace table t (x int) engine=innodb; +insert into t values (0); +alter table t add `row_start` bigint unsigned as row start, +add `row_end` bigint unsigned as row end, +add period for system_time(`row_start`,`row_end`), +modify x int after row_start, +with system versioning; +create or replace database test; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/update-big.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update-big.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/update-big.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update-big.result 2020-01-26 18:37:28.000000000 +0000 @@ -12,7 +12,7 @@ insert into t1 select * from t1; insert into t1 select * from t1; insert into t1 select * from t1; -connect con1,localhost,root,,test2; +connect con1,localhost,root,,test; alter table t1 add system versioning; connection default; update t1 set a= 7 where a = 3; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/update.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/update.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update.result 2020-01-26 18:37:28.000000000 +0000 @@ -241,3 +241,71 @@ 1 2500 drop table t1; drop table t2; +### Issue tempesta-tech/mariadb#365, bug 7 (duplicate of historical row) +create or replace table t1 (a int primary key, b int) +with system versioning engine myisam; +insert into t1 (a) values (1); +replace t1 values (1,2),(1,3),(2,4); +# +# MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE +# +create or replace table t1 (pk int, a char(3), b char(3), primary key(pk)) +engine=innodb with system versioning; +insert into t1 (pk) values (1); +connect con1,localhost,root,,test; +start transaction; +select * from t1 for update; +pk a b +1 NULL NULL +connection default; +update t1 set b = 'foo'; +connection con1; +update t1 set a = 'bar'; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +disconnect con1; +connection default; +drop table t1; +# +# MDEV-19406 Assertion on updating view of join with versioned table +# +create or replace table t1 (pk int primary key, a date, b int, index(b)) engine=innodb with system versioning; +create or replace table t2 (c int); +create or replace view v as select * from t1 join t2; +insert into t1 (pk) values (1); +update t1 set a= '2012-12-12'; +update v set a= '2000-01-01' order by b limit 1; +drop view v; +drop table t1, t2; +# +# MDEV-20441 ER_CRASHED_ON_USAGE upon update on versioned Aria table +# +create or replace table t1 (a varchar(8)) +engine=aria row_format=fixed +with system versioning; +insert into t1 (a) values ('foo'); +update t1 set a = 'bar'; +drop table t1; +# +# MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via view +# +create or replace table t1 ( +pk int, a char(8), b char(8), +primary key (pk) +) with system versioning; +create or replace view v1 as select * from t1; +insert into t1 values (1, null, 'd') , (2, null, 'i') ; +update v1 set a= null where b = ''; +create or replace table t1 (id int, k int, primary key (id)) engine=innodb with system versioning; +insert into t1 values (1,1),(2,2); +create or replace view v1 as select * from t1; +update v1 set id= 2 where k = 0; +create or replace table t1 (a int) with system versioning; +create or replace view v1 as select * from t1; +create or replace procedure sp() update v1 set xx = 1; +call sp; +ERROR 42S22: Unknown column 'xx' in 'field list' +call sp; +ERROR 42S22: Unknown column 'xx' in 'field list' +drop procedure sp; +drop view v1; +drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/update2.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update2.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/update2.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/update2.result 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -### Issue #365, bug 7 (duplicate of historical row) -create or replace table t1 (a int primary key, b int) -with system versioning engine myisam; -insert into t1 (a) values (1); -replace t1 values (1,2),(1,3),(2,4); -create or replace table t1 (pk int, a char(3), b char(3), primary key(pk)) -engine=innodb with system versioning; -insert into t1 (pk) values (1); -connect con1,localhost,root,,test; -start transaction; -select * from t1 for update; -pk a b -1 NULL NULL -connection default; -update t1 set b = 'foo'; -connection con1; -update t1 set a = 'bar'; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -disconnect con1; -connection default; -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/view.result mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/view.result --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/r/view.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/r/view.result 2020-01-26 18:37:28.000000000 +0000 @@ -64,13 +64,13 @@ x 1 2 -# VIEW with parameters [#151] +# VIEW with parameters [tempesta-tech/mariadb#151] create or replace table t1 (x int) with system versioning; create or replace view vt1(c) as select x from t1; show create view vt1; View Create View character_set_client collation_connection vt1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vt1` AS select `t1`.`x` AS `c` from `t1` latin1 latin1_swedish_ci -# VIEW over JOIN of versioned tables [#153] +# VIEW over JOIN of versioned tables [tempesta-tech/mariadb#153] create or replace table t1 (a int) with system versioning; create or replace table t2 (b int) with system versioning; insert into t1 values (1); @@ -82,7 +82,7 @@ create or replace view vt12 as select * from t1 for system_time as of timestamp ('0-0-0') cross join t2; select * from vt12; a b -# VIEW improvements [#183] +# VIEW improvements [tempesta-tech/mariadb#183] create or replace table t3 (x int); create or replace view vt1 as select * from t1, t2, t3; show create view vt1; @@ -96,12 +96,12 @@ show create view vt1; View Create View character_set_client collation_connection vt1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vt1` AS select `t1`.`a` AS `a`,`t2`.`row_end` AS `endo` from ((`t3` join `t1`) join `t2`) latin1 latin1_swedish_ci -# VIEW over UNION [#269] +# VIEW over UNION [tempesta-tech/mariadb#269] create or replace view vt1 as select * from t1 union select * from t1; select * from vt1; a 1 -# VIEW over UNION with non-versioned [#393] +# VIEW over UNION with non-versioned [tempesta-tech/mariadb#393] create or replace table t2 (a int); create or replace view vt1 as select * from t1 union select * from t2; select * from vt1; @@ -118,16 +118,15 @@ a execute stmt; a -drop database test2; -create database test2; -use test2; +drop view v1; +drop tables t1, t2; # # MDEV-15146 SQLError[4122]: View is not system versioned # -create table t1 (a int) with system versioning; +create or replace table t1 (a int) with system versioning; insert t1 values (1),(2); set @a=now(6); -create view v1 as select * from t1; +create or replace view v1 as select * from t1; delete from t1; select * from v1; a @@ -147,6 +146,136 @@ create or replace view v1 as select * from t1 for system_time as of date_sub(now(), interval 6 second); 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`.`i` AS `i` from `t1` FOR SYSTEM_TIME AS OF current_timestamp() - interval 6 second latin1 latin1_swedish_ci +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` FOR SYSTEM_TIME AS OF TIMESTAMP current_timestamp() - interval 6 second latin1 latin1_swedish_ci +drop view v1, vt1, vt12; +drop tables t1, t3; +# +# MDEV-18727 improve DML operation of System Versioning +# +create or replace table t1 ( +x int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time (row_start, row_end) +) with system versioning; +insert into t1 values (1), (2); +create or replace view v1 as select * from t1 where x > 1; +# update, delete +update v1 set x= x + 1; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 CURRENT ROW +insert v1 values (4); +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 CURRENT ROW +4 CURRENT ROW +delete from v1 where x < 4; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 HISTORICAL ROW +4 CURRENT ROW +# multi-update +create or replace table t2 like t1; +insert into t2 values (1), (2); +create or replace view v2 as select * from t2 where x > 1; +update v1, v2 set v1.x= v1.x + 1, v2.x= v2.x + 1 where v1.x = v2.x + 2; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 HISTORICAL ROW +4 HISTORICAL ROW +5 CURRENT ROW +select *, check_row(row_start, row_end) from t2 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 CURRENT ROW +# multi-delete +delete v1, v2 from v1 join v2 where v1.x = v2.x + 2; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 HISTORICAL ROW +4 HISTORICAL ROW +5 HISTORICAL ROW +select *, check_row(row_start, row_end) from t2 for system_time all order by x; +x check_row(row_start, row_end) +1 CURRENT ROW +2 HISTORICAL ROW +3 HISTORICAL ROW +# replace +create or replace table t1 ( +x int primary key, y int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time (row_start, row_end) +) with system versioning; +insert into t1 values (1, 0), (2, 0); +create or replace view v1 as select * from t1 where x > 1; +replace v1 values (1, 1); +replace v1 values (2, 1); +replace v1 values (3, 1); +# REPLACE ignores VIEW condition because itself doesn't use WHERE +select *, check_row(row_start, row_end) from t1 for system_time all order by x, row_end; +x y check_row(row_start, row_end) +1 0 HISTORICAL ROW +1 1 CURRENT ROW +2 0 HISTORICAL ROW +2 1 CURRENT ROW +3 1 CURRENT ROW +# insert-select, on duplicate key +insert v1 select * from t1 where x = 1 on duplicate key update x = v1.x - 1; +select *, check_row(row_start, row_end) from t1 for system_time all order by x, row_end; +x y check_row(row_start, row_end) +0 1 CURRENT ROW +1 0 HISTORICAL ROW +1 1 HISTORICAL ROW +2 0 HISTORICAL ROW +2 1 CURRENT ROW +3 1 CURRENT ROW +drop view v1, v2; +drop tables t1, t2; +# +# MDEV-21146 Assertion `m_lock_type == 2' in handler::ha_drop_table upon LOAD DATA +# +create table t1 (a int); +create view v1 as select * from t1; +create or replace table t1 (b int) with system versioning; +load data infile 'xx' into table v1; +ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them drop view v1; drop table t1; +# +# MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view +# +create table t1 (a int); +insert into t1 values (1); +create table t2 ( +b int, +row_start SYS_DATATYPE as row start invisible, +row_end SYS_DATATYPE as row end invisible, +period for system_time (row_start, row_end) +) with system versioning; +insert into t2 values (2); +create view v1 as select * from t1; +create view v2 as select * from v1; +create or replace view v1 as select * from t2; +delete from v2; +select * from t1; +a +1 +select *, check_row(row_start, row_end) from t2 for system_time all; +b check_row(row_start, row_end) +2 HISTORICAL ROW +drop view v2; +drop view v1; +drop table t1, t2; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/alter.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/alter.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/alter.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/alter.test 2020-01-26 18:37:28.000000000 +0000 @@ -68,12 +68,17 @@ alter table t drop system versioning; show create table t; ---error ER_VERS_NOT_VERSIONED +--error ER_VERS_DUPLICATE_ROW_START_END alter table t add column trx_start timestamp(6) as row start; alter table t add system versioning; show create table t; +--error ER_VERS_DUPLICATE_ROW_START_END +alter table t add column trx_start timestamp(6) as row start; +--error ER_VERS_DUPLICATE_ROW_START_END +alter table t modify a int as row start; + alter table t add column b int; show create table t; @@ -453,11 +458,11 @@ create or replace table t (x int) with system versioning; --error ER_VERS_DB_NOT_SUPPORTED alter table user add system versioning; -use test2; +use test; --echo # MDEV-15956 Strange ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN upon ALTER on versioning column create or replace table t1 (i int, j int as (i), s timestamp(6) as row start, e timestamp(6) as row end, period for system_time(s,e)) with system versioning; ---error ER_VERS_ALTER_SYSTEM_FIELD +--error ER_VERS_DUPLICATE_ROW_START_END alter table t1 modify s timestamp(6) as row start; --echo # ignore CHECK for historical rows @@ -542,3 +547,36 @@ drop table t1; --source suite/versioning/common_finish.inc +--echo # MDEV-16490 It's possible to make a system versioned table without any versioning field + +set @@system_versioning_alter_history=keep; +create or replace table t (a int) with system versioning engine=innodb; +--error ER_VERS_TABLE_MUST_HAVE_COLUMNS +alter table t change column a a int without system versioning; + +alter table t + change column a a int without system versioning, + add column b int with system versioning; +show create table t; + +alter table t + change column a new_a int, + drop system versioning; +show create table t; + +alter table t add system versioning; +alter table t change column new_a a int without system versioning; +show create table t; + +--error ER_VERS_TABLE_MUST_HAVE_COLUMNS +alter table t + add column c int, + change column c c int without system versioning, + change column b b int without system versioning; + +alter table t + add column c int without system versioning, + change column c c int, + change column b b int without system versioning; + +drop table t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/create.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/create.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/create.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/create.test 2020-01-26 18:37:28.000000000 +0000 @@ -396,3 +396,13 @@ ) with system versioning; --source suite/versioning/common_finish.inc +--echo # MDEV-16490 It's possible to make a system versioned table without any versioning field +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as y; +--error ER_VERS_TABLE_MUST_HAVE_COLUMNS +create or replace table t1 (x int without system versioning) +with system versioning +select 1 as x; + +drop tables t0, t1, t2, t3; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/delete.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/delete.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/delete.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/delete.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ source suite/versioning/engines.inc; source suite/versioning/common.inc; +--echo # Basic + delete from view replace_result $sys_datatype_expl SYS_DATATYPE; eval create or replace table t1( XNo int unsigned, @@ -31,7 +32,7 @@ drop view vt1; drop table t1; - +--echo # Check sys_start, sys_end replace_result $sys_datatype_expl SYS_DATATYPE; eval create or replace table t1( x int, @@ -47,6 +48,7 @@ select x = 1 as A, sys_start = @sys_start as B, sys_end > sys_start as C from t1 for system_time all; drop table t1; +--echo # Multi-delete replace_result $sys_datatype_expl SYS_DATATYPE; eval create or replace table t1( x int, @@ -69,17 +71,27 @@ drop table t1; drop table t2; ---echo # Basic + delete from view - ---echo # Check sys_start, sys_end - ---echo # Multi-delete - --echo # Update + delete create or replace table t1 (x int) with system versioning; insert into t1 values (1); update t1 set x= 2; delete from t1; select x from t1 for system_time all; +drop table t1; + +--echo # +--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +--echo # +create or replace table t1 (a int) with system versioning; +replace into t1 values (1), (2); +create or replace trigger tr before delete on t1 for each row delete from xx; +create or replace procedure pr() delete from t1; +--error ER_NO_SUCH_TABLE +call pr; +--error ER_NO_SUCH_TABLE +call pr; +drop procedure pr; +drop trigger tr; +drop table t1; --source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/delete_history.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/delete_history.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/delete_history.test 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/delete_history.test 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,144 @@ +--source suite/versioning/common.inc +--source include/have_partition.inc +--source suite/versioning/engines.inc + +create table t (a int); +--error ER_VERS_NOT_VERSIONED +delete history from t before system_time now(); + +# TRUNCATE is not DELETE and trigger must not be called. +--replace_result $sys_datatype_expl SYS_TYPE +eval create or replace table t ( + a int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end)) +with system versioning; +insert into t values (1); +update t set a=2; +set @test = 'correct'; +create trigger trg_before before delete on t for each row set @test = 'incorrect'; +create trigger trg_after after delete on t for each row set @test = 'incorrect'; +delete history from t; +select @test from t; +drop table t; + +--replace_result $sys_datatype_expl SYS_TYPE +eval create or replace table t ( + a int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end)) +with system versioning; +insert into t values (1), (2); +update t set a=11 where a=1; +--real_sleep 0.01 +set @ts1=now(6); +--real_sleep 0.01 +update t set a=22 where a=2; +select * from t for system_time all; +delete history from t before system_time timestamp @ts1; +select * from t for system_time all; +prepare stmt from 'delete history from t'; +execute stmt; drop prepare stmt; +select * from t for system_time all; +delete from t; + +delimiter ~~; +create or replace procedure truncate_sp() +begin + delete history from t before system_time timestamp now(6); +end~~ +delimiter ;~~ +call truncate_sp; +select * from t for system_time all; + +drop procedure truncate_sp; + +--echo # Truncate partitioned +create or replace table t (a int) +with system versioning +partition by system_time limit 1 ( + partition p0 history, + partition p1 history, + partition pn current); +insert into t values (1); +update t set a= 2; +update t set a= 3; +delete history from t; +select * from t for system_time all; + +--echo # VIEW +--replace_result $sys_datatype_expl SYS_TYPE +eval create or replace table t ( + i int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end)) +with system versioning; +delete history from t; +create or replace view v as select * from t; +--error ER_IT_IS_A_VIEW +delete history from v; + +create or replace table t (i int); +--error ER_VERS_NOT_VERSIONED +delete history from t; +create or replace view v as select * from t; +--error ER_IT_IS_A_VIEW +delete history from v; +--error ER_VERS_NOT_VERSIONED +prepare stmt from 'delete history from t'; + +drop table t; +drop view v; + +# +# MDEV-15402 Assertion `table' failed in mysql_delete on attempt to delete history from view +# +create or replace table t (i int); +create or replace view v as select * from t; +--error ER_IT_IS_A_VIEW +drop table v; +lock table v write; +--error ER_IT_IS_A_VIEW +delete history from v before system_time now(6); +unlock tables; +drop view v; +drop table t; + +# +# MDEV-16783 Assertion `!conds' failed in mysql_delete upon 2nd execution of SP with DELETE HISTORY +# +create table t1 (i int) with system versioning; +create procedure pr() delete history from t1 before system_time now(); +call pr; +call pr; +drop procedure pr; +drop table t1; + +--echo # +--echo # MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY +--echo # +--replace_result $sys_datatype_expl SYS_TYPE +eval create or replace table t1 ( + f varchar(1), + row_start $sys_datatype_expl as row start, + row_end $sys_datatype_expl as row end, + period for system_time (row_start, row_end)) +with system versioning; +insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h'); +delete from t1; +delete history from t1; +drop table t1; + +--echo # +--echo # MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY +--echo # +create or replace table t1 (a int check (a > 0)) with system versioning; +delete history from t1; +insert into t1 values (1); +select * from t1; +drop table t1; + +--source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/engines.combinations mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/engines.combinations --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/engines.combinations 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/engines.combinations 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -[timestamp] -default-storage-engine=innodb - -[trx_id] -default-storage-engine=innodb - -[myisam] -default-storage-engine=myisam diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/foreign.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/foreign.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/foreign.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/foreign.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,11 +1,14 @@ +--source suite/versioning/key_type.inc --source suite/versioning/common.inc --echo ################# --echo # Test RESTRICT # --echo ################# -create table parent( - id int unique key +--replace_result "$KEY_TYPE" KEY_TYPE +eval create table parent( + id int, + $KEY_TYPE (id) ) engine innodb; --replace_result $sys_datatype_expl SYS_DATATYPE @@ -42,8 +45,10 @@ --echo # Test when clustered index is a foreign key # --echo ############################################## -create table parent( - id int(10) unsigned unique key +--replace_result "$KEY_TYPE" KEY_TYPE +eval create table parent( + id int(10) unsigned, + $KEY_TYPE (id) ) engine innodb; --replace_result $sys_datatype_expl SYS_DATATYPE @@ -68,8 +73,10 @@ --echo # Test CASCADE # --echo ################ -create table parent( - id int unique key +--replace_result "$KEY_TYPE" KEY_TYPE +eval create table parent( + id int, + $KEY_TYPE (id) ) engine innodb; --replace_result $sys_datatype_expl SYS_DATATYPE @@ -99,9 +106,10 @@ drop table child; drop table parent; ---replace_result $sys_datatype_expl SYS_DATATYPE +--replace_result $sys_datatype_expl SYS_DATATYPE "$KEY_TYPE" KEY_TYPE eval create or replace table parent ( - id int primary key, + id int, + $KEY_TYPE(id), sys_start $sys_datatype_expl as row start invisible, sys_end $sys_datatype_expl as row end invisible, period for system_time(sys_start, sys_end) @@ -126,8 +134,10 @@ drop table child; drop table parent; -create or replace table parent ( - id int primary key +--replace_result "$KEY_TYPE" KEY_TYPE +eval create or replace table parent ( + id int, + $KEY_TYPE(id) ) engine innodb; @@ -158,8 +168,10 @@ --echo # Test SET NULL # --echo ################# -create or replace table parent( - id int unique key +--replace_result "$KEY_TYPE" KEY_TYPE +eval create table parent( + id int, + $KEY_TYPE (id) ) engine innodb; --replace_result $sys_datatype_expl SYS_DATATYPE @@ -196,9 +208,10 @@ --echo # Parent table is foreign # --echo ########################### ---replace_result $sys_datatype_expl SYS_DATATYPE +--replace_result $sys_datatype_expl SYS_DATATYPE "$KEY_TYPE" KEY_TYPE eval create or replace table parent( - id int unique key, + id int, + $KEY_TYPE (id), sys_start $sys_datatype_expl as row start invisible, sys_end $sys_datatype_expl as row end invisible, period for system_time(sys_start, sys_end) @@ -236,9 +249,10 @@ --echo # crash on DELETE # --echo ################### ---replace_result $sys_datatype_expl SYS_DATATYPE +--replace_result $sys_datatype_expl SYS_DATATYPE "$KEY_TYPE" KEY_TYPE eval create or replace table a ( - cola int(10) primary key, + cola int(10), + $KEY_TYPE (cola), v_cola int(10) as (cola mod 10) virtual, sys_start $sys_datatype_expl as row start invisible, sys_end $sys_datatype_expl as row end invisible, @@ -316,19 +330,21 @@ drop table subchild, child, parent; +--echo # +--echo # MDEV-18057 Assertion `(node->state == 5) || (node->state == 6)' failed in row_upd_sec_step upon DELETE after UPDATE failed due to FK violation +--echo # +create or replace table t1 (f1 int, key(f1)) engine=innodb; +create or replace table t2 (f2 int, foreign key (f2) references t1 (f1)) engine=innodb with system versioning; -CREATE TABLE t1 (f1 INT, KEY(f1)) ENGINE=InnoDB; -CREATE TABLE t2 (f2 INT, FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=InnoDB WITH SYSTEM VERSIONING; - -SET FOREIGN_KEY_CHECKS= OFF; -INSERT IGNORE INTO t2 VALUES (1); +set foreign_key_checks= off; +insert ignore into t2 values (1); -SET FOREIGN_KEY_CHECKS= ON; +set foreign_key_checks= on; --error ER_NO_REFERENCED_ROW_2 -UPDATE t2 SET f2= 2; -DELETE FROM t2; +update t2 set f2= 2; +delete from t2; -DROP TABLE t2, t1; +drop table t2, t1; --echo # --echo # MDEV-18879 Corrupted record inserted by FOREIGN KEY operation @@ -406,8 +422,40 @@ # Cleanup DROP TABLE t1, t2; --let $datadir= `select @@datadir` ---remove_file $datadir/test2/t1.data ---remove_file $datadir/test2/t1.data.2 ---remove_file $datadir/test2/t2.data +--remove_file $datadir/test/t1.data +--remove_file $datadir/test/t1.data.2 +--remove_file $datadir/test/t2.data + +--echo # +--echo # MDEV-16210 FK constraints on versioned tables use historical rows, which may cause constraint violation +--echo # +create or replace table t1 (a int, key(a)) engine innodb with system versioning; +create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb; +insert into t1 values (1),(2); +insert into t2 values (1); +--echo # DELETE from referenced table is not allowed +--error ER_ROW_IS_REFERENCED_2 +delete from t1 where a = 1; +drop tables t2, t1; + +--echo # +--echo # MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 or server crash in row_ins_foreign_report_err upon DELETE from versioned table with FK +--echo # +create or replace table t1 (x int primary key) engine innodb; +create or replace table t2 (x int, foreign key (x) references t1(x)) engine innodb with system versioning; +set foreign_key_checks= off; +insert into t2 values (1), (1); +set foreign_key_checks= on; +--echo # DELETE from foreign table is allowed +delete from t2; +drop tables t2, t1; + +create or replace table t1 (a int, key(a)) engine innodb; +insert into t1 values (1); +create or replace table t2 (b int, foreign key (b) references t1(a)) engine innodb with system versioning; +insert into t2 values (1), (1); +--echo # DELETE from foreign table is allowed +delete from t2; +drop tables t2, t1; --source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/online.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/online.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/online.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/online.test 2020-01-26 18:37:28.000000000 +0000 @@ -107,7 +107,7 @@ select c.prtype from information_schema.innodb_sys_columns as c join information_schema.innodb_sys_tables as t on c.table_id=t.table_id - where t.name='test2/t' and c.name='b'; + where t.name='test/t' and c.name='b'; set @@system_versioning_alter_history=keep; @@ -125,7 +125,7 @@ select c.prtype from information_schema.innodb_sys_columns as c join information_schema.innodb_sys_tables as t on c.table_id=t.table_id - where t.name='test2/t' and c.name='b'; + where t.name='test/t' and c.name='b'; --replace_result $sys_datatype_expl SYS_DATATYPE show create table t; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/partition.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/partition.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/partition.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/partition.test 2020-01-26 18:37:28.000000000 +0000 @@ -402,17 +402,17 @@ partition p0 history, partition pn current); set @ts=(select partition_description from information_schema.partitions - where table_schema='test2' and table_name='t1' and partition_name='p0'); + where table_schema='test' and table_name='t1' and partition_name='p0'); alter table t1 add column b int; -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; alter table t1 add partition (partition p1 history, partition p2 history); -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; alter table t1 drop partition p0; -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; --error ER_VERS_DROP_PARTITION_INTERVAL alter table t1 drop partition p2; -select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test2' and table_name='t1'; +select partition_name,partition_ordinal_position,partition_method,timediff(partition_description, @ts) from information_schema.partitions where table_schema='test' and table_name='t1'; --echo # --echo # MDEV-15103 Assertion in ha_partition::part_records() for updating VIEW @@ -455,6 +455,14 @@ create or replace table t1 (i int) with system versioning partition by system_time limit 10 (partition p0 history, partition pn current); --error ER_VERS_QUERY_IN_PARTITION select * from t1 partition (p0) for system_time all; +--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +create or replace procedure sp() +select * from t1 partition (p0) for system_time all; +--error ER_VERS_QUERY_IN_PARTITION +call sp; +--error ER_VERS_QUERY_IN_PARTITION +call sp; +drop procedure sp; --echo # MDEV-15380 Index for versioned table gets corrupt after partitioning and DELETE create or replace table t1 (pk int primary key) @@ -513,6 +521,50 @@ --echo # create or replace table t1 (pk int primary key) with system versioning partition by system_time limit 100 (partition p1 history, partition pn current); execute immediate 'select * from t1 for update'; + +drop view v1; +drop tables t, t1, t2, t3, t4; + +--echo # +--echo # MDEV-18957 UPDATE with LIMIT clause is wrong for versioned partitioned tables +--echo # +create or replace table t1 ( + x int, + a varchar(255) +) with system versioning partition by system_time (partition p1 history, partition pn current); + +insert into t1 (x) values (1), (2), (3), (4); +update t1 set a= 'foo' limit 3; +update t1 set a= 'bar' limit 4; +select * from t1; drop table t1; +--echo # +--echo # MDEV-21011 Table corruption reported for versioned partitioned table after DELETE: "Found a misplaced row" +--echo # +create table t1 (a int) with system versioning +partition by system_time limit 3 +(partition p1 history, partition p2 history, partition pn current); +insert into t1 values (1),(2),(3),(4); +delete from t1; +delete from t1; +check table t1; + +# cleanup +drop table t1; + +--echo # +--echo # MDEV-21233 Assertion `m_extra_cache' failed in ha_partition::late_extra_cache +--echo # +create table t1 (id int, a varchar(8)) with system versioning partition by key (id) partitions 2; +insert into t1 values (1,'foo'),(2,'bar'); + +create table t2 (b int); +insert into t2 values (1),(2); + +update t1, t2 set a = 1; + +# cleanup +drop table t1, t2; + --source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/partition_innodb.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/partition_innodb.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/partition_innodb.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/partition_innodb.test 2020-01-26 18:37:28.000000000 +0000 @@ -29,6 +29,8 @@ partition pn current ); +drop table t1; + --error ER_VERS_TRX_PART_HISTORIC_ROW_NOT_SUPPORTED create or replace table t ( a int primary key, diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/replace.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/replace.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/replace.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/replace.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,13 +1,19 @@ +--source suite/versioning/key_type.inc +if ($MTR_COMBINATION_SEC) +{ + --skip pk or unique only +} --source suite/versioning/common.inc --source suite/versioning/engines.inc ---replace_result $sys_datatype_expl SYS_DATATYPE -eval create table t ( - id int primary key, +--replace_result $sys_datatype_expl SYS_DATATYPE "$KEY_TYPE" KEY_TYPE +eval create or replace table t( + id int, + $KEY_TYPE(id), x int, row_start $sys_datatype_expl as row start invisible, row_end $sys_datatype_expl as row end invisible, - period for system_time (row_start, row_end) + period for system_time(row_start, row_end) ) with system versioning; insert t values (1, 2); @@ -35,7 +41,8 @@ create or replace table t2 (c int); create or replace view v as select t1.* from t1 join t2; replace into v (a, b) select a, b from t1; -drop table t1; +drop view v; +drop tables t1, t2; --replace_result $sys_datatype_expl SYS_DATATYPE eval CREATE TABLE t1 ( diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/select.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/select.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/select.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/select.test 2020-01-26 18:37:28.000000000 +0000 @@ -202,6 +202,21 @@ create or replace table t1 (x int) with system versioning engine myisam; --error ER_VERS_ENGINE_UNSUPPORTED select * from t1 for system_time as of transaction 1; +--echo # MDEV-18929 2nd execution of SP does not detect ER_VERS_NOT_VERSIONED +create or replace procedure sp() +select * from t1 for system_time as of transaction 1; +--error ER_VERS_ENGINE_UNSUPPORTED +call sp; +--error ER_VERS_ENGINE_UNSUPPORTED +call sp; +create or replace table t1 (a int); +create or replace procedure sp() +select * from t1 for system_time all; +--error ER_VERS_NOT_VERSIONED +call sp; +--error ER_VERS_NOT_VERSIONED +call sp; +drop procedure sp; create or replace table t1 ( x int, @@ -377,6 +392,35 @@ drop procedure p; drop table t1; +--echo # +--echo # MDEV-21234 Server crashes in in setup_on_expr upon 3rd execution of SP +--echo # +create table t1 (a varchar(8)); +insert into t1 values ('foo'),('bar'); +create table t2 (b date); + +create procedure pr() insert into t2 select * from t1; +--error ER_TRUNCATED_WRONG_VALUE +call pr; +prepare stmt from 'insert into t2 select * from t1'; +--error ER_TRUNCATED_WRONG_VALUE +execute stmt; +alter table t1 add system versioning; +--error ER_TRUNCATED_WRONG_VALUE +call pr; +--error ER_TRUNCATED_WRONG_VALUE +call pr; +--error ER_TRUNCATED_WRONG_VALUE +execute stmt; +--error ER_TRUNCATED_WRONG_VALUE +execute stmt; +drop prepare stmt; + +# cleanup +drop procedure pr; +drop table t1, t2; + + call verify_trt_dummy(34); -- source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/truncate.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/truncate.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/truncate.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/truncate.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,144 +0,0 @@ ---source suite/versioning/common.inc ---source include/have_partition.inc ---source suite/versioning/engines.inc - -create table t (a int); ---error ER_VERS_NOT_VERSIONED -delete history from t before system_time now(); - -# TRUNCATE is not DELETE and trigger must not be called. ---replace_result $sys_datatype_expl SYS_TYPE -eval create or replace table t ( - a int, - row_start $sys_datatype_expl as row start invisible, - row_end $sys_datatype_expl as row end invisible, - period for system_time (row_start, row_end)) -with system versioning; -insert into t values (1); -update t set a=2; -set @test = 'correct'; -create trigger trg_before before delete on t for each row set @test = 'incorrect'; -create trigger trg_after after delete on t for each row set @test = 'incorrect'; -delete history from t; -select @test from t; -drop table t; - ---replace_result $sys_datatype_expl SYS_TYPE -eval create or replace table t ( - a int, - row_start $sys_datatype_expl as row start invisible, - row_end $sys_datatype_expl as row end invisible, - period for system_time (row_start, row_end)) -with system versioning; -insert into t values (1), (2); -update t set a=11 where a=1; ---real_sleep 0.01 -set @ts1=now(6); ---real_sleep 0.01 -update t set a=22 where a=2; -select * from t for system_time all; -delete history from t before system_time timestamp @ts1; -select * from t for system_time all; -prepare stmt from 'delete history from t'; -execute stmt; drop prepare stmt; -select * from t for system_time all; -delete from t; - -delimiter ~~; -create or replace procedure truncate_sp() -begin - delete history from t before system_time timestamp now(6); -end~~ -delimiter ;~~ -call truncate_sp; -select * from t for system_time all; - -drop procedure truncate_sp; - ---echo # Truncate partitioned -create or replace table t (a int) -with system versioning -partition by system_time limit 1 ( - partition p0 history, - partition p1 history, - partition pn current); -insert into t values (1); -update t set a= 2; -update t set a= 3; -delete history from t; -select * from t for system_time all; - ---echo # VIEW ---replace_result $sys_datatype_expl SYS_TYPE -eval create or replace table t ( - i int, - row_start $sys_datatype_expl as row start invisible, - row_end $sys_datatype_expl as row end invisible, - period for system_time (row_start, row_end)) -with system versioning; -delete history from t; -create or replace view v as select * from t; ---error ER_IT_IS_A_VIEW -delete history from v; - -create or replace table t (i int); ---error ER_VERS_NOT_VERSIONED -delete history from t; -create or replace view v as select * from t; ---error ER_IT_IS_A_VIEW -delete history from v; ---error ER_VERS_NOT_VERSIONED -prepare stmt from 'delete history from t'; - -drop table t; -drop view v; - -# -# MDEV-15402 Assertion `table' failed in mysql_delete on attempt to delete history from view -# -create or replace table t (i int); -create or replace view v as select * from t; ---error ER_IT_IS_A_VIEW -drop table v; -lock table v write; ---error ER_IT_IS_A_VIEW -delete history from v before system_time now(6); -unlock tables; -drop view v; -drop table t; - -# -# MDEV-16783 Assertion `!conds' failed in mysql_delete upon 2nd execution of SP with DELETE HISTORY -# -create table t1 (i int) with system versioning; -create procedure pr() delete history from t1 before system_time now(); -call pr; -call pr; -drop procedure pr; -drop table t1; - ---echo # ---echo # MDEV-19814 Assertion `update->n_fields < ulint(table->n_cols + table->n_v_cols)' on DELETE HISTORY ---echo # ---replace_result $sys_datatype_expl SYS_TYPE -eval create or replace table t1 ( - f varchar(1), - row_start $sys_datatype_expl as row start, - row_end $sys_datatype_expl as row end, - period for system_time (row_start, row_end)) -with system versioning; -insert into t1 (f) values ('a'), ('b'), ('c'), ('d'), ('e'), ('f'), ('g'), ('h'); -delete from t1; -delete history from t1; -drop table t1; - ---echo # ---echo # MDEV-20186 Wrong result or Assertion on INSERT after DELETE HISTORY ---echo # -create or replace table t1 (a int check (a > 0)) with system versioning; -delete history from t1; -insert into t1 values (1); -select * from t1; -drop table t1; - ---source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/trx_id.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/trx_id.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/trx_id.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/trx_id.test 2020-01-26 18:37:28.000000000 +0000 @@ -173,10 +173,7 @@ select row_start from t1 into @trx_id; select trt_begin_ts(@trx_id) <= @ts1 as BEGIN_TS_GOOD; -drop database test; -create database test; -use test; - +drop table t1; --echo # --echo # MDEV-16100 FOR SYSTEM_TIME erroneously resolves string user variables as transaction IDs @@ -501,3 +498,30 @@ SET @@SYSTEM_VERSIONING_ALTER_HISTORY=ERROR; SELECT count(*) from mysql.transaction_registry where begin_timestamp>=commit_timestamp; + +--echo # MDEV-18875 Assertion `thd->transaction.stmt.ha_list == __null || +--echo # trans == &thd->transaction.stmt' failed or bogus ER_DUP_ENTRY upon +--echo # ALTER TABLE with versioning +create or replace table t (x int) engine=innodb; +set autocommit= 0; +alter table t + algorithm=copy, + add column row_start bigint unsigned as row start, + add column row_end bigint unsigned as row end, + add period for system_time(row_start,row_end), + with system versioning; +set autocommit= 1; + +--echo # MDEV-18865 Assertion `t->first->versioned_by_id()' +--echo # failed in innodb_prepare_commit_versioned + +create or replace table t (x int) engine=innodb; +insert into t values (0); +alter table t add `row_start` bigint unsigned as row start, + add `row_end` bigint unsigned as row end, + add period for system_time(`row_start`,`row_end`), + modify x int after row_start, + with system versioning; + + +create or replace database test; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/update-big.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update-big.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/update-big.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update-big.test 2020-01-26 18:37:28.000000000 +0000 @@ -17,7 +17,7 @@ insert into t1 select * from t1; insert into t1 select * from t1; ---connect (con1,localhost,root,,test2) +--connect (con1,localhost,root,,test) alter table t1 add system versioning; --connection default diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/update.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/update.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update.test 2020-01-26 18:37:28.000000000 +0000 @@ -147,4 +147,89 @@ drop table t1; drop table t2; +--echo ### Issue tempesta-tech/mariadb#365, bug 7 (duplicate of historical row) +create or replace table t1 (a int primary key, b int) +with system versioning engine myisam; +insert into t1 (a) values (1); + +replace t1 values (1,2),(1,3),(2,4); + +--echo # +--echo # MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE +--echo # +create or replace table t1 (pk int, a char(3), b char(3), primary key(pk)) + engine=innodb with system versioning; + +insert into t1 (pk) values (1); +connect (con1,localhost,root,,test); +start transaction; +select * from t1 for update; +connection default; +send update t1 set b = 'foo'; +connection con1; +let $wait_condition= select count(*) from information_schema.innodb_lock_waits; +source include/wait_condition.inc; +error ER_LOCK_DEADLOCK; +update t1 set a = 'bar'; +disconnect con1; +connection default; +reap; +drop table t1; + +--echo # +--echo # MDEV-19406 Assertion on updating view of join with versioned table +--echo # +--disable_warnings +create or replace table t1 (pk int primary key, a date, b int, index(b)) engine=innodb with system versioning; +create or replace table t2 (c int); +create or replace view v as select * from t1 join t2; + +insert into t1 (pk) values (1); +update t1 set a= '2012-12-12'; +update v set a= '2000-01-01' order by b limit 1; # point of failure +drop view v; +drop table t1, t2; +--enable_warnings + +--echo # +--echo # MDEV-20441 ER_CRASHED_ON_USAGE upon update on versioned Aria table +--echo # +create or replace table t1 (a varchar(8)) +engine=aria row_format=fixed +with system versioning; + +insert into t1 (a) values ('foo'); +update t1 set a = 'bar'; +drop table t1; + +--echo # +--echo # MDEV-21147 Assertion `marked_for_read()' upon UPDATE on versioned table via view +--echo # +create or replace table t1 ( + pk int, a char(8), b char(8), + primary key (pk) +) with system versioning; + +create or replace view v1 as select * from t1; +insert into t1 values (1, null, 'd') , (2, null, 'i') ; +update v1 set a= null where b = ''; + +create or replace table t1 (id int, k int, primary key (id)) engine=innodb with system versioning; +insert into t1 values (1,1),(2,2); +create or replace view v1 as select * from t1; +update v1 set id= 2 where k = 0; + +create or replace table t1 (a int) with system versioning; +create or replace view v1 as select * from t1; +create or replace procedure sp() update v1 set xx = 1; +--error ER_BAD_FIELD_ERROR +call sp; +--error ER_BAD_FIELD_ERROR +call sp; + +# cleanup +drop procedure sp; +drop view v1; +drop table t1; + source suite/versioning/common_finish.inc; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/update2.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update2.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/update2.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/update2.test 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -source include/have_innodb.inc; - -echo ### Issue #365, bug 7 (duplicate of historical row); -create or replace table t1 (a int primary key, b int) -with system versioning engine myisam; -insert into t1 (a) values (1); - -replace t1 values (1,2),(1,3),(2,4); - -# -# MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE -# - -create or replace table t1 (pk int, a char(3), b char(3), primary key(pk)) - engine=innodb with system versioning; - -insert into t1 (pk) values (1); -connect (con1,localhost,root,,test); -start transaction; -select * from t1 for update; -connection default; -send update t1 set b = 'foo'; -connection con1; -let $wait_condition= select count(*) from information_schema.innodb_lock_waits; -source include/wait_condition.inc; -error ER_LOCK_DEADLOCK; -update t1 set a = 'bar'; -disconnect con1; -connection default; -reap; -drop table t1; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/view.test mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/view.test --- mariadb-10.3-10.3.18/mysql-test/suite/versioning/t/view.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/versioning/t/view.test 2020-01-26 18:37:28.000000000 +0000 @@ -52,13 +52,13 @@ select * from vt1; ---echo # VIEW with parameters [#151] +--echo # VIEW with parameters [tempesta-tech/mariadb#151] create or replace table t1 (x int) with system versioning; create or replace view vt1(c) as select x from t1; --replace_result 18446744073709551615 MAX_RESULT "TIMESTAMP'2038-01-19 03:14:07.999999'" MAX_RESULT show create view vt1; ---echo # VIEW over JOIN of versioned tables [#153] +--echo # VIEW over JOIN of versioned tables [tempesta-tech/mariadb#153] create or replace table t1 (a int) with system versioning; create or replace table t2 (b int) with system versioning; insert into t1 values (1); @@ -68,7 +68,7 @@ create or replace view vt12 as select * from t1 for system_time as of timestamp ('0-0-0') cross join t2; select * from vt12; ---echo # VIEW improvements [#183] +--echo # VIEW improvements [tempesta-tech/mariadb#183] create or replace table t3 (x int); create or replace view vt1 as select * from t1, t2, t3; --replace_result 18446744073709551615 MAX_RESULT "TIMESTAMP'2038-01-19 03:14:07.999999'" MAX_RESULT @@ -80,11 +80,11 @@ --replace_result 18446744073709551615 MAX_RESULT "TIMESTAMP'2038-01-19 03:14:07.999999'" MAX_RESULT show create view vt1; ---echo # VIEW over UNION [#269] +--echo # VIEW over UNION [tempesta-tech/mariadb#269] create or replace view vt1 as select * from t1 union select * from t1; select * from vt1; ---echo # VIEW over UNION with non-versioned [#393] +--echo # VIEW over UNION with non-versioned [tempesta-tech/mariadb#393] create or replace table t2 (a int); create or replace view vt1 as select * from t1 union select * from t2; select * from vt1; @@ -98,17 +98,16 @@ prepare stmt from 'select a from v1 inner join t2 group by a order by a'; execute stmt; execute stmt; -drop database test2; -create database test2; -use test2; +drop view v1; +drop tables t1, t2; --echo # --echo # MDEV-15146 SQLError[4122]: View is not system versioned --echo # -create table t1 (a int) with system versioning; +create or replace table t1 (a int) with system versioning; insert t1 values (1),(2); set @a=now(6); -create view v1 as select * from t1; +create or replace view v1 as select * from t1; delete from t1; select * from v1; select * from v1 for system_time as of @a; @@ -122,7 +121,96 @@ create or replace view v1 as select * from t1 for system_time as of date_sub(now(), interval 6 second); show create view v1; +drop view v1, vt1, vt12; +drop tables t1, t3; + +--echo # +--echo # MDEV-18727 improve DML operation of System Versioning +--echo # +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table t1 ( + x int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end) +) with system versioning; +insert into t1 values (1), (2); +create or replace view v1 as select * from t1 where x > 1; +--echo # update, delete +update v1 set x= x + 1; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +insert v1 values (4); +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +delete from v1 where x < 4; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +--echo # multi-update +create or replace table t2 like t1; +insert into t2 values (1), (2); +create or replace view v2 as select * from t2 where x > 1; +update v1, v2 set v1.x= v1.x + 1, v2.x= v2.x + 1 where v1.x = v2.x + 2; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +select *, check_row(row_start, row_end) from t2 for system_time all order by x; +--echo # multi-delete +delete v1, v2 from v1 join v2 where v1.x = v2.x + 2; +select *, check_row(row_start, row_end) from t1 for system_time all order by x; +select *, check_row(row_start, row_end) from t2 for system_time all order by x; +--echo # replace +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create or replace table t1 ( + x int primary key, y int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end) +) with system versioning; +insert into t1 values (1, 0), (2, 0); +create or replace view v1 as select * from t1 where x > 1; +replace v1 values (1, 1); +replace v1 values (2, 1); +replace v1 values (3, 1); +--echo # REPLACE ignores VIEW condition because itself doesn't use WHERE +select *, check_row(row_start, row_end) from t1 for system_time all order by x, row_end; +--echo # insert-select, on duplicate key +insert v1 select * from t1 where x = 1 on duplicate key update x = v1.x - 1; +select *, check_row(row_start, row_end) from t1 for system_time all order by x, row_end; +drop view v1, v2; +drop tables t1, t2; + +--echo # +--echo # MDEV-21146 Assertion `m_lock_type == 2' in handler::ha_drop_table upon LOAD DATA +--echo # +create table t1 (a int); +create view v1 as select * from t1; +create or replace table t1 (b int) with system versioning; +--error ER_VIEW_INVALID +load data infile 'xx' into table v1; + +# cleanup drop view v1; drop table t1; +--echo # +--echo # MDEV-21155 Assertion with versioned table upon DELETE from view of view after replacing first view +--echo # +create table t1 (a int); +insert into t1 values (1); +--replace_result $sys_datatype_expl SYS_DATATYPE +eval create table t2 ( + b int, + row_start $sys_datatype_expl as row start invisible, + row_end $sys_datatype_expl as row end invisible, + period for system_time (row_start, row_end) +) with system versioning; +insert into t2 values (2); +create view v1 as select * from t1; +create view v2 as select * from v1; +create or replace view v1 as select * from t2; +delete from v2; +select * from t1; +select *, check_row(row_start, row_end) from t2 for system_time all; + +# cleanup +drop view v2; +drop view v1; +drop table t1, t2; + --source suite/versioning/common_finish.inc diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/disabled.def mariadb-10.3-10.3.22/mysql-test/suite/wsrep/disabled.def --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/disabled.def 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/disabled.def 2020-01-26 18:37:28.000000000 +0000 @@ -10,5 +10,4 @@ # ############################################################################## -foreign_key : Sporadic failure "WSREP has not yet prepared node for application use" -variables : MDEV-19746 Galera test failures because of wsrep_slave_threads identification +variables : MDEV-17585 wsrep.variables diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/my.cnf mariadb-10.3-10.3.22/mysql-test/suite/wsrep/my.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/my.cnf 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/my.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -1,10 +1,8 @@ # Use default setting for mysqld processes !include include/default_mysqld.cnf -[mysqld] -wsrep-on=1 - [mysqld.1] +wsrep-on=1 #galera_port=@OPT.port #ist_port=@OPT.port #sst_port=@OPT.port diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result 2020-01-26 18:37:28.000000000 +0000 @@ -4,7 +4,7 @@ # Verbose run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -36,7 +36,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -46,7 +46,7 @@ # Silent run \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=InnoDB; ALTER TABLE time_zone_name ENGINE=InnoDB; ALTER TABLE time_zone_transition ENGINE=InnoDB; @@ -75,7 +75,7 @@ ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -93,7 +93,7 @@ ; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; @@ -105,21 +105,21 @@ # \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=InnoDB; END IF| \d ; TRUNCATE TABLE time_zone_leap_second; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone_leap_second ENGINE=MyISAM; END IF| \d ; ALTER TABLE time_zone_leap_second ORDER BY Transition_time; \d | IF (select count(*) from information_schema.global_variables where -variable_name='wsrep_on') = 1 THEN +variable_name='wsrep_on' and variable_value='ON') = 1 THEN ALTER TABLE time_zone ENGINE=MyISAM; ALTER TABLE time_zone_name ENGINE=MyISAM; ALTER TABLE time_zone_transition ENGINE=MyISAM; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result 2020-01-26 18:37:28.000000000 +0000 @@ -2,7 +2,7 @@ # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above # # Verbose run -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; TRUNCATE TABLE time_zone; @@ -29,7 +29,7 @@ ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time; ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id; # Silent run -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; TRUNCATE TABLE time_zone; @@ -55,7 +55,7 @@ # # Testing with explicit timezonefile # -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; INSERT INTO time_zone (Use_leap_seconds) VALUES ('N'); @@ -67,7 +67,7 @@ # # Testing --leap # -set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); +set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?'); prepare set_wsrep_write_binlog from @prep1; set @toggle=0; execute set_wsrep_write_binlog using @toggle; TRUNCATE TABLE time_zone_leap_second; diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/r/variables.result mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/variables.result --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/r/variables.result 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/r/variables.result 2020-01-26 18:37:28.000000000 +0000 @@ -166,6 +166,9 @@ SELECT @@global.wsrep_cluster_address; @@global.wsrep_cluster_address +SELECT @@global.wsrep_on; +@@global.wsrep_on +1 SHOW STATUS LIKE 'threads_connected'; Variable_name Value Threads_connected 1 @@ -179,6 +182,9 @@ SELECT @@global.wsrep_cluster_address; @@global.wsrep_cluster_address +SELECT @@global.wsrep_on; +@@global.wsrep_on +1 SHOW STATUS LIKE 'threads_connected'; Variable_name Value Threads_connected 1 @@ -190,14 +196,15 @@ # applier/rollbacker threads. SET GLOBAL wsrep_cluster_address= 'gcomm://'; # Wait for applier thread to get created 1. -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; -VARIABLE_VALUE +# Wait for applier thread to get created 2. +SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; +EXPECT_1 1 -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; -VARIABLE_VALUE +SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; +EXPECT_1 1 -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; -VARIABLE_VALUE +SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +EXPECT_2 2 SELECT @@global.wsrep_provider; @@global.wsrep_provider @@ -205,6 +212,9 @@ SELECT @@global.wsrep_cluster_address; @@global.wsrep_cluster_address gcomm:// +SELECT @@global.wsrep_on; +@@global.wsrep_on +1 SHOW STATUS LIKE 'threads_connected'; Variable_name Value Threads_connected 1 @@ -215,14 +225,14 @@ SET @wsrep_slave_threads_saved= @@global.wsrep_slave_threads; SET GLOBAL wsrep_slave_threads= 10; # Wait for 9 applier threads to get created. -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; -VARIABLE_VALUE +SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; +EXPECT_10 10 -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; -VARIABLE_VALUE +SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; +EXPECT_1 1 -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; -VARIABLE_VALUE +SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +EXPECT_11 11 SHOW STATUS LIKE 'threads_connected'; Variable_name Value diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/alter_table_innodb.cnf mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/alter_table_innodb.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/alter_table_innodb.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/alter_table_innodb.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,12 @@ +!include include/default_mysqld.cnf + +[mysqld] +wsrep-on=0 + +[mysqld.1] +wsrep-on=0 +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' +wsrep_cluster_address='not empty but invalid' diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/alter_table_innodb.opt mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/alter_table_innodb.opt --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/alter_table_innodb.opt 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/alter_table_innodb.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep-on=0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/binlog_format.opt mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/binlog_format.opt --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/binlog_format.opt 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/binlog_format.opt 2020-01-26 18:37:28.000000000 +0000 @@ -1 +1 @@ ---innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// +--innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mdev_10186.cnf mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mdev_10186.cnf --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mdev_10186.cnf 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mdev_10186.cnf 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,15 @@ +!include include/default_mysqld.cnf + +[mysqld] +wsrep-on=0 + +[mysqld.1] +wsrep-on=0 +#galera_port=@OPT.port +#ist_port=@OPT.port +#sst_port=@OPT.port +wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M' +wsrep_cluster_address='not empty but invalid' +innodb_autoinc_lock_mode=2 +wsrep-provider=$WSREP_PROVIDER +wsrep-cluster-address=gcomm:// diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mdev_10186.opt mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mdev_10186.opt --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mdev_10186.opt 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mdev_10186.opt 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ ---wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=0 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,3 @@ +--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --binlog_format=ROW + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ --source include/have_wsrep.inc --source include/have_symlink.inc --source include/not_windows.inc +--source include/have_innodb.inc --echo # --echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.opt 2020-01-26 18:37:28.000000000 +0000 @@ -0,0 +1,3 @@ +--wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep-on=1 --binlog_format=ROW + + diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test 2020-01-26 18:37:28.000000000 +0000 @@ -1,6 +1,7 @@ --source include/have_wsrep.inc --source include/have_symlink.inc --source include/not_windows.inc +--source include/have_innodb.inc --echo # --echo # MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/pool_of_threads.opt mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/pool_of_threads.opt --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/pool_of_threads.opt 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/pool_of_threads.opt 2020-01-26 18:37:28.000000000 +0000 @@ -1 +1 @@ ---innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads +--innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads --wsrep-on=1 diff -Nru mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/variables.test mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/variables.test --- mariadb-10.3-10.3.18/mysql-test/suite/wsrep/t/variables.test 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/suite/wsrep/t/variables.test 2020-01-26 18:37:28.000000000 +0000 @@ -80,6 +80,7 @@ SELECT @@global.wsrep_provider; SELECT @@global.wsrep_slave_threads; SELECT @@global.wsrep_cluster_address; +SELECT @@global.wsrep_on; SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'wsrep_thread_count'; --echo @@ -91,6 +92,7 @@ --replace_regex /.*libgalera_smm.*/libgalera_smm.so/ SELECT @@global.wsrep_provider; SELECT @@global.wsrep_cluster_address; +SELECT @@global.wsrep_on; SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'wsrep_thread_count'; --echo @@ -102,14 +104,18 @@ --echo # Wait for applier thread to get created 1. --let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; --source include/wait_condition.inc +--echo # Wait for applier thread to get created 2. +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; +--source include/wait_condition.inc -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; +SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; +SELECT VARIABLE_VALUE AS EXPECT_2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; --replace_regex /.*libgalera_smm.*/libgalera_smm.so/ SELECT @@global.wsrep_provider; SELECT @@global.wsrep_cluster_address; +SELECT @@global.wsrep_on; SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'wsrep_thread_count'; --echo @@ -121,9 +127,9 @@ --let $wait_condition = SELECT VARIABLE_VALUE = 10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; --source include/wait_condition.inc -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; -SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; +SELECT VARIABLE_VALUE AS EXPECT_10 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_applier_thread_count'; +SELECT VARIABLE_VALUE AS EXPECT_1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_rollbacker_thread_count'; +SELECT VARIABLE_VALUE AS EXPECT_11 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_thread_count'; SHOW STATUS LIKE 'threads_connected'; @@ -132,6 +138,7 @@ # set wsrep_on=0; set wsrep_on=1; +--source include/wait_until_connected_again.inc create user test@localhost; connect con1,localhost,test; set auto_increment_increment=10; diff -Nru mariadb-10.3-10.3.18/mysql-test/unstable-tests mariadb-10.3-10.3.22/mysql-test/unstable-tests --- mariadb-10.3-10.3.18/mysql-test/unstable-tests 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysql-test/unstable-tests 2020-01-26 18:37:28.000000000 +0000 @@ -23,261 +23,149 @@ # ############################################################################## # -# Based on 10.3 f80e02e043103ab4e6ca12d9efffec6eb9aa3b74 +# Based on bb-10.3-release e10e922afd138aec491c646682f4989922527cfb -main.alter_table : Modified in 10.3.18 -main.alter_table_mdev539_maria : Include file modified in 10.3.18 -main.alter_table_mdev539_myisam : Include file modified in 10.3.18 main.alter_table_trans : MDEV-12084 - timeout -main.analyze : Modified in 10.3.18 -main.analyze_format_json : Modified in 10.3.18 -main.analyze_stmt : Modified in 10.3.18 -main.analyze_stmt_orderby : Modified in 10.3.18 -main.analyze_stmt_privileges2 : Modified in 10.3.18 main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.auth_named_pipe : MDEV-14724 - System error 2 -main.bootstrap : Modified in 10.3.18 -main.bug13633383 : Modified in 10.3.18 -main.cast : Modified in 10.2.27 -main.charset_client_win : Added in 10.3.17 -main.column_compression : Modified in 10.3.17 -main.compound : Modified in 10.3.18 -main.compress : Include file modified in 10.3.18 +main.cache_temporal_4265 : Modified in 10.3.22 main.connect : MDEV-17282 - Wrong result main.connect2 : MDEV-13885 - Server crash -main.connect_debug : Modified in 10.3.17 -main.constraints : Modified in 10.3.18 +main.connect_debug : Modified in 10.3.22 main.count_distinct2 : MDEV-11768 - timeout -main.create : Modified in 10.3.18 main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result -main.cte_nonrecursive : Modified in 10.3.18 -main.cte_recursive : Modified in 10.3.18 -main.ctype_create : Modified in 10.2.27 -main.ctype_latin1_de : Modified in 10.2.27 +main.create_or_replace2 : Modified in 10.3.22 +main.cte_nonrecursive : Modified in 10.3.22 main.ctype_ucs : MDEV-17681 - Data too long for column main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade main.ctype_utf16 : MDEV-10675: timeout or extra warnings -main.ctype_utf16_def : Configuration modified in 10.3.18 main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.ctype_utf8 : Modified in 10.3.18 -main.ctype_utf8mb4 : Modified in 10.3.18 -main.ctype_utf8mb4_heap : Include file modified in 10.3.18 -main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison; include file modified in 10.3.18 -main.ctype_utf8mb4_myisam : Include file modified in 10.3.18 -main.custom_aggregates_i_s : Modified in 10.3.18 +main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison main.debug_sync : MDEV-10607 - internal error -main.default : Modified in 10.3.18 -main.derived : Modified in 10.3.18 -main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.3.18 +main.default_session : Modified in 10.3.22 +main.delete_use_source : Modified in 10.3.22 +main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.3.22 main.derived_opt : MDEV-11768 - timeout -main.derived_split_innodb : Modified in 10.3.18 -main.derived_view : Modified in 10.3.18 main.dirty_close : MDEV-19368 - mysqltest failed but provided no output -main.distinct : MDEV-14194 - Crash; modified in 10.3.18 -main.drop_bad_db_type : MDEV-15676 - Wrong result -main.dyncol : MDEV-19455 - Extra warning; modified in 10.3.18 -main.events_1 : Modified in 10.3.18 -main.events_2 : MDEV-13277 - Crash; modified in 10.3.18 -main.events_bugs : MDEV-12892 - Crash; modified in 10.3.18 -main.events_grant : Modified in 10.3.18 +main.distinct : MDEV-14194 - Crash +main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.3.22 +main.dyncol : MDEV-19455 - Extra warning +main.engine_error_in_alter-8453 : Modified in 10.3.22 +main.error_simulation : Modified in 10.3.22 +main.events_2 : MDEV-13277 - Crash +main.events_bugs : MDEV-12892 - Crash; modified in 10.3.22 main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result -main.except : Modified in 10.3.18 -main.explain_json : Modified in 10.3.18 main.flush : MDEV-19368 - mysqltest failed but provided no output -main.flush2 : Modified in 10.2.27 -main.func_hybrid_type : Modified in 10.3.18 -main.func_isnull : Modified in 10.3.18 -main.func_math : MDEV-20532 - Floating point differences; modified in 10.3.18 -main.func_misc : Modified in 10.3.18 -main.func_str : Modified in 10.3.18 -main.function_defaults : Modified in 10.3.18 +main.foreign_key : Modified in 10.3.22 +main.func_math : MDEV-20532 - Floating point differences +main.func_misc : Modified in 10.3.22 +main.func_regexp_pcre : Modified in 10.3.22 +main.func_regexp_pcre_debug : Modified in 10.3.22 +main.func_time : Modified in 10.3.22 main.gis : MDEV-13411 - wrong result on P8 -main.grant : Configuration added in 10.3.18 -main.grant2 : Configuration added in 10.3.18 -main.grant4 : Configuration added in 10.3.18 -main.grant_cache_no_prot : Include file modified in 10.2.27 -main.grant_cache_ps_prot : Include file modified in 10.2.27 -main.grant_explain_non_select : Modified in 10.3.18 -main.greedy_optimizer : Modified in 10.3.18 -main.group_by : Modified in 10.3.18 -main.group_min_max : Modified in 10.3.18 -main.handlersocket : Configuration added in 10.3.18 +main.gis_notembedded : MDEV-21264 - Wrong result with different default charset +main.group_by : Modified in 10.3.22 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown -main.index_intersect : Modified in 10.3.18 main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Plan mismatch -main.information_schema : Modified in 10.3.18 -main.information_schema-big : Modified in 10.3.18 -main.information_schema_parameters : Modified in 10.3.18 -main.information_schema_routines : Modified in 10.3.18 -main.innodb_ext_key : Modified in 10.3.18 -main.innodb_icp : Modified in 10.3.18 main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.intersect : Modified in 10.3.18 -main.invisible_field_debug : Modified in 10.3.18 -main.join : Modified in 10.3.18 -main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.3.18 -main.join_nested_jcl6 : Modified in 10.3.18 -main.join_outer : Modified in 10.3.17 -main.join_outer_innodb : Modified in 10.3.18 -main.join_outer_jcl6 : Modified in 10.3.18 -main.keywords : Modified in 10.3.17 -main.kill : Modified in 10.3.18 +main.insert_debug : Added in 10.3.22 +main.join : Modified in 10.3.22 +main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.3.22 main.kill-2 : MDEV-13257 - Wrong result main.kill_processlist-6619 : MDEV-10793 - Wrong result -main.limit_rows_examined : Modified in 10.3.18 main.loaddata : MDEV-19368 - mysqltest failed but provided no output main.locale : MDEV-20521 - Missing warning -main.log_slow : MDEV-13263 - Wrong result; modified in 10.3.18 +main.log_slow : MDEV-13263 - Wrong result +main.log_slow_debug : Modified in 10.3.22 main.log_tables-big : MDEV-13408 - wrong result main.mdev-504 : MDEV-15171 - warning -main.mdev13607 : Modified in 10.3.18 main.mdev375 : MDEV-10607 - sporadic "can't connect" -main.merge : MDEV-10607 - sporadic "can't connect"; modified in 10.3.18 -main.mrr_icp_extra : Modified in 10.3.18 -main.multi_update : Modified in 10.3.18 +main.mdev6830 : Modified in 10.3.22 +main.merge : MDEV-10607 - sporadic "can't connect" +main.merge-big : Modified in 10.3.22 +main.merge_debug : Modified in 10.3.22 main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out -main.myisam : Modified in 10.3.18 -main.myisam_explain_non_select_all : Modified in 10.3.18 -main.myisam_icp : Modified in 10.3.18 -main.myisam_mrr : Modified in 10.3.18 -main.mysql : Modified in 10.3.18 -main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; modified in 10.3.18 +main.myisam_debug : Modified in 10.3.22 +main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2 main.mysql_client_test_comp : MDEV-16641 - Error in exec main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_comments : Modified in 10.3.18 main.mysql_upgrade_noengine : MDEV-14355 - Wrong result -main.mysql_upgrade_ssl : MDEV-13492 - Unknown SSL error -main.mysqlcheck : Modified in 10.3.18 -main.mysqld--help : Modified in 10.3.17 -main.mysqldump : MDEV-14800 - Stack smashing detected; modified in 10.3.18 -main.mysqldump-compat-102 : Modified in 10.3.18 -main.mysqldump-max : Modified in 10.2.27 -main.mysqldump-nl : Modified in 10.3.18 -main.mysqldump-utf8mb4 : Modified in 10.3.18 -main.mysqldump_restore : Modified in 10.3.17 +main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap +main.mysqldump : MDEV-14800 - Stack smashing detected main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-13887 - Wrong result -main.named_pipe : Include file modified in 10.3.18 main.old-mode : MDEV-19373 - Wrong result -main.openssl_1 : MDEV-13492 - Unknown SSL error; modified in 10.3.18 main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.opt_tvc : Modified in 10.3.18 +main.opt_tvc : Modified in 10.3.22 +main.order_by : Modified in 10.3.21 main.order_by_optimizer_innodb : MDEV-10683 - Wrong result main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock -main.partition_example : Configuration added in 10.3.18 -main.partition_innodb : Modified in 10.3.18 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 -main.partition_key_cache : Modified in 10.2.27 -main.partition_pruning : Modified in 10.3.18 -main.partition_range : Modified in 10.3.18 -main.plugin : Configuration added in 10.3.18 -main.plugin_auth : Modified in 10.3.17 -main.plugin_innodb : Configuration added in 10.3.18 -main.plugin_load : Configuration modified in 10.3.18 -main.plugin_load_option : Configuration modified in 10.3.18 -main.plugin_not_embedded : Configuration added in 10.3.18 -main.pool_of_threads : MDEV-18135 - SSL error: key too small; modified in 10.3.18 -main.ps : MDEV-11017 - Sporadic wrong Prepared_stmt_count; configuration modified in 10.3.18 -main.ps_innodb : Added in 10.3.17 +main.partition_mrr_aria : Added in 10.3.21 +main.partition_mrr_innodb : Added in 10.3.21 +main.partition_mrr_myisam : Added in 10.3.21 +main.partition_pruning : Modified in 10.3.21 +main.pool_of_threads : MDEV-18135 - SSL error: key too small +main.ps : MDEV-11017 - Sporadic wrong Prepared_stmt_count main.query_cache : MDEV-16180 - Wrong result -main.query_cache_debug : MDEV-15281 - Query cache is disabled; modified in 10.3.18 -main.query_cache_notembedded : Modified in 10.3.18 -main.query_cache_ps_no_prot : Modified in 10.3.18 -main.range : Modified in 10.3.18 -main.range_interrupted-13751 : Modified in 10.3.18 -main.range_mrr_icp : Modified in 10.3.18 -main.range_vs_index_merge : Modified in 10.3.18 +main.query_cache_debug : MDEV-15281 - Query cache is disabled +main.range_innodb : Modified in 10.3.22 +main.range_interrupted-13751 : Modified in 10.3.22 main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.repair : Modified in 10.3.18 -main.repair_symlink-5543 : Modified in 10.3.17 -main.schema : Modified in 10.3.18 -main.select : MDEV-20532 - Floating point differences; modified in 10.3.18 +main.select : MDEV-20532 - Floating point differences +main.select_debug : Modified in 10.3.22 main.select_jcl6 : MDEV-20532 - Floating point differences main.select_pkeycache : MDEV-20532 - Floating point differences -main.selectivity : Modified in 10.3.18 -main.selectivity_innodb : Modified in 10.3.18 -main.selectivity_no_engine : Modified in 10.3.18 +main.selectivity : Modified in 10.3.21 main.set_statement : MDEV-13183 - Wrong result main.set_statement_notembedded : MDEV-19414 - Wrong result -main.shm : MDEV-12727 - Mismatch, ERROR 2013; include file modified in 10.3.18 -main.show_bad_definer-5553 : Modified in 10.3.18 -main.show_check : Modified in 10.3.18 -main.show_explain : MDEV-10674 - Wrong result code -main.sp : MDEV-7866 - Mismatch; modified in 10.3.18 -main.sp-anchor-type : Modified in 10.3.18 -main.sp-error : Modified in 10.3.18 -main.sp-security : MDEV-10607 - sporadic "can't connect"; modified in 10.3.18 +main.shm : MDEV-12727 - Mismatch, ERROR 2013 +main.show_explain : MDEV-10674 - Wrong result code; modified in 10.3.22 +main.show_explain_non_select : Modified in 10.3.22 +main.show_explain_ps : Modified in 10.3.22 +main.slowlog_enospace-10508 : Modified in 10.3.22 +main.sp : MDEV-7866 - Mismatch +main.sp-security : MDEV-10607 - sporadic "can't connect" main.sp_notembedded : MDEV-10607 - internal error -main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1; modified in 10.3.18 -main.ssl-big : Modified in 10.3.18 +main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.ssl_7937 : Modified in 10.3.22 +main.ssl_8k_key : Modified in 10.3.22 main.ssl_ca : MDEV-10895 - SSL connection error on Power main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_compress : Modified in 10.3.18 -main.ssl_connect : MDEV-13492 - Unknown SSL error -main.ssl_crl : MDEV-19119 - Wrong error code +main.ssl_crl : MDEV-19119 - Wrong error code; modified in 10.3.21 +main.ssl_crl_clients : Modified in 10.3.22 +main.ssl_system_ca : Added in 10.3.22 main.ssl_timeout : MDEV-11244 - Crash -main.stat_tables : Modified in 10.3.18 -main.stat_tables-enospc : Modified in 10.3.18 +main.stat_tables-enospc : Modified in 10.3.22 main.stat_tables_par : MDEV-13266 - Wrong result main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding -main.statistics : Modified in 10.3.18 main.status : MDEV-13255 - Wrong result -main.subselect : Modified in 10.3.18 -main.subselect2 : Modified in 10.3.18 -main.subselect3 : Modified in 10.3.18 -main.subselect3_jcl6 : Modified in 10.3.18 -main.subselect4 : Modified in 10.3.18 -main.subselect_exists2in : Modified in 10.3.18 -main.subselect_extra : Modified in 10.3.18 +main.subselect : MDEV-20551 - Valgrind failure main.subselect_innodb : MDEV-10614 - Wrong result -main.subselect_mat_cost : Modified in 10.3.18 -main.subselect_mat_cost_bugs : Modified in 10.3.18 -main.subselect_sj : Modified in 10.3.18 -main.subselect_sj2 : Modified in 10.2.27 -main.subselect_sj2_jcl6 : Modified in 10.3.18 -main.subselect_sj2_mat : Modified in 10.3.18 -main.subselect_sj_jcl6 : Modified in 10.3.18 -main.subselect_sj_mat : Modified in 10.3.18 -main.subselect_sj_nonmerged : Modified in 10.3.18 -main.system_mysql_db_fix50117 : Modified in 10.3.18 -main.system_time_debug : Added in 10.3.18 -main.table_options-5867 : Configuration added in 10.3.18 main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.trigger : Modified in 10.3.18 -main.trigger-compat : Modified in 10.3.18 -main.trigger_notembedded : Modified in 10.3.18 -main.truncate_badse : Configuration added in 10.3.18 main.type_blob : MDEV-15195 - Wrong result -main.type_date : Modified in 10.3.18 -main.type_datetime : Modified in 10.3.18 +main.type_datetime : Modified in 10.3.22 main.type_datetime_hires : MDEV-10687 - Timeout main.type_float : MDEV-20532 - Floating point differences -main.type_int : Modified in 10.3.18 -main.type_time_6065 : Modified in 10.3.18 -main.type_varchar : Configuration added in 10.3.18 -main.union : Modified in 10.3.18 -main.upgrade : Configuration added in 10.3.18 -main.userstat : MDEV-12904 - SSL errors; configuration added in 10.3.18 -main.variables : Modified in 10.3.18 -main.variables-notembedded : Modified in 10.2.27 -main.view : Modified in 10.3.18 +main.type_int : Modified in 10.3.22 +main.type_time : Modified in 10.3.22 +main.union_crash-714 : Modified in 10.3.22 +main.userstat : MDEV-12904 - SSL errors main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query -main.win : Modified in 10.3.18 -main.win_percentile : Modified in 10.3.18 +main.warnings_debug : Modified in 10.3.22 +main.win : Modified in 10.3.22 main.xa : MDEV-11769 - lock wait timeout -main.xtradb_mrr : Modified in 10.3.18 #----------------------------------------------------------------------- archive.archive_bitfield : MDEV-11771 - table is marked as crashed archive.archive_symlink : MDEV-12170 - unexpected error on rmdir archive.discover : MDEV-10510 - Table is marked as crashed -archive.discover_5438 : Configuration added in 10.3.18 archive.mysqlhotcopy_archive : MDEV-10995 - Hang on debug #----------------------------------------------------------------------- @@ -287,39 +175,44 @@ #----------------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Mismatch -binlog.binlog_innodb : Configuration added in 10.3.18 +binlog.binlog_index : Include file modified in 10.2.31 +binlog.binlog_invalid_read_in_rotate : Added in 10.3.22 +binlog.binlog_ioerr : Include file modified in 10.2.31 binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown; modified in 10.3.18 -binlog.binlog_mixed_cache_stat : Include file modified in 10.3.18 -binlog.binlog_mysqlbinlog2 : Modified in 10.2.27 +binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files differ binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ -binlog.binlog_mysqlbinlog_stop_never : Added in 10.3.17 -binlog.binlog_parallel_replication_marks_row : Include file modified in 10.3.17 -binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.3.17 -binlog.binlog_row_cache_stat : Include file modified in 10.3.18 -binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.3.18 -binlog.binlog_stm_cache_stat : Include file modified in 10.3.18 -binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.3.18 +binlog.binlog_parallel_replication_marks_row : Include file modified in 10.3.22 +binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.3.22 +binlog.binlog_show_binlog_event_random_pos : Added in 10.3.22 +binlog.binlog_write_error : Include file Include file modified in 10.2.31 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint -binlog.flashback-largebinlog : MDEV-19764 - Out of memory; modified in 10.3.18 +binlog.flashback-largebinlog : MDEV-19764 - Out of memory binlog.load_data_stm_view : MDEV-16948 - Wrong result #----------------------------------------------------------------------- +binlog_encryption.binlog_index : Include file modified in 10.3.22 +binlog_encryption.binlog_ioerr : Include file modified in 10.3.22 +binlog_encryption.binlog_write_error : Include file Include file modified in 10.3.22 binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint binlog_encryption.encrypted_master : MDEV-14201 - Extra warnings binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log binlog_encryption.encrypted_slave : MDEV-18135 - SSL error: key too small binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed +binlog_encryption.multisource : MDEV-21289 - Wrong error code binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash -binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result +binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result; include file modified in 10.3.22 +binlog_encryption.rpl_corruption : Include file modified in 10.3.22 binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start +binlog_encryption.rpl_incident : Include file modified in 10.3.22 +binlog_encryption.rpl_init_slave_errors : Include file modified in 10.3.22 binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include -binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include +binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include; include file modified in 10.3.22 +binlog_encryption.rpl_parallel_ignored_errors : Include file modified in 10.3.22 binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind -binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning +binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning; MDEV-20573 - Wrong result binlog_encryption.rpl_ssl : MDEV-14507 - Timeouts binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed binlog_encryption.rpl_sync : MDEV-13830 - Assertion failure @@ -327,43 +220,37 @@ #----------------------------------------------------------------------- -compat/oracle.column_compression : Modified in 10.3.17 -compat/oracle.keywords : Added in 10.3.17 -compat/oracle.mysqldump_restore : Added in 10.3.17 -compat/oracle.sp : Modified in 10.3.18 -compat/oracle.sp-package : Modified in 10.3.18 -compat/oracle.sp-package-mysqldump : Modified in 10.3.18 -compat/oracle.sp-package-security : Modified in 10.3.18 -compat/oracle.type_blob : Modified in 10.3.18 +compat/oracle.sp-goto : Modified in 10.3.22 +compat/oracle.sp-goto-debug : Added in 10.3.22 #----------------------------------------------------------------------- connect.alter : MDEV-18135 - SSL error: key too small connect.drop-open-error : MDEV-18135 - SSL error: key too small +connect.grant : Modified in 10.1.44 +connect.grant2 : Modified in 10.1.44 +connect.ini_grant : Modified in 10.1.44 connect.json : MDEV-18135 - SSL error: key too small +connect.mysql_grant : Modified in 10.1.44 connect.part_file : MDEV-18135 - SSL error: key too small connect.part_table : MDEV-18135 - SSL error: key too small connect.pivot : MDEV-14803 - Failed to discover table connect.secure_file_priv : MDEV-18135 - SSL error: key too small connect.vcol : MDEV-12374 - Fails on Windows +connect.xml2_grant : Include file modified in 10.1.44 +connect.xml_grant : Include file modified in 10.1.44 connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- -disks.disks_notembedded : Added in 10.3.17 - -#----------------------------------------------------------------------- - -encryption.create_or_replace : MDEV-12694 - Timeout; MDEV-16115 - Trying to access tablespace +encryption.create_or_replace : MDEV-16115 - Trying to access tablespace encryption.debug_key_management : MDEV-13841 - Timeout encryption.encrypt_and_grep : MDEV-13765 - Wrong result -encryption.file_creation : Added in 10.3.18 -encryption.innochecksum : MDEV-13644 - Assertion failure; modified in 10.3.17 +encryption.innochecksum : MDEV-13644 - Assertion failure encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect to local MySQL server through socket -encryption.innodb-checksum-algorithm : MDEV-12898 - Deadlock of threads; MDEV-16896 - Server crash encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate encryption.innodb-discard-import : MDEV-19113 - Timeout -encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout; modified in 10.3.17 +encryption.innodb-encryption-alter : MDEV-13566 - Lock wait timeout encryption.innodb-first-page-read : MDEV-14356 - Timeout in wait condition encryption.innodb-force-corrupt : MDEV-17286 - SSL error encryption.innodb-missing-key : MDEV-14728 - SSL error @@ -375,12 +262,13 @@ encryption.innodb-spatial-index : MDEV-13746 - Wrong result encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout encryption.innodb_encrypt_log : MDEV-13725 - Wrong result -encryption.innodb_encrypt_log_corruption : Configuration modified in 10.3.18 -encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result; added in 10.3.17 +encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash +encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result encryption.innodb_encryption : MDEV-15675 - Timeout encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result encryption.innodb_encryption_filekeys : MDEV-15673 - Timeout +encryption.innodb_encryption_is : MDEV-12898 - Server hang on startup encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash encryption.innodb_encryption_tables : MDEV-17339 - Crash on restart encryption.innodb_first_page : MDEV-10689 - Crash @@ -388,7 +276,6 @@ 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.tempfiles : Modified in 10.2.27 #----------------------------------------------------------------------- @@ -409,41 +296,14 @@ federated.federated_innodb : MDEV-10617 - Wrong checksum federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617 - Wrong checksum -federated.federatedx : MDEV-10617 - Wrong checksum -federated.federatedx_versioning : Modified in 10.3.18 +federated.federatedx : MDEV-10617 - Wrong checksum; modified in 10.3.21 #----------------------------------------------------------------------- -funcs_1.innodb_storedproc_07 : Include file modified in 10.3.18 -funcs_1.innodb_storedproc_08 : Include file modified in 10.3.18 -funcs_1.innodb_trig_03e : Modified in 10.3.18 -funcs_1.is_columns : Modified in 10.3.18 -funcs_1.is_columns_innodb : Modified in 10.3.18 -funcs_1.is_columns_memory : Modified in 10.3.18 -funcs_1.is_columns_myisam : Modified in 10.3.18 -funcs_1.is_routines : Include file modified in 10.3.18 -funcs_1.is_routines_embedded : Include file modified in 10.3.18 -funcs_1.is_schemata : Include file modified in 10.3.18 -funcs_1.is_schemata_embedded : Include file modified in 10.3.18 -funcs_1.is_schemata_is_mysql_test : Modified in 10.3.18 -funcs_1.is_tables : Include file modified in 10.3.18 -funcs_1.is_tables_embedded : Include file modified in 10.3.18 -funcs_1.is_tables_innodb : Include file modified in 10.3.18 -funcs_1.is_tables_memory : Include file modified in 10.3.18 -funcs_1.is_tables_myisam : Include file modified in 10.3.18 -funcs_1.is_tables_myisam_embedded : Include file modified in 10.3.18 -funcs_1.is_triggers : Include file modified in 10.3.18 -funcs_1.is_triggers_embedded : Include file modified in 10.3.18 -funcs_1.memory_storedproc_07 : Include file modified in 10.3.18 -funcs_1.memory_storedproc_08 : Include file modified in 10.3.18 -funcs_1.memory_trig_03e : Modified in 10.3.18 -funcs_1.memory_views : MDEV-11773 - timeout -funcs_1.myisam_storedproc_07 : Include file modified in 10.3.18 -funcs_1.myisam_storedproc_08 : Include file modified in 10.3.18 -funcs_1.myisam_trig_03e : Modified in 10.3.18 -funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result -funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan -funcs_1.storedproc : Modified in 10.3.18 +funcs_1.is_check_constraints : Modified in 10.3.22 +funcs_1.memory_views : MDEV-11773 - timeout +funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result +funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan #----------------------------------------------------------------------- @@ -452,8 +312,7 @@ #----------------------------------------------------------------------- -funcs_2/charset.* : MDEV-10999 - Not maintained -funcs_2/charset.charset_master : Modified in 10.3.18 +funcs_2/charset.* : MDEV-10999 - Not maintained #----------------------------------------------------------------------- @@ -466,184 +325,156 @@ #----------------------------------------------------------------------- gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' -gcol.gcol_select_innodb : Include file modified in 10.2.27 -gcol.gcol_select_myisam : Include file modified in 10.2.27 -gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion; modified in 10.3.18 +gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure -gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result +gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.3.22 gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure -gcol.innodb_virtual_index : Modified in 10.3.18 -gcol.innodb_virtual_purge : Modified in 10.2.25 #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result -innodb.alter_copy : MDEV-16181 - Assertion failure; modified in 10.3.18 +innodb.alter_copy : MDEV-16181 - Assertion failure innodb.alter_crash : MDEV-16944 - The process cannot access the file -innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out; added in 10.3.17 -innodb.alter_missing_tablespace : Modified in 10.3.17 -innodb.auto_increment_dup : Modified in 10.3.18 +innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start -innodb.blob-crash : Added in 10.3.17 -innodb.check_ibd_filesize : Added in 10.3.17 -innodb.create_select : Added in 10.3.17 +innodb.blob-crash : MDEV-20481 - Crash during recovery +innodb.blob-update-debug : Modified in 10.3.22 innodb.doublewrite : MDEV-12905 - Server crash -innodb.foreign-keys : Modified in 10.3.18 -innodb.foreign_key : Modified in 10.3.18 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure -innodb.ibuf_not_empty : MDEV-19021 - Wrong result -innodb.innodb-16k : Modified in 10.3.17 -innodb.innodb-32k : Modified in 10.3.17 -innodb.innodb-32k-crash : MDEV-16953 - Corrupt log record found; MDEV-20194 - Extra warning; modified in 10.3.17 -innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.3.17 -innodb.innodb-alter : Modified in 10.3.18 +innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.3.21 +innodb.innodb-32k-crash : MDEV-20194 - Extra warning; modified in 10.3.21 +innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.3.21 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS innodb.innodb-alter-table : MDEV-10619 - Testcase timeout -innodb.innodb-alter-tempfile : MDEV-15285 - Table already exists -innodb.innodb-autoinc : Modified in 10.3.17 innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown -innodb.innodb-fkcheck : Modified in 10.3.18 -innodb.innodb-get-fk : MDEV-13276 - Server crash; modified in 10.3.18 +innodb.innodb-get-fk : MDEV-13276 - Server crash innodb.innodb-index-online : MDEV-14809 - Cannot save statistics -innodb.innodb-mdev7046 : Modified in 10.3.18 +innodb.innodb-mdev-7513 : Modified in 10.3.21 innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_snappy : MDEV-13644 - Assertion failure innodb.innodb-page_compression_tables : MDEV-13644 - Assertion failure innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem -innodb.innodb-read-view : Added in 10.3.18 -innodb.innodb-system-table-view : Modified in 10.3.18 +innodb.innodb-replace-debug : Modified in 10.3.22 +innodb.innodb-stats-initialize-failure : Modified in 10.3.22 innodb.innodb-table-online : MDEV-13894 - Wrong result -innodb.innodb-virtual-columns-debug : MDEV-20143 - Wrong result; added in 10.3.17 innodb.innodb-wl5522 : MDEV-13644 - Assertion failure -innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.3.18 -innodb.innodb-wl5980-debug : Added in 10.3.17 -innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc; added in 10.3.17 +innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno +innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure +innodb.innodb_bug11754376 : Modified in 10.3.22 innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt -innodb.innodb_bug14704286 : Deleted in 10.3.18 +innodb.innodb_bug30113362 : Added in 10.3.22 innodb.innodb_bug30423 : MDEV-7311 - Wrong result innodb.innodb_bug47167 : MDEV-20524 - Table 'user' is marked as crashed and should be repaired innodb.innodb_bug48024 : MDEV-14352 - Assertion failure +innodb.innodb_bug56947 : Modified in 10.3.22 innodb.innodb_bug59641 : MDEV-13830 - Assertion failure -innodb.innodb_bug68148 : Modified in 10.3.18 -innodb.innodb_bug84958 : Added in 10.3.18 -innodb.innodb_bulk_create_index_debug : Include file modified in 10.3.18 -innodb.innodb_bulk_create_index_flush : Configuration added in 10.3.18 innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start +innodb.innodb_corrupt_bit : Modified in 10.3.22 innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full innodb.innodb_information_schema : MDEV-8851 - Wrong result -innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.3.17 -innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.3.17 +innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.3.21 +innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.3.21 innodb.innodb_monitor : MDEV-10939 - Testcase timeout -innodb.innodb_mysql : MDEV-19873 - Wrong result; modified in 10.3.17 +innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison innodb.innodb_stats : MDEV-10682 - wrong result -innodb.innodb_stats_persistent : MDEV-17745 - Wrong result +innodb.innodb_stats_persistent : MDEV-17745 - Wrong result; MDEV-21567 - Wrong result in execution plan innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed -innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait +innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait; modified in 10.3.22 +innodb.innodb_wl6326 : Added in 10.3.22 +innodb.innodb_wl6326_big : Added in 10.3.22 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.instant_alter : Modified in 10.3.18 -innodb.instant_alter_bugs : Modified in 10.3.17 -innodb.instant_alter_debug : Modified in 10.3.17 -innodb.log_alter_table : Configuration added in 10.3.18 +innodb.instant_alter : Modified in 10.3.21 +innodb.instant_alter_debug : Modified in 10.3.21 +innodb.leaf_page_corrupted_during_recovery : MDEV-21572 - Server crash innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start innodb.log_file_name : MDEV-14193 - Exception innodb.log_file_size : MDEV-15668 - Not found pattern -innodb.max_record_size : Added in 10.3.17 -innodb.missing_tablespaces : Added in 10.3.17 innodb.monitor : MDEV-16179 - Wrong result -innodb.page_id_innochecksum : Added in 10.3.17 -innodb.purge : Added in 10.3.17 innodb.purge_secondary : MDEV-15681 - Wrong result -innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out; added in 10.3.17 +innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash -innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile; modified in 10.3.18 +innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile +innodb.redo_log_during_checkpoint : Modified in 10.3.22 innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace -innodb.strict_mode : Modified in 10.3.17 +innodb.row_size_error_log_warnings_3 : Modified in 10.3.22 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start -innodb.temp_table_savepoint : MDEV-16182 - Wrong result innodb.temporary_table : MDEV-13265 - Wrong result -innodb.temporary_table_optimization : MDEV-20531 - Wrong result -innodb.truncate_missing : Modified in 10.3.17 -innodb.trx_id_future : Modified in 10.3.18 -innodb.undo_log : Modified in 10.3.17 -innodb.undo_truncate : MDEV-17340 - Server hung -innodb.undo_truncate_recover : MDEV-17679 - Server has gone away; modified in 10.3.18 +innodb.truncate_inject : Modified in 10.2.31 +innodb.undo_log : Modified in 10.3.21 +innodb.undo_truncate : MDEV-17340 - Server hung; MDEV-20840 - Sporadic timeout +innodb.undo_truncate_recover : MDEV-17679 - Server has gone away innodb.update_time : MDEV-14804 - Wrong result innodb.xa_recovery : MDEV-15279 - mysqld got exception #----------------------------------------------------------------------- -innodb_fts.fulltext2 : Modified in 10.3.17 -innodb_fts.fulltext_table_evict : Modified in 10.3.18 -innodb_fts.innodb_fts_misc : Modified in 10.3.18 +innodb_fts.concurrent_insert : Modified in 10.3.22 +innodb_fts.innodb_fts_misc : Modified in 10.3.21 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed innodb_fts.sync : MDEV-14808 - Wrong result +innodb_fts.sync_block : Modified in 10.3.22 innodb_fts.sync_ddl : MDEV-18654 - Assertion failure #----------------------------------------------------------------------- innodb_gis.alter_spatial_index : MDEV-13745 - Server crash -innodb_gis.kill_server : MDEV-16941 - Checksum mismatch -innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result; modified in 10.3.18 +innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded +innodb_gis.rtree_debug : Modified in 10.3.22 innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check +innodb_gis.rtree_rollback1 : Modified in 10.3.22 +innodb_gis.rtree_rollback2 : Modified in 10.3.22 innodb_gis.rtree_split : MDEV-14208 - Too many arguments innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed -innodb_gis.update_root : Modified in 10.3.18 #----------------------------------------------------------------------- -innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed -innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings -innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.3.18 -innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure -innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket -innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 +innodb_zip.bug53591 : Modified in 10.3.21 +innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.3.22 +innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings +innodb_zip.prefix_index_liftedlimit : Modified in 10.3.21 +innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2 +innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure +innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket +innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 #----------------------------------------------------------------------- -maria.alter : Modified in 10.3.17 -maria.icp : Modified in 10.3.18 -maria.insert_select : MDEV-12757 - Timeout -maria.insert_select-7314 : MDEV-16492 - Timeout -maria.kill : Added in 10.3.17 -maria.maria : MDEV-14430 - Extra warning -maria.maria-big : Modified in 10.3.18 -maria.maria-gis-recovery : Modified in 10.3.18 -maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start; modified in 10.3.18 -maria.maria-recover : Modified in 10.3.18 -maria.maria-recovery : Modified in 10.3.18 -maria.maria3 : Modified in 10.3.18 -maria.partition : Added in 10.3.18 -maria.temporary : Added in 10.3.17 +maria.aria_pack_mdev14183 : Added in 10.3.22 +maria.insert_select : MDEV-12757 - Timeout +maria.insert_select-7314 : MDEV-16492 - Timeout +maria.maria : MDEV-14430 - Extra warning +maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start #----------------------------------------------------------------------- mariabackup.absolute_ibdata_paths : MDEV-16571 - Wrong result mariabackup.apply-log-only : MDEV-20135 - Timeout -mariabackup.big_innodb_log : Added in 10.3.18 mariabackup.data_directory : MDEV-15270 - Error on exec mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future; MDEV-18569 - Table doesn't exist +mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure; modified in 10.3.21 mariabackup.incremental_encrypted : MDEV-15667 - timeout +mariabackup.incremental_rocksdb : MDEV-20954 - Cannot access the file +mariabackup.innodb_redo_log_overwrite : Added in 10.3.22 mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result mariabackup.mdev-14447 : MDEV-15201 - Timeout -mariabackup.missing_ibd : Modified in 10.3.17 mariabackup.partial_exclude : MDEV-15270 - Error on exec mariabackup.unencrypted_page_compressed : MDEV-18653 - Wrong error mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault @@ -670,8 +501,9 @@ #----------------------------------------------------------------------- multi_source.gtid : MDEV-14202 - Crash -multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - wrong result -multi_source.mdev-8874 : Re-enabled in 10.3.18; added in 10.3.17 +multi_source.info_logs : MDEV-12629 - Valgrind, MDEV-10042 - wrong result; MDEV-21290 - Wrong result +multi_source.load_data : MDEV-21235 - Slave crash +multi_source.mdev-8874 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.mdev-9544 : MDEV-19415 - AddressSanitizer: heap-use-after-free multi_source.multisource : MDEV-10417 - Fails on Mips multi_source.reset_slave : MDEV-10690 - Wrong result @@ -680,32 +512,27 @@ #----------------------------------------------------------------------- -parts.fulltext : Added in 10.3.17 +optimizer_unfixed_bugs.bug36981 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug40992 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug41996 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug42991 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug43249 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug43360 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug43448 : Modified in 10.3.22 +optimizer_unfixed_bugs.bug43617 : Modified in 10.3.22 + +#----------------------------------------------------------------------- + parts.partition_alter1_1_2_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_1_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter1_2_innodb : MDEV-18655 - ASAN unknown crash parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query parts.partition_auto_increment_archive : MDEV-16491 - Marked as crashed and should be repaired parts.partition_auto_increment_maria : MDEV-14430 - Extra warning -parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist +parts.partition_debug : Modified in 10.3.22 +parts.partition_debug_innodb : MDEV-10891 - Can't create UNIX socket; MDEV-15095 - Table doesn't exist; modified in 10.3.22 parts.partition_exch_qa_10 : MDEV-11765 - wrong result -parts.partition_exch_qa_4_innodb : Include file modified in 10.3.18 -parts.partition_exch_qa_4_myisam : Include file modified in 10.3.18 -parts.partition_exch_qa_8_innodb : Include file modified in 10.3.18 -parts.partition_exch_qa_8_myisam : Include file modified in 10.3.18 parts.partition_innodb_status_file : MDEV-12901 - Valgrind -parts.partition_mgm_lc0_archive : Include file modified in 10.3.18 -parts.partition_mgm_lc0_innodb : Include file modified in 10.3.18 -parts.partition_mgm_lc0_memory : Include file modified in 10.3.18 -parts.partition_mgm_lc0_myisam : Include file modified in 10.3.18 -parts.partition_mgm_lc1_archive : Include file modified in 10.3.18 -parts.partition_mgm_lc1_innodb : Include file modified in 10.3.18 -parts.partition_mgm_lc1_memory : Include file modified in 10.3.18 -parts.partition_mgm_lc1_myisam : Include file modified in 10.3.18 -parts.partition_mgm_lc2_archive : Include file modified in 10.3.18 -parts.partition_mgm_lc2_innodb : Include file modified in 10.3.18 -parts.partition_mgm_lc2_memory : Include file modified in 10.3.18 -parts.partition_mgm_lc2_myisam : Include file modified in 10.3.18 parts.partition_special_innodb : MDEV-16942 - Timeout #----------------------------------------------------------------------- @@ -719,34 +546,53 @@ perfschema.dml_threads : MDEV-17746 - Wrong errno perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x -perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash -perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash; configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_again_deny : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash; configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_bad_deny : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_good_allow : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_good_deny : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_noname_allow : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_addrinfo_noname_deny : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_auth_plugin : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_blocked : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_max_con : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_nameinfo_again_allow : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_nameinfo_again_deny : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_nameinfo_noname_allow : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_nameinfo_noname_deny : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_passwd : Configuration modified in 10.3.18 -perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; configuration modified in 10.3.18 +perfschema.hostcache_ipv4_addrinfo_again_allow : MDEV-12759 - Crash; modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_again_deny : Modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_bad_allow : Modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_bad_deny : Modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_good_allow : Modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_good_deny : Modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_noname_allow : Modified in 10.3.22 +perfschema.hostcache_ipv4_addrinfo_noname_deny : Modified in 10.3.22 +perfschema.hostcache_ipv4_auth_plugin : Modified in 10.3.22 +perfschema.hostcache_ipv4_blocked : Modified in 10.3.22 +perfschema.hostcache_ipv4_format : Modified in 10.3.22 +perfschema.hostcache_ipv4_max_con : Modified in 10.3.22 +perfschema.hostcache_ipv4_nameinfo_again_allow : Modified in 10.3.22 +perfschema.hostcache_ipv4_nameinfo_again_deny : Modified in 10.3.22 +perfschema.hostcache_ipv4_nameinfo_noname_allow : Modified in 10.3.22 +perfschema.hostcache_ipv4_nameinfo_noname_deny : Modified in 10.3.22 +perfschema.hostcache_ipv4_passwd : Modified in 10.3.22 +perfschema.hostcache_ipv4_ssl : Modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_again_allow : MDEV-12752 - Crash; modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_again_deny : Modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_bad_allow : MDEV-13260 - Crash; modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_bad_deny : Modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_good_allow : Modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_good_deny : Modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_noname_allow : Modified in 10.3.22 +perfschema.hostcache_ipv6_addrinfo_noname_deny : Modified in 10.3.22 +perfschema.hostcache_ipv6_auth_plugin : Modified in 10.3.22 +perfschema.hostcache_ipv6_blocked : Modified in 10.3.22 +perfschema.hostcache_ipv6_max_con : Modified in 10.3.22 +perfschema.hostcache_ipv6_nameinfo_again_allow : Modified in 10.3.22 +perfschema.hostcache_ipv6_nameinfo_again_deny : Modified in 10.3.22 +perfschema.hostcache_ipv6_nameinfo_noname_allow : Modified in 10.3.22 +perfschema.hostcache_ipv6_nameinfo_noname_deny : Modified in 10.3.22 +perfschema.hostcache_ipv6_passwd : Modified in 10.3.22 +perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; modified in 10.3.22 +perfschema.hostcache_peer_addr : MDEV-21462 - Test condition timeout; modified in 10.3.22 +perfschema.misc : Modified in 10.3.21 perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.relaylog : MDEV-18134 - Wrong result perfschema.rpl_gtid_func : MDEV-16897 - Wrong result perfschema.socket_instances_func : MDEV-20140 - Wrong result perfschema.socket_summary_by_event_name_func : MDEV-10622 - Wrong result perfschema.socket_summary_by_instance_func : MDEV-19413 - Wrong result -perfschema.stage_mdl_function : Include file modified in 10.3.18 -perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders; include file modified in 10.3.18 -perfschema.stage_mdl_procedure : MDEV-11545 - Missing row; include file modified in 10.3.18 -perfschema.stage_mdl_table : MDEV-12638 - Wrong result; include file modified in 10.3.18 +perfschema.stage_mdl_global : MDEV-11803 - wrong result on slow builders +perfschema.stage_mdl_procedure : MDEV-11545 - Missing row +perfschema.stage_mdl_table : MDEV-12638 - Wrong result +perfschema.start_server_low_digest : MDEV-21221 - Wrong result perfschema.threads_mysql : MDEV-10677 - Wrong result #----------------------------------------------------------------------- @@ -755,11 +601,9 @@ #----------------------------------------------------------------------- -plugins.feedback_plugin_load : Modified in 10.3.18 plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.processlist : MDEV-16574 - Wrong result -plugins.qc_info : Modified in 10.3.18 -plugins.server_audit : MDEV-14295 - Wrong result +plugins.server_audit : MDEV-14295 - Wrong result; modified in 10.3.21 plugins.thread_pool_server_audit : MDEV-14295 - Wrong result #----------------------------------------------------------------------- @@ -783,9 +627,7 @@ rocksdb.rocksdb_cf_options : MDEV-16639 - Server crash rocksdb.rocksdb_cf_per_partition : MDEV-16636 - Wrong result rocksdb.rocksdb_parts : MDEV-13843 - Wrong result -rocksdb.ttl_primary_read_filtering : MDEV-16560 - Wrong result rocksdb.ttl_secondary : MDEV-16943 - Timeout -rocksdb.ttl_secondary_read_filtering : MDEV-16560 - Wrong result rocksdb.unique_check : MDEV-16576 - Wrong errno rocksdb.use_direct_reads_writes : MDEV-16646 - Server crash rocksdb.write_sync : MDEV-16965 - WRong result @@ -801,127 +643,130 @@ #----------------------------------------------------------------------- -roles.acl_statistics : Configuration added in 10.3.18 -roles.create_and_grant_role : MDEV-11772 - wrong result -roles.definer : Modified in 10.3.18 -roles.show_create_database-10463 : Modified in 10.3.18 - -#----------------------------------------------------------------------- - -rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free -rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server -rpl.create_or_replace_mix : Include file modified in 10.3.17 -rpl.create_or_replace_row : Include file modified in 10.3.17 -rpl.create_or_replace_statement : Include file modified in 10.3.17 -rpl.create_select : MDEV-14121 - Assertion failure -rpl.kill_race_condition : Modified in 10.3.17 -rpl.last_insert_id : MDEV-10625 - warnings in error log -rpl.mdev_17588 : Modified in 10.3.18 -rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips -rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips -rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log -rpl.rpl_binlog_errors : MDEV-12742 - Crash -rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master -rpl.rpl_colSize : MDEV-16112 - Server crash -rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code -rpl.rpl_create_or_replace_fail : Added in 10.3.18 -rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac -rpl.rpl_ddl : MDEV-10417 - Fails on Mips -rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash -rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed -rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed -rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start -rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning -rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning -rpl.rpl_failed_drop_tbl_binlog : Added in 10.3.18 -rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output -rpl.rpl_gtid_basic : MDEV-10681 - server startup problem -rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection -rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout -rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash -rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings -rpl.rpl_gtid_reconnect : MDEV-14497 - Crash -rpl.rpl_gtid_startpos : MDEV-20141 - mysqltest failed but provided no output -rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings -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_id : MDEV-15197 - Wrong result -rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure -rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query -rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips -rpl.rpl_ipv4_as_ipv6 : MDEV-20147 - Incorrect checksum for freed object -rpl.rpl_known_bugs_detection : Modified in 10.2.27 -rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog -rpl.rpl_mdev12179 : MDEV-19043 - Table marked as crashed -rpl.rpl_mdev6020 : MDEV-15272 - Server crash -rpl.rpl_mdev_17614 : Added in 10.3.18 -rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait -rpl.rpl_non_direct_stm_mixing_engines : MDEV-14489 - Failed sync_slave_with_master -rpl.rpl_parallel : MDEV-10653 - Timeouts -rpl.rpl_parallel2 : MDEV-17390 - Operation cannot be performed -rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash -rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure -rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout -rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master -rpl.rpl_parallel_optimistic_nobinlog : MDEV-15278 - Failed to sync with master -rpl.rpl_parallel_retry : MDEV-11119 - Crash; MDEV-17109 - Timeout -rpl.rpl_parallel_temptable : MDEV-10356 - Crash; MDEV-19076 - Wrong result -rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips -rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings -rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails -rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start -rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result -rpl.rpl_row_drop_temp_table : Added in 10.3.17 -rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed -rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_index_choice : MDEV-15196 - Slave crash -rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_row_type_conv_err_msg : Added in 10.3.18 -rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum -rpl.rpl_semi_sync : MDEV-11220 - Wrong result -rpl.rpl_semi_sync_after_sync : MDEV-14366 - 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 - Assorted failures -rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition -rpl.rpl_semisync_ali_issues : MDEV-16272 - Wrong result -rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning -rpl.rpl_show_slave_hosts : MDEV-10681 - Crash -rpl.rpl_skip_replication : MDEV-13258 - Extra warning -rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock -rpl.rpl_slave_load_tmpdir_not_exist : MDEV-14203 - Extra warning -rpl.rpl_slow_query_log : MDEV-13250 - Test abort -rpl.rpl_sp_effects : MDEV-13249 - Crash -rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout -rpl.rpl_stm_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master -rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion -rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash -rpl.rpl_sync : MDEV-13830 - Assertion failure -rpl.rpl_sync_with_innodb_thd_conc : Added in 10.3.18 -rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master -rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries -rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output -rpl.rpl_trigger : MDEV-18055 - Wrong result -rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error -rpl.rpl_user_variables : MDEV-20522 - Wrong result -rpl.rpl_variables : MDEV-20150 - Server crash -rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result -rpl.show_status_stop_slave_race-7126 : MDEV-17438 - Timeout - -#----------------------------------------------------------------------- - -rpl-tokudb.* : MDEV-14354 - Tests fail with tcmalloc -rpl-tokudb.rpl_deadlock_tokudb : MDEV-20529 - mysqltest failed but provided no output -rpl-tokudb.rpl_tokudb_commit_after_flush : MDEV-16966 - Server crash -rpl-tokudb.rpl_tokudb_row_crash_safe : Deleted in 10.2.27 -rpl-tokudb.rpl_tokudb_stm_mixed_crash_safe : Deleted in 10.2.27 +roles.create_and_grant_role : MDEV-11772 - wrong result + +#----------------------------------------------------------------------- + +rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free; modified in 10.3.22 +rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server +rpl.create_or_replace_mix : MDEV-20523 - Wrong result +rpl.create_or_replace_statement : MDEV-20523 - Wrong result +rpl.create_select : MDEV-14121 - Assertion failure +rpl.kill_race_condition : Modified in 10.3.22 +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 +rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log +rpl.rpl_binlog_errors : MDEV-12742 - Crash +rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master +rpl.rpl_binlog_rollback_cleanup : Added in 10.3.22 +rpl.rpl_bug33931 : Modified in 10.3.22 +rpl.rpl_bug41902 : Modified in 10.3.22 +rpl.rpl_checksum : Include file modified in 10.2.31 +rpl.rpl_colSize : MDEV-16112 - Server crash +rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code +rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac +rpl.rpl_ddl : MDEV-10417 - Fails on Mips +rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash; modified in 10.3.22 +rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed; modified in 10.3.22 +rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed +rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start +rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning +rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning +rpl.rpl_flushlog_loop : MDEV-21570 - Server crash +rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output +rpl.rpl_get_master_version_and_clock : Modified in 10.3.22 +rpl.rpl_gtid_basic : MDEV-10681 - server startup problem +rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection +rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout +rpl.rpl_gtid_errorhandling : MDEV-13261 - Crash +rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings +rpl.rpl_gtid_reconnect : MDEV-14497 - Crash; modified in 10.3.22 +rpl.rpl_gtid_startpos : MDEV-20141 - mysqltest failed but provided no output +rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings +rpl.rpl_gtid_until : MDEV-10625 - warnings in error log +rpl.rpl_heartbeat_debug : Modified in 10.3.22 +rpl.rpl_incident : Include file modified in 10.2.31 +rpl.rpl_init_slave_errors : Include file modified in 10.2.31 +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_id : MDEV-15197 - Wrong result +rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure +rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query +rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips +rpl.rpl_ipv4_as_ipv6 : MDEV-20147 - Incorrect checksum for freed object +rpl.rpl_mariadb_slave_capability : MDEV-11018 - Extra lines in binlog; modified in 10.3.22 +rpl.rpl_mdev12179 : MDEV-19043 - Table marked as crashed +rpl.rpl_mdev6020 : MDEV-15272 - Server crash +rpl.rpl_mixed_mixing_engines : MDEV-21266 - Timeout +rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master_pos_wait +rpl.rpl_parallel : MDEV-10653 - Timeouts +rpl.rpl_parallel2 : MDEV-17390 - Operation cannot be performed +rpl.rpl_parallel_conflicts : MDEV-15272 - Server crash +rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure +rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout +rpl.rpl_parallel_optimistic : MDEV-15278 - Failed to sync with master; modified in 10.3.22 +rpl.rpl_parallel_optimistic_nobinlog : MDEV-15278 - Failed to sync with master +rpl.rpl_parallel_retry : MDEV-11119 - Crash; MDEV-17109 - Timeout +rpl.rpl_parallel_temptable : MDEV-10356 - Crash; MDEV-19076 - Wrong result +rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips +rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings +rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails +rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start +rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_big_table_id : Modified in 10.3.22 +rpl.rpl_row_corruption : MDEV-21569 - mutex: LOCK_global_system_variables unlocking +rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result +rpl.rpl_row_end_of_statement_loss : MDEV-21237 - Server crash +rpl.rpl_row_find_row_debug : Modified in 10.3.22 +rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_img_eng_min : MDEV-13875 - diff_files failed +rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_index_choice : MDEV-15196 - Slave crash; modified in 10.3.22 +rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_row_until : MDEV-14052 - Master will not send events with checksum +rpl.rpl_semi_sync : MDEV-11220 - Wrong result +rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result +rpl.rpl_semi_sync_after_sync_row : MDEV-21031 - Wrong result; MDEV-14366 - Wrong result +rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings +rpl.rpl_semi_sync_gtid_reconnect : Added in 10.3.21 +rpl.rpl_semi_sync_skip_repl : Modified in 10.3.22 +rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures +rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition +rpl.rpl_semisync_ali_issues : MDEV-16272 - Wrong result +rpl.rpl_set_statement_default_master : MDEV-13258 - Extra warning +rpl.rpl_show_slave_hosts : MDEV-10681 - Crash +rpl.rpl_show_slave_running : Modified in 10.3.22 +rpl.rpl_skip_replication : MDEV-13258 - Extra warning +rpl.rpl_slave_grp_exec : MDEV-10514 - Deadlock +rpl.rpl_slave_load_remove_tmpfile : Modified in 10.3.22 +rpl.rpl_slave_load_tmpdir_not_exist : MDEV-14203 - Extra warning +rpl.rpl_slow_query_log : MDEV-13250 - Test abort +rpl.rpl_sp_effects : MDEV-13249 - Crash +rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout +rpl.rpl_stm_lcase_tblnames : Modified in 10.3.22 +rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master +rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion +rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash; include file modified in 10.3.22 +rpl.rpl_stop_slave : Modified in 10.3.22 +rpl.rpl_sync : MDEV-13830 - Assertion failure +rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master +rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries +rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output +rpl.rpl_trigger : MDEV-18055 - Wrong result +rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error +rpl.rpl_user_variables : MDEV-20522 - Wrong result +rpl.rpl_variables : MDEV-20150 - Server crash +rpl.rpl_view_debug : Modified in 10.3.22 +rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result +rpl.show_status_stop_slave_race-7126 : MDEV-17438 - Timeout + +#----------------------------------------------------------------------- + +rpl-tokudb.* : MDEV-14354 - Tests fail with tcmalloc +rpl-tokudb.rpl_deadlock_tokudb : MDEV-20529 - mysqltest failed but provided no output +rpl-tokudb.rpl_tokudb_commit_after_flush : MDEV-16966 - Server crash #----------------------------------------------------------------------- @@ -935,8 +780,9 @@ #----------------------------------------------------------------------- -spider.* : MDEV-9329, MDEV-18737 - tests are too memory-consuming -spider.basic_sql : MDEV-11186 - Internal check fails +spider.* : MDEV-9329, MDEV-18737 - tests are too memory-consuming +spider.basic_sql : MDEV-11186 - Internal check fails +spider.pushdown_not_like : Added in 10.3.21 #----------------------------------------------------------------------- @@ -957,6 +803,8 @@ #----------------------------------------------------------------------- sql_sequence.concurrent_create : MDEV-16635 - Server crash +sql_sequence.rebuild : Added in 10.3.21 +sql_sequence.view : Modified in 10.3.21 #----------------------------------------------------------------------- @@ -968,50 +816,17 @@ #----------------------------------------------------------------------- -sys_vars.aria_recover_options_basic : Modified in 10.3.18 sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x -sys_vars.binlog_cache_size_basic : Modified in 10.3.18 -sys_vars.binlog_stmt_cache_size_basic : Modified in 10.3.18 -sys_vars.character_set_client_basic : Modified in 10.3.18 -sys_vars.character_set_connection_basic : Modified in 10.3.18 -sys_vars.character_set_database_basic : Modified in 10.3.18 -sys_vars.character_set_results_basic : Modified in 10.3.18 -sys_vars.character_set_server_basic : Modified in 10.3.18 -sys_vars.character_set_server_func : Modified in 10.3.18 -sys_vars.collation_connection_basic : Modified in 10.3.18 -sys_vars.collation_database_basic : Modified in 10.3.18 -sys_vars.collation_server_basic : Modified in 10.3.18 -sys_vars.expire_logs_days_basic : Modified in 10.2.27 -sys_vars.histogram_size_basic : Modified in 10.2.27 +sys_vars.debug_dbug_func : Modified in 10.3.22 sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error -sys_vars.innodb_ft_result_cache_limit : Modified in 10.2.26 -sys_vars.innodb_max_dirty_pages_pct_basic : Modified in 10.3.18 -sys_vars.innodb_max_dirty_pages_pct_lwm_basic : Modified in 10.3.18 -sys_vars.innodb_read_io_threads_basic : Configuration added in 10.3.18 -sys_vars.innodb_write_io_threads_basic : Configuration added in 10.3.18 +sys_vars.innodb_buffer_pool_size_basic : Modified in 10.3.22 +sys_vars.innodb_checksum_algorithm_basic : MDEV-21568 - Errno: 2000 sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash -sys_vars.log_slow_verbosity_basic : Modified in 10.3.18 -sys_vars.max_connect_errors_basic : Modified in 10.2.27 -sys_vars.max_connections_basic : Modified in 10.3.18 -sys_vars.max_heap_table_size_basic : Modified in 10.2.27 -sys_vars.max_seeks_for_key_func : Modified in 10.3.18 -sys_vars.myisam_recover_options_basic : Configuration added in 10.3.18 -sys_vars.myisam_sort_buffer_size_basic : Modified in 10.3.18 -sys_vars.optimizer_switch_basic : Modified in 10.3.18 -sys_vars.optimizer_use_condition_selectivity_basic : Modified in 10.3.18 -sys_vars.replicate_ignore_table_basic : Modified in 10.3.18 sys_vars.rpl_init_slave_func : MDEV-10149 - Test assertion sys_vars.slow_query_log_func : MDEV-14273 - Wrong result -sys_vars.sync_binlog_basic : Modified in 10.3.18 -sys_vars.sysvars_debug : Modified in 10.3.18 -sys_vars.sysvars_innodb : Modified in 10.3.18 -sys_vars.sysvars_server_embedded : Include file modified in 10.3.18 -sys_vars.sysvars_server_notembedded : Include file modified in 10.3.18 sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result -sys_vars.userstat_basic : Modified in 10.3.18 sys_vars.wait_timeout_func : MDEV-12896 - Wrong result -sys_vars.wsrep_provider_basic : MDEV-19457 - Assertion failure #----------------------------------------------------------------------- @@ -1019,10 +834,6 @@ tokudb.change_column_bin : MDEV-12640 - Lost connection tokudb.change_column_char : MDEV-12822 - Lost connection tokudb.change_column_varbin : MDEV-17682 - Timeout -tokudb.cluster_2968-0 : Modified in 10.3.18 -tokudb.cluster_2968-1 : Modified in 10.3.18 -tokudb.cluster_2968-2 : Modified in 10.3.18 -tokudb.cluster_2968-3 : Modified in 10.3.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 @@ -1040,7 +851,6 @@ tokudb.rows-32m-seq-insert : MDEV-12640 - Crash tokudb.savepoint-5 : MDEV-15280 - Wrong result tokudb.type_datetime : MDEV-15193 - Wrong result -tokudb.type_varchar : Modified in 10.3.18 #----------------------------------------------------------------------- @@ -1058,17 +868,10 @@ tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind tokudb_bugs.frm_store3 : MDEV-12823 - Valgrind tokudb_bugs.xa : MDEV-11804 - Lock wait timeout -tokudb_bugs.xa-3 : MDEV-16953 - Corrupt log record found #----------------------------------------------------------------------- -tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection -tokudb_parts.partition_exch_qa_4_tokudb : Include file modified in 10.3.18 -tokudb_parts.partition_exch_qa_8_tokudb : Include file modified in 10.3.18 -tokudb_parts.partition_mgm_lc0_tokudb : Include file modified in 10.3.18 -tokudb_parts.partition_mgm_lc10_tokudb : Include file modified in 10.3.18 -tokudb_parts.partition_mgm_lc1_tokudb : Include file modified in 10.3.18 -tokudb_parts.partition_mgm_lc2_tokudb : Include file modified in 10.3.18 +tokudb_parts.partition_alter4_tokudb : MDEV-12640 - Lost connection #----------------------------------------------------------------------- @@ -1088,55 +891,36 @@ unit.ma_pagecache_consist_64kRD : MDEV-19367 - AddressSanitizer CHECK failed unit.ma_pagecache_consist_64kWR : MDEV-19367 - AddressSanitizer CHECK failed unit.ma_test_loghandler : MDEV-10638 - record read not ok +unit.mf_iocache : MDEV-20952 - ASAN stack-buffer-overflow #----------------------------------------------------------------------- -vcol.cross_db : Modified in 10.3.18 -vcol.not_supported : MDEV-10639 - Testcase timeout -vcol.update : Modified in 10.3.18 -vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout -vcol.vcol_misc : MDEV-16651 - Wrong error message; modified in 10.3.17 -vcol.vcol_select_innodb : Modified in 10.3.18 -vcol.vcol_select_myisam : Modified in 10.3.18 -vcol.vcol_sql_mode : Added in 10.3.18 -vcol.vcol_sql_mode_upgrade : Added in 10.3.18 -vcol.vcol_trigger_sp_innodb : Include file modified in 10.3.18 -vcol.vcol_trigger_sp_myisam : Include file modified in 10.3.18 +vcol.not_supported : MDEV-10639 - Testcase timeout +vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout +vcol.vcol_misc : MDEV-16651 - Wrong error message #----------------------------------------------------------------------- -versioning.alter : Modified in 10.3.18 -versioning.auto_increment : Include file modified in 10.3.18 -versioning.commit_id : Include file modified in 10.3.18 -versioning.create : Modified in 10.3.18 -versioning.cte : Modified in 10.3.18 -versioning.delete : Modified in 10.3.18 -versioning.derived : Modified in 10.3.18 -versioning.foreign : Modified in 10.3.18 -versioning.insert : Include file modified in 10.3.18 -versioning.online : Modified in 10.3.18 -versioning.partition : Modified in 10.3.18 -versioning.partition_innodb : Modified in 10.3.18 -versioning.replace : Modified in 10.3.18 -versioning.select : Modified in 10.3.18 -versioning.select2 : Include file modified in 10.3.18 -versioning.simple : Modified in 10.3.17 -versioning.truncate : Modified in 10.3.18 -versioning.trx_id : Modified in 10.3.18 -versioning.update : Include file modified in 10.3.18 -versioning.update-big : Modified in 10.3.18 -versioning.view : Modified in 10.3.18 +versioning.delete : Modified in 10.3.21 +versioning.partition : Modified in 10.3.21 +versioning.select : Modified in 10.3.21 +versioning.trx_id : Modified in 10.3.22 +versioning.update : MDEV-20955 - Wrong result code; modified in 10.3.21 +versioning.view : Modified in 10.3.21 #----------------------------------------------------------------------- -wsrep.* : suite.pm modified in 10.3.17 -wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node +wsrep.* : Config file changed in 10.2.31; Config file changed in 10.3.22 +wsrep.alter_table_innodb : Configuration deleted in 10.3.22 +wsrep.binlog_format : Configuration modified in 10.3.22 +wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node; re-enabled in 10.3.22 +wsrep.mdev_10186 : Configuration changed in 10.2.31; configuration added in 10.3.22 wsrep.mdev_6832 : MDEV-14195 - Check testcase failed -wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.3.18 -wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use -wsrep.variables : MDEV-14311 - Wrong result; MDEV-17585 - Deadlock; modified in 10.3.17 +wsrep.mysql_tzinfo_to_sql_symlink : Modified in 10.3.22 +wsrep.mysql_tzinfo_to_sql_symlink_skip : Modified in 10.3.22 +wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use; re-enabled in 10.3.22; configuration modified in 10.3.22 +wsrep.variables : MDEV-17585 - Deadlock; modified in 10.3.22 #----------------------------------------------------------------------- -wsrep_info.* : suite.pm modified in 10.3.17 -wsrep_info.plugin : MDEV-13569 - No nodes coming from prim view +wsrep_info.* : Config file changed in 10.2.31; Config file changed in 10.3.22 diff -Nru mariadb-10.3-10.3.18/mysys/lf_alloc-pin.c mariadb-10.3-10.3.22/mysys/lf_alloc-pin.c --- mariadb-10.3-10.3.18/mysys/lf_alloc-pin.c 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysys/lf_alloc-pin.c 2020-01-26 18:37:28.000000000 +0000 @@ -151,7 +151,6 @@ */ LF_PINS *lf_pinbox_get_pins(LF_PINBOX *pinbox) { - struct st_my_thread_var *var; uint32 pins, next, top_ver; LF_PINS *el; /* @@ -194,12 +193,7 @@ el->link= pins; el->purgatory_count= 0; el->pinbox= pinbox; - var= my_thread_var; - /* - Threads that do not call my_thread_init() should still be - able to use the LF_HASH. - */ - el->stack_ends_here= (var ? & var->stack_ends_here : NULL); + return el; } @@ -335,16 +329,18 @@ void *list; void **addr= NULL; void *first= NULL, *last= NULL; + struct st_my_thread_var *var= my_thread_var; + void *stack_ends_here= var ? var->stack_ends_here : NULL; LF_PINBOX *pinbox= pins->pinbox; npins= pinbox->pins_in_array+1; #ifdef HAVE_ALLOCA - if (pins->stack_ends_here != NULL) + if (stack_ends_here != NULL) { int alloca_size= sizeof(void *)*LF_PINBOX_PINS*npins; /* create a sorted list of pinned addresses, to speed up searches */ - if (available_stack_size(&pinbox, *pins->stack_ends_here) > + if (available_stack_size(&pinbox, stack_ends_here) > alloca_size + ALLOCA_SAFETY_MARGIN) { struct st_harvester hv; diff -Nru mariadb-10.3-10.3.18/mysys/my_lockmem.c mariadb-10.3-10.3.22/mysys/my_lockmem.c --- mariadb-10.3-10.3.18/mysys/my_lockmem.c 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/mysys/my_lockmem.c 2020-01-26 18:37:28.000000000 +0000 @@ -20,7 +20,6 @@ #include #ifdef HAVE_MLOCK -#include struct st_mem_list { diff -Nru mariadb-10.3-10.3.18/pcre/ChangeLog mariadb-10.3-10.3.22/pcre/ChangeLog --- mariadb-10.3-10.3.18/pcre/ChangeLog 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/pcre/ChangeLog 2020-01-26 18:37:28.000000000 +0000 @@ -1605,7 +1605,7 @@ are added as well. 3. Fix cache-flush issue on PowerPC (It is still an experimental JIT port). - PCRE_EXTRA_TABLES is not suported by JIT, and should be checked before + PCRE_EXTRA_TABLES is not supported by JIT, and should be checked before calling _pcre_jit_exec. Some extra comments are added. 4. (*MARK) settings inside atomic groups that do not contain any capturing diff -Nru mariadb-10.3-10.3.18/pcre/doc/html/pcredemo.html mariadb-10.3-10.3.22/pcre/doc/html/pcredemo.html --- mariadb-10.3-10.3.18/pcre/doc/html/pcredemo.html 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/pcre/doc/html/pcredemo.html 2020-01-26 18:37:28.000000000 +0000 @@ -161,7 +161,7 @@ return 1; } -/* Match succeded */ +/* Match succeeded */ printf("\nMatch succeeded at offset %d\n", ovector[0]); @@ -379,7 +379,7 @@ return 1; } - /* Match succeded */ + /* Match succeeded */ printf("\nMatch succeeded again at offset %d\n", ovector[0]); diff -Nru mariadb-10.3-10.3.18/pcre/doc/html/pcrejit.html mariadb-10.3-10.3.22/pcre/doc/html/pcrejit.html --- mariadb-10.3-10.3.18/pcre/doc/html/pcrejit.html 2019-09-08 16:53:00.000000000 +0000 +++ mariadb-10.3-10.3.22/pcre/doc/html/pcrejit.html 2020-01-26 18:37:28.000000000 +0000 @@ -299,7 +299,7 @@ This is a suggestion for how a multithreaded program that needs to set up non-default JIT stacks might operate:
-  During thread initalization
+  During thread initialization
     thread_local_var = pcre_jit_stack_alloc(...)
 
   During thread exit
diff -Nru mariadb-10.3-10.3.18/pcre/doc/pcre.txt mariadb-10.3-10.3.22/pcre/doc/pcre.txt
--- mariadb-10.3-10.3.18/pcre/doc/pcre.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/pcre/doc/pcre.txt	2020-01-26 18:37:28.000000000 +0000
@@ -8578,7 +8578,7 @@
        This  is a suggestion for how a multithreaded program that needs to set
        up non-default JIT stacks might operate:
 
-         During thread initalization
+         During thread initialization
            thread_local_var = pcre_jit_stack_alloc(...)
 
          During thread exit
diff -Nru mariadb-10.3-10.3.18/pcre/doc/pcredemo.3 mariadb-10.3-10.3.22/pcre/doc/pcredemo.3
--- mariadb-10.3-10.3.18/pcre/doc/pcredemo.3	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/pcre/doc/pcredemo.3	2020-01-26 18:37:28.000000000 +0000
@@ -161,7 +161,7 @@
   return 1;
   }
 
-/* Match succeded */
+/* Match succeeded */
 
 printf("\enMatch succeeded at offset %d\en", ovector[0]);
 
@@ -379,7 +379,7 @@
     return 1;
     }
 
-  /* Match succeded */
+  /* Match succeeded */
 
   printf("\enMatch succeeded again at offset %d\en", ovector[0]);
 
diff -Nru mariadb-10.3-10.3.18/pcre/doc/pcrejit.3 mariadb-10.3-10.3.22/pcre/doc/pcrejit.3
--- mariadb-10.3-10.3.18/pcre/doc/pcrejit.3	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/pcre/doc/pcrejit.3	2020-01-26 18:37:28.000000000 +0000
@@ -285,7 +285,7 @@
 This is a suggestion for how a multithreaded program that needs to set up
 non-default JIT stacks might operate:
 .sp
-  During thread initalization
+  During thread initialization
     thread_local_var = pcre_jit_stack_alloc(...)
 .sp
   During thread exit
diff -Nru mariadb-10.3-10.3.18/pcre/pcre_compile.c mariadb-10.3-10.3.22/pcre/pcre_compile.c
--- mariadb-10.3-10.3.18/pcre/pcre_compile.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/pcre/pcre_compile.c	2020-01-26 18:37:28.000000000 +0000
@@ -8352,7 +8352,7 @@
 /* Accumulate the length for use in the pre-compile phase. Start with the
 length of the BRA and KET and any extra bytes that are required at the
 beginning. We accumulate in a local variable to save frequent testing of
-lenthptr for NULL. We cannot do this by looking at the value of code at the
+lengthptr for NULL. We cannot do this by looking at the value of code at the
 start and end of each alternative, because compiled items are discarded during
 the pre-compile phase so that the work space is not exceeded. */
 
diff -Nru mariadb-10.3-10.3.18/pcre/pcre_internal.h mariadb-10.3-10.3.22/pcre/pcre_internal.h
--- mariadb-10.3-10.3.18/pcre/pcre_internal.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/pcre/pcre_internal.h	2020-01-26 18:37:28.000000000 +0000
@@ -2188,7 +2188,7 @@
 debugging printing of a compiled regex. We use a macro so that it can be
 defined close to the definitions of the opcodes themselves.
 
-As things have been extended, some of these are no longer fixed lenths, but are
+As things have been extended, some of these are no longer fixed lengths, but are
 minima instead. For example, the length of a single-character repeat may vary
 in UTF-8 mode. The code that uses this table must know about such things. */
 
diff -Nru mariadb-10.3-10.3.18/pcre/pcredemo.c mariadb-10.3-10.3.22/pcre/pcredemo.c
--- mariadb-10.3-10.3.18/pcre/pcredemo.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/pcre/pcredemo.c	2020-01-26 18:37:28.000000000 +0000
@@ -144,7 +144,7 @@
   return 1;
   }
 
-/* Match succeded */
+/* Match succeeded */
 
 printf("\nMatch succeeded at offset %d\n", ovector[0]);
 
@@ -362,7 +362,7 @@
     return 1;
     }
 
-  /* Match succeded */
+  /* Match succeeded */
 
   printf("\nMatch succeeded again at offset %d\n", ovector[0]);
 
diff -Nru mariadb-10.3-10.3.18/plugin/auth_pam/CMakeLists.txt mariadb-10.3-10.3.22/plugin/auth_pam/CMakeLists.txt
--- mariadb-10.3-10.3.18/plugin/auth_pam/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/plugin/auth_pam/CMakeLists.txt	2020-01-26 18:37:28.000000000 +0000
@@ -10,5 +10,15 @@
   ENDIF(HAVE_STRNDUP)
   FIND_LIBRARY(PAM_LIBRARY pam)
   MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
+
+  IF(TARGET auth_pam)
+    ADD_LIBRARY(pam_user_map MODULE mapper/pam_user_map.c)
+    TARGET_LINK_LIBRARIES(pam_user_map pam)
+    SET_TARGET_PROPERTIES (pam_user_map PROPERTIES PREFIX "")
+    IF(INSTALL_PAMDIR)
+      INSTALL(TARGETS pam_user_map DESTINATION ${INSTALL_PAMDIR} COMPONENT Server)
+      INSTALL(FILES mapper/user_map.conf DESTINATION /etc/security COMPONENT Server)
+    ENDIF()
+  ENDIF()
 ENDIF(HAVE_PAM_APPL_H)
 
diff -Nru mariadb-10.3-10.3.18/plugin/auth_pam/mapper/user_map.conf mariadb-10.3-10.3.22/plugin/auth_pam/mapper/user_map.conf
--- mariadb-10.3-10.3.18/plugin/auth_pam/mapper/user_map.conf	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/plugin/auth_pam/mapper/user_map.conf	2020-01-26 18:37:28.000000000 +0000
@@ -0,0 +1,13 @@
+#
+# Configuration file for pam_user_map.so
+#
+# defines mapping in the form
+#
+#       orig_user_name: mapped_user_name
+#
+# or (to map all users in a specific group)
+#
+#       @group_name: mapped_user_name
+#
+# comments and empty lines are ignored
+#
diff -Nru mariadb-10.3-10.3.18/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf mariadb-10.3-10.3.22/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf
--- mariadb-10.3-10.3.18/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/plugin/wsrep_info/mysql-test/wsrep_info/my.cnf	2020-01-26 18:37:28.000000000 +0000
@@ -11,6 +11,7 @@
 [mysqld.1]
 #galera_port=@OPT.port
 #sst_port=@OPT.port
+wsrep-on=1
 wsrep_provider_options='base_port=@mysqld.1.#galera_port'
 wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
 wsrep_node_name=test-node-1
@@ -18,6 +19,7 @@
 [mysqld.2]
 #galera_port=@OPT.port
 #sst_port=@OPT.port
+wsrep-on=1
 wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
 wsrep_provider_options='base_port=@mysqld.2.#galera_port'
 wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
diff -Nru mariadb-10.3-10.3.18/scripts/mysql_install_db.sh mariadb-10.3-10.3.22/scripts/mysql_install_db.sh
--- mariadb-10.3-10.3.18/scripts/mysql_install_db.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/mysql_install_db.sh	2020-01-26 18:37:28.000000000 +0000
@@ -243,7 +243,7 @@
   echo "If you compiled from source, you need to either run 'make install' to"
   echo "copy the software into the correct location ready for operation."
   echo "If you don't want to do a full install, you can use the --srcdir"
-  echo "option to only install the mysql database and privilege tables"
+  echo "option to only install the mysql database and privilege tables."
   echo
   echo "If you are using a binary release, you must either be at the top"
   echo "level of the extracted archive, or pass the --basedir option"
diff -Nru mariadb-10.3-10.3.18/scripts/mysql_system_tables.sql mariadb-10.3-10.3.22/scripts/mysql_system_tables.sql
--- mariadb-10.3-10.3.18/scripts/mysql_system_tables.sql	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/mysql_system_tables.sql	2020-01-26 18:37:28.000000000 +0000
@@ -48,7 +48,7 @@
 CREATE TABLE IF NOT EXISTS plugin ( name varchar(64) DEFAULT '' NOT NULL, dl varchar(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci comment='MySQL plugins';
 
 
-CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
+CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host varchar(2048) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(80) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner varchar(512) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
 
 
 CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Table privileges';
diff -Nru mariadb-10.3-10.3.18/scripts/mysql_system_tables_data.sql mariadb-10.3-10.3.22/scripts/mysql_system_tables_data.sql
--- mariadb-10.3-10.3.18/scripts/mysql_system_tables_data.sql	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/mysql_system_tables_data.sql	2020-01-26 18:37:28.000000000 +0000
@@ -14,7 +14,7 @@
 -- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335  USA
 
 --
--- The inital data for system tables of MySQL Server
+-- The initial data for system tables of MySQL Server
 --
 
 -- When setting up a "cross bootstrap" database (e.g., creating data on a Unix
diff -Nru mariadb-10.3-10.3.18/scripts/mysqlaccess.sh mariadb-10.3-10.3.22/scripts/mysqlaccess.sh
--- mariadb-10.3-10.3.18/scripts/mysqlaccess.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/mysqlaccess.sh	2020-01-26 18:37:28.000000000 +0000
@@ -26,7 +26,7 @@
 BEGIN {
 	# ****************************
 	# static information...
-	$VERSION     = "2.06, 20 Dec 2000";
+	$VERSION     = "2.10, 13 Sep 2019";
 	$0           =~ m%/([^/]+)$%o;
 	$script      = $1;
         $script      = 'MySQLAccess' unless $script;
diff -Nru mariadb-10.3-10.3.18/scripts/mysqld_multi.sh mariadb-10.3-10.3.22/scripts/mysqld_multi.sh
--- mariadb-10.3-10.3.18/scripts/mysqld_multi.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/mysqld_multi.sh	2020-01-26 18:37:28.000000000 +0000
@@ -349,7 +349,7 @@
         $options[$j]= quote_shell_word($options[$j]);
         $tmp.= " $options[$j]";
       }
-      elseif ("--defaults-group-suffix=" eq substr($options[$j], 0, 24))
+      elsif ("--defaults-group-suffix=" eq substr($options[$j], 0, 24))
       {
         $suffix_found= 1;
       }
@@ -368,14 +368,15 @@
       print "wanted mysqld binary.\n\n";
       $info_sent= 1;
     }
-    $com.= $tmp;
 
     if (!$suffix_found)
     {
       $com.= " --defaults-group-suffix=";
-      $com.= $groups[$i];
+      $com.= substr($groups[$i],6);
     }
 
+    $com.= $tmp;
+
     if ($opt_wsrep_new_cluster) {
       $com.= " --wsrep-new-cluster";
     }
diff -Nru mariadb-10.3-10.3.18/scripts/mysqld_safe.sh mariadb-10.3-10.3.22/scripts/mysqld_safe.sh
--- mariadb-10.3-10.3.18/scripts/mysqld_safe.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/mysqld_safe.sh	2020-01-26 18:37:28.000000000 +0000
@@ -22,6 +22,7 @@
 numa_interleave=0
 wsrep_on=0
 dry_run=0
+defaults_group_suffix=
 
 # Initial logging status: error log is not open, and not using syslog
 logging=init
@@ -349,6 +350,8 @@
         append_arg_to_args "$arg"
         ;;
 
+      --defaults-group-suffix=*) defaults_group_suffix="$arg" ;;
+
       --help) usage ;;
 
       *)
@@ -923,13 +926,19 @@
   exit 1
 fi
 
-for i in  "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
+for i in  "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
   "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
 do
   cmd="$cmd "`shell_quote_string "$i"`
 done
 cmd="$cmd $args"
-[ $dry_run -eq 1 ] && return
+
+if [ $dry_run -eq 1 ]
+then
+  # RETURN or EXIT depending if the script is being sourced or not.
+  (return 2> /dev/null) && return || exit
+fi
+
 
 # Avoid 'nohup: ignoring input' warning
 test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null"
diff -Nru mariadb-10.3-10.3.18/scripts/wsrep_sst_mariabackup.sh mariadb-10.3-10.3.22/scripts/wsrep_sst_mariabackup.sh
--- mariadb-10.3-10.3.18/scripts/wsrep_sst_mariabackup.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/scripts/wsrep_sst_mariabackup.sh	2020-01-26 18:37:28.000000000 +0000
@@ -83,7 +83,14 @@
 pcmd="pv $pvopts"
 declare -a RC
 
+set +e
 INNOBACKUPEX_BIN=$(which mariabackup)
+if test -z $INNOBACKUPEX_BIN
+then
+  wsrep_log_error 'mariabackup binary not found in $PATH'
+  exit 42
+fi
+set -e
 XBSTREAM_BIN=mbstream
 XBCRYPT_BIN=xbcrypt # Not available in MariaBackup
 
@@ -378,8 +385,8 @@
 
 get_stream()
 {
-    if [[ $sfmt == 'xbstream' ]];then 
-        wsrep_log_info "Streaming with xbstream"
+    if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then
+        wsrep_log_info "Streaming with ${sfmt}"
         if [[ "$WSREP_SST_OPT_ROLE"  == "joiner" ]];then
             strmcmd="${XBSTREAM_BIN} -x"
         else
diff -Nru mariadb-10.3-10.3.18/sql/CMakeLists.txt mariadb-10.3-10.3.22/sql/CMakeLists.txt
--- mariadb-10.3-10.3.18/sql/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -198,9 +198,9 @@
   # without necessity.E.g source modifications, that do not
   # change list of exported symbols, will not result in a relink for plugins.
 
-  SET(MYSQLD_DEF ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.def)
-  SET(MYSQLD_EXP ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.exp)
-  SET(MYSQLD_LIB ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.lib)
+  SET(MYSQLD_DEF ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib${CMAKE_CFG_INTDIR}.def)
+  SET(MYSQLD_EXP ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib${CMAKE_CFG_INTDIR}.exp)
+  SET(MYSQLD_LIB ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib${CMAKE_CFG_INTDIR}.lib)
   SET(MYSQLD_CORELIBS sql mysys dbug strings)
   FOREACH (CORELIB ${MYSQLD_CORELIBS})
     SET (LIB_LOCATIONS ${LIB_LOCATIONS} $)
@@ -213,12 +213,12 @@
   # Create a cmake script to generate import and export libs
   # from a .def file
   SET(CMAKE_CONFIGURABLE_FILE_CONTENT "
-    IF ((mysqld_lib.def IS_NEWER_THAN mysqld_lib.lib) OR
-        (mysqld_lib.def IS_NEWER_THAN mysqld_lib.exp))
-      FILE(REMOVE mysqld_lib.lib mysqld_lib.exp)
+    IF ((mysqld_lib\${CFG}.def IS_NEWER_THAN mysqld_lib\${CFG}.lib) OR
+        (mysqld_lib\${CFG}.def IS_NEWER_THAN mysqld_lib\${CFG}.exp))
+      FILE(REMOVE mysqld_lib\${CFG}.lib mysqld_lib\${CFG}.exp)
       SET(ENV{VS_UNICODE_OUTPUT})
       EXECUTE_PROCESS (
-        COMMAND \"${CMAKE_LINKER}\" /lib /NAME:mysqld.exe \"/DEF:${MYSQLD_DEF}\" /MACHINE:${_PLATFORM}
+        COMMAND \"${CMAKE_LINKER}\" /lib /NAME:mysqld.exe \"/DEF:${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib\${CFG}.def\" /MACHINE:${_PLATFORM}
         RESULT_VARIABLE ret)
       IF(NOT ret EQUAL 0)
         MESSAGE(FATAL_ERROR \"process failed ret=\${ret}\")
@@ -228,41 +228,22 @@
 
   CONFIGURE_FILE(
     ${PROJECT_SOURCE_DIR}/cmake/configurable_file_content.in
-    make_mysqld_lib.cmake)
+    make_mysqld_lib.cmake
+    @ONLY)
 
   IF(CMAKE_VERSION VERSION_GREATER "3.2.0")
     SET(MYSQLD_LIB_BYPRODUCTS  BYPRODUCTS ${MYSQLD_DEF} ${MYSQLD_LIB} ${MYSQLD_EXP})
   ENDIF()
 
-  # Create a cmake script to generate import and export libs
-  # from a .def file
-  SET(CMAKE_CONFIGURABLE_FILE_CONTENT "
-    IF ((mysqld_lib.def IS_NEWER_THAN mysqld_lib.lib) OR
-        (mysqld_lib.def IS_NEWER_THAN mysqld_lib.exp))
-      FILE(REMOVE mysqld_lib.lib mysqld_lib.exp)
-      SET(ENV{VS_UNICODE_OUTPUT})
-      EXECUTE_PROCESS (
-        COMMAND \"${CMAKE_LINKER}\" /lib /NAME:mysqld.exe \"/DEF:${MYSQLD_DEF}\" /MACHINE:${_PLATFORM}
-        RESULT_VARIABLE ret)
-      IF(NOT ret EQUAL 0)
-        MESSAGE(FATAL_ERROR \"process failed ret=\${ret}\")
-      ENDIF()
-    ENDIF()
-  ")
-
-  CONFIGURE_FILE(
-    ${PROJECT_SOURCE_DIR}/cmake/configurable_file_content.in
-    make_mysqld_lib.cmake)
-
   ADD_CUSTOM_COMMAND(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mysqld_lib.stamp
     ${MYSQLD_LIB_BYPRODUCTS}
-    COMMENT "Generating mysqld_lib.def, mysqld_lib.lib, mysqld_lib.exp"
+    COMMENT "Generating ${MYSQLD_DEF}, ${MYSQLD_LIB}, ${MYSQLD_EXP}"
     COMMAND cscript //nologo ${PROJECT_SOURCE_DIR}/win/create_def_file.js
-            ${_PLATFORM} /forLib ${LIB_LOCATIONS} > mysqld_lib.def.tmp
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different mysqld_lib.def.tmp mysqld_lib.def
-    COMMAND ${CMAKE_COMMAND} -E remove mysqld_lib.def.tmp
-    COMMAND ${CMAKE_COMMAND} -P make_mysqld_lib.cmake
+            ${_PLATFORM} /forLib ${LIB_LOCATIONS} > ${MYSQLD_DEF}.tmp
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${MYSQLD_DEF}.tmp ${MYSQLD_DEF}
+    COMMAND ${CMAKE_COMMAND} -E remove ${MYSQLD_DEF}.tmp
+    COMMAND ${CMAKE_COMMAND}  "-DCFG=${CMAKE_CFG_INTDIR}" -P make_mysqld_lib.cmake
     COMMAND ${CMAKE_COMMAND} -E touch mysqld_lib.stamp
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     DEPENDS ${MYSQLD_CORELIBS}
@@ -425,15 +406,18 @@
   ENDIF()
   MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/data)
   ADD_CUSTOM_COMMAND(
-     OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
-     COMMAND ${CMAKE_COMMAND} ${CONFIG_PARAM}
-       -DTOP_SRCDIR="${CMAKE_SOURCE_DIR}"
-       -DBINDIR="${CMAKE_CURRENT_BINARY_DIR}"
-       -DMYSQLD_EXECUTABLE="$"
-       -DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}"
-       -P ${CMAKE_SOURCE_DIR}/cmake/create_initial_db.cmake
+     OUTPUT initdb.dep
+     COMMAND ${CMAKE_COMMAND} -E remove_directory data
+     COMMAND ${CMAKE_COMMAND} -E make_directory data
+     COMMAND ${CMAKE_COMMAND} -E chdir data ${CMAKE_COMMAND}
+     ${CONFIG_PARAM}
+     -DTOP_SRCDIR="${CMAKE_SOURCE_DIR}"
+     -DBINDIR="${CMAKE_CURRENT_BINARY_DIR}"
+     -DMYSQLD_EXECUTABLE="$"
+     -DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}"
+     -P ${CMAKE_SOURCE_DIR}/cmake/create_initial_db.cmake
      COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/initdb.dep
-     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data
+     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
      DEPENDS mysqld
   )
   ADD_CUSTOM_TARGET(initial_database  
diff -Nru mariadb-10.3-10.3.18/sql/derror.cc mariadb-10.3-10.3.22/sql/derror.cc
--- mariadb-10.3-10.3.18/sql/derror.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/derror.cc	2020-01-26 18:37:29.000000000 +0000
@@ -69,6 +69,9 @@
 {
   const char **errmsgs;
   bool error= FALSE;
+  const char *lang= my_default_lc_messages->errmsgs->language;
+  my_bool use_english;
+
   DBUG_ENTER("init_errmessage");
 
   free_error_messages();
@@ -77,35 +80,63 @@
 
   error_message_charset_info= system_charset_info;
 
-  /* Read messages from file. */
-  if (read_texts(ERRMSG_FILE, my_default_lc_messages->errmsgs->language,
-                 &original_error_messages))
+  use_english= !strcmp(lang, "english");
+  if (!use_english)
+  {
+    /* Read messages from file. */
+    use_english= !read_texts(ERRMSG_FILE,lang, &original_error_messages);
+    error= TRUE;
+  }
+
+  if (use_english)
   {
-    /*
-      No error messages.  Create a temporary empty error message so
-      that we don't get a crash if some code wrongly tries to access
-      a non existing error message.
-    */
+    static const struct
+    {
+      const char* name;
+      uint id;
+      const char* fmt;
+    }
+    english_msgs[]=
+    {
+      #include 
+    };
+
+    memset(errors_per_range, 0, sizeof(errors_per_range));
+    /* Calculate nr of messages per range. */
+    for (size_t i= 0; i < array_elements(english_msgs); i++)
+    {
+      uint id= english_msgs[i].id;
+
+      // We rely on the fact the array is sorted by id.
+      DBUG_ASSERT(i == 0 || english_msgs[i-1].id < id);
+
+      errors_per_range[id/ERRORS_PER_RANGE-1]= id%ERRORS_PER_RANGE + 1;
+    }
+
+    size_t all_errors= 0;
+    for (size_t i= 0; i < MAX_ERROR_RANGES; i++)
+      all_errors+= errors_per_range[i];
+
     if (!(original_error_messages= (const char***)
-          my_malloc(MAX_ERROR_RANGES * sizeof(char**) +
-                    (ERRORS_PER_RANGE * sizeof(char*)),
-                     MYF(0))))
+          my_malloc((all_errors + MAX_ERROR_RANGES)* sizeof(void*),
+                     MYF(MY_ZEROFILL))))
       DBUG_RETURN(TRUE);
-    errmsgs= (const char**) (original_error_messages + MAX_ERROR_RANGES);
 
-    for (uint i=0 ; i < MAX_ERROR_RANGES ; i++)
+    errmsgs= (const char**)(original_error_messages + MAX_ERROR_RANGES);
+
+    original_error_messages[0]= errmsgs;
+    for (uint i= 1; i < MAX_ERROR_RANGES; i++)
     {
-      original_error_messages[i]= errmsgs;
-      errors_per_range[i]= ERRORS_PER_RANGE;
+      original_error_messages[i]=
+        original_error_messages[i-1] + errors_per_range[i-1];
     }
-    errors_per_range[2]= 0;                     // MYSYS error messages
-
-    for (const char **ptr= errmsgs;
-         ptr < errmsgs + ERRORS_PER_RANGE ;
-         ptr++)
-      *ptr= "";
 
-    error= TRUE;
+    for (uint i= 0; i < array_elements(english_msgs); i++)
+    {
+      uint id= english_msgs[i].id;
+      original_error_messages[id/ERRORS_PER_RANGE-1][id%ERRORS_PER_RANGE]=
+         english_msgs[i].fmt;
+    }
   }
 
   /* Register messages for use with my_error(). */
diff -Nru mariadb-10.3-10.3.18/sql/events.cc mariadb-10.3-10.3.22/sql/events.cc
--- mariadb-10.3-10.3.18/sql/events.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/events.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1199,6 +1199,46 @@
       delete et;
       goto end;
     }
+
+#ifdef WITH_WSREP
+    /**
+      IF SST is done from a galera node that is also acting as MASTER
+      newly synced node in galera eco-system will also copy-over the event state
+      enabling duplicate event in galera eco-system.
+      DISABLE such events if the current node is not event orginator.
+      (Also, make sure you skip disabling it if is already disabled to avoid
+       creation of redundant action)
+      NOTE:
+      This complete system relies on server-id. Ideally server-id should be
+      same for all nodes of galera eco-system but they aren't same.
+      Infact, based on galera use-case it seems like it recommends to have each
+      node with different server-id.
+    */
+    if (et->originator != thd->variables.server_id)
+    {
+        if (et->status == Event_parse_data::SLAVESIDE_DISABLED)
+          continue;
+
+        store_record(table, record[1]);
+        table->field[ET_FIELD_STATUS]->
+                store((longlong) Event_parse_data::SLAVESIDE_DISABLED,
+                      TRUE);
+
+	/* All the dmls to mysql.events tables are stmt bin-logged. */
+        bool save_binlog_row_based;
+        if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row()))
+	  thd->set_current_stmt_binlog_format_stmt();
+
+        (void) table->file->ha_update_row(table->record[1], table->record[0]);
+
+        if (save_binlog_row_based)
+          thd->set_current_stmt_binlog_format_row();
+
+        delete et;
+        continue;
+    }
+#endif /* WITH_WSREP */
+
     /**
       Since the Event_queue_element object could be deleted inside
       Event_queue::create_event we should save the value of dropped flag
diff -Nru mariadb-10.3-10.3.18/sql/field.cc mariadb-10.3-10.3.22/sql/field.cc
--- mariadb-10.3-10.3.18/sql/field.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/field.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,6 @@
 /*
    Copyright (c) 2000, 2017, Oracle and/or its affiliates.
-   Copyright (c) 2008, 2017, MariaDB
+   Copyright (c) 2008, 2019, 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
@@ -71,7 +71,7 @@
                   ptr < table->record[0] + table->s->reclength))))
 
 #define ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED                   \
-  DBUG_ASSERT(is_stat_field || !table ||                             \
+  DBUG_ASSERT(!table ||                                              \
               (!table->write_set ||                                  \
                bitmap_is_set(table->write_set, field_index) ||       \
                (!(ptr >= table->record[0] &&                         \
@@ -1766,8 +1766,7 @@
   flags=null_ptr ? 0: NOT_NULL_FLAG;
   comment.str= (char*) "";
   comment.length=0;
-  field_index= 0;   
-  is_stat_field= FALSE;
+  field_index= 0;
   cond_selectivity= 1.0;
   next_equal_field= NULL;
 }
@@ -2405,31 +2404,19 @@
 }
 
 
-
-Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff,
-                    bool stat_flag)
+Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff)
 {
   Field *tmp;
   if ((tmp= (Field*) memdup_root(root,(char*) this,size_of())))
   {
-    tmp->init(new_table);
+    if (new_table)
+      tmp->init(new_table);
     tmp->move_field_offset(diff);
   }
-  tmp->is_stat_field= stat_flag;
   return tmp;
 }
 
 
-Field *Field::clone(MEM_ROOT *root, my_ptrdiff_t diff)
-{
-  Field *tmp;
-  if ((tmp= (Field*) memdup_root(root,(char*) this,size_of())))
-  {
-    tmp->move_field_offset(diff);
-  }
-  return tmp;
-}
-
 int Field::set_default()
 {
   if (default_value)
@@ -2853,7 +2840,7 @@
   
   /*
     Write digits of the frac_% parts ;
-    Depending on get_thd()->count_cutted_fields, we may also want
+    Depending on get_thd()->count_cuted_fields, we may also want
     to know if some non-zero tail of these parts will
     be truncated (for example, 0.002->0.00 will generate a warning,
     while 0.000->0.00 will not)
@@ -6991,7 +6978,8 @@
   if (likely(!(pos= copier->most_important_error_pos())))
     return FALSE;
 
-  if (!is_stat_field)
+  /* Ignore errors from internal expressions */
+  if (get_thd()->count_cuted_fields > CHECK_FIELD_EXPRESSION)
   {
     convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
     set_warning_truncated_wrong_value("string", tmp);
@@ -7024,8 +7012,9 @@
 Field_longstr::report_if_important_data(const char *pstr, const char *end,
                                         bool count_spaces)
 {
-  THD *thd= get_thd();
-  if ((pstr < end) && thd->count_cuted_fields > CHECK_FIELD_EXPRESSION)
+  THD *thd;
+  if ((pstr < end) &&
+      (thd= get_thd())->count_cuted_fields > CHECK_FIELD_EXPRESSION)
   {
     if (test_if_important_data(field_charset, pstr, end))
     {
@@ -7036,7 +7025,8 @@
       return 2;
     }
     else if (count_spaces)
-    { /* If we lost only spaces then produce a NOTE, not a WARNING */
+    {
+      /* If we lost only spaces then produce a NOTE, not a WARNING */
       set_note(WARN_DATA_TRUNCATED, 1);
       return 2;
     }
@@ -11381,13 +11371,17 @@
                                               const char *value)
 {
   THD *thd= get_thd();
-  const char *db_name= table->s->db.str;
-  const char *table_name= table->s->table_name.str;
+  const char *db_name;
+  const char *table_name;
+  /*
+    table has in the past been 0 in case of wrong calls when processing
+    statistics tables. Let's protect against that.
+  */
+  DBUG_ASSERT(table);
 
-  if (!db_name)
-    db_name= "";
-  if (!table_name)
-    table_name= "";
+  db_name= (table && table->s->db.str) ? table->s->db.str : "";
+  table_name= (table && table->s->table_name.str) ?
+              table->s->table_name.str : "";
 
   push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
                       ER_TRUNCATED_WRONG_VALUE_FOR_FIELD,
diff -Nru mariadb-10.3-10.3.18/sql/field.h mariadb-10.3-10.3.22/sql/field.h
--- mariadb-10.3-10.3.18/sql/field.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/field.h	2020-01-26 18:37:29.000000000 +0000
@@ -729,9 +729,6 @@
    */
   bool is_created_from_null_item;
 
-  /* TRUE in Field objects created for column min/max values */
-  bool is_stat_field; 
-
   /* 
     Selectivity of the range condition over this field.
     When calculating this selectivity a range predicate
@@ -1253,9 +1250,7 @@
                                uchar *new_ptr, uint32 length,
                                uchar *new_null_ptr, uint new_null_bit);
   Field *clone(MEM_ROOT *mem_root, TABLE *new_table);
-  Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff,
-               bool stat_flag= FALSE);
-  Field *clone(MEM_ROOT *mem_root, my_ptrdiff_t diff);
+  Field *clone(MEM_ROOT *mem_root, TABLE *new_table, my_ptrdiff_t diff);
   inline void move_field(uchar *ptr_arg,uchar *null_ptr_arg,uchar null_bit_arg)
   {
     ptr=ptr_arg; null_ptr=null_ptr_arg; null_bit=null_bit_arg;
diff -Nru mariadb-10.3-10.3.18/sql/filesort.cc mariadb-10.3-10.3.22/sql/filesort.cc
--- mariadb-10.3-10.3.18/sql/filesort.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/filesort.cc	2020-01-26 18:37:29.000000000 +0000
@@ -315,6 +315,7 @@
     param.max_keys_per_buffer=((param.max_keys_per_buffer *
                                 (param.rec_length + sizeof(char*))) /
                                param.rec_length - 1);
+    set_if_bigger(param.max_keys_per_buffer, 1);
     maxbuffer--;				// Offset from 0
     if (merge_many_buff(¶m,
                         (uchar*) sort->get_sort_keys(),
diff -Nru mariadb-10.3-10.3.18/sql/ha_partition.cc mariadb-10.3-10.3.22/sql/ha_partition.cc
--- mariadb-10.3-10.3.18/sql/ha_partition.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/ha_partition.cc	2020-01-26 18:37:29.000000000 +0000
@@ -564,7 +564,7 @@
     point.
 
     If you do not implement this, the default delete_table() is called from
-    handler.cc and it will delete all files with the file extentions returned
+    handler.cc and it will delete all files with the file extensions returned
     by bas_ext().
 
     Called from handler.cc by delete_table and  ha_create_table(). Only used
@@ -596,7 +596,7 @@
     Renames a table from one name to another from alter table call.
 
     If you do not implement this, the default rename_table() is called from
-    handler.cc and it will rename all files with the file extentions returned
+    handler.cc and it will rename all files with the file extensions returned
     by bas_ext().
 
     Called from sql_table.cc by mysql_rename_table().
@@ -3459,8 +3459,7 @@
 
 /*
   Open handler object
-
-  SYNOPSIS
+SYNOPSIS
     open()
     name                  Full path of table name
     mode                  Open mode flags
@@ -3586,6 +3585,7 @@
   }
   else
   {
+    check_insert_autoincrement();
     if (unlikely((error= open_read_partitions(name_buff, sizeof(name_buff)))))
       goto err_handler;
     m_num_locks= m_file_sample->lock_count();
@@ -4472,11 +4472,8 @@
                     table->found_next_number_field->field_index))
   {
     update_next_auto_inc_val();
-    /*
-      The following call is safe as part_share->auto_inc_initialized
-      (tested in the call) is guaranteed to be set for update statements.
-    */
-    set_auto_increment_if_higher(table->found_next_number_field);
+    if (part_share->auto_inc_initialized)
+      set_auto_increment_if_higher(table->found_next_number_field);
   }
   DBUG_RETURN(error);
 }
@@ -4541,7 +4538,7 @@
     or last historical partition, but DELETE HISTORY can delete from any
     historical partition. So, skip the check in this case.
   */
-  if (!thd->lex->vers_conditions.is_set()) // if not DELETE HISTORY
+  if (!thd->lex->vers_conditions.delete_history)
   {
     uint32 part_id;
     error= get_part_for_buf(buf, m_rec0, m_part_info, &part_id);
@@ -5268,7 +5265,10 @@
   {
     size_t alloc_len;
     uint used_parts= bitmap_bits_set(&m_part_info->read_partitions);
-    DBUG_ASSERT(used_parts > 0);
+
+    if (used_parts == 0) /* Do nothing since no records expected. */
+      DBUG_RETURN(false);
+
     /* Allocate record buffer for each used partition. */
     m_priority_queue_rec_len= m_rec_length + PARTITION_BYTES_IN_POS;
     if (!m_using_extended_keys)
@@ -5481,6 +5481,13 @@
       if ((tmp= (*file)->ha_index_end()))
         error= tmp;
     }
+    else if ((*file)->inited == RND)
+    {
+      // Possible due to MRR
+      int tmp;
+      if ((tmp= (*file)->ha_rnd_end()))
+        error= tmp;
+    }
   } while (*(++file));
   destroy_record_priority_queue();
   DBUG_RETURN(error);
@@ -6522,8 +6529,11 @@
     else if (unlikely((error= handle_unordered_next(table->record[0], FALSE))))
       DBUG_RETURN(error);
 
-    *range_info=
-      ((PARTITION_KEY_MULTI_RANGE *) m_range_info[m_last_part])->ptr;
+    if (!(m_mrr_mode & HA_MRR_NO_ASSOCIATION))
+    {
+      *range_info=
+        ((PARTITION_KEY_MULTI_RANGE *) m_range_info[m_last_part])->ptr;
+    }
   }
   DBUG_RETURN(0);
 }
@@ -8144,6 +8154,7 @@
   if (flag & HA_STATUS_AUTO)
   {
     bool auto_inc_is_first_in_idx= (table_share->next_number_keypart == 0);
+    bool all_parts_opened= true;
     DBUG_PRINT("info", ("HA_STATUS_AUTO"));
     if (!table->found_next_number_field)
       stats.auto_increment_value= 0;
@@ -8174,6 +8185,15 @@
                    ("checking all partitions for auto_increment_value"));
         do
         {
+          if (!bitmap_is_set(&m_opened_partitions, (uint)(file_array - m_file)))
+          {
+            /*
+              Some partitions aren't opened.
+              So we can't calculate the autoincrement.
+            */
+            all_parts_opened= false;
+            break;
+          }
           file= *file_array;
           file->info(HA_STATUS_AUTO | no_lock_flag);
           set_if_bigger(auto_increment_value,
@@ -8182,7 +8202,7 @@
 
         DBUG_ASSERT(auto_increment_value);
         stats.auto_increment_value= auto_increment_value;
-        if (auto_inc_is_first_in_idx)
+        if (all_parts_opened && auto_inc_is_first_in_idx)
         {
           set_if_bigger(part_share->next_auto_inc_val,
                         auto_increment_value);
@@ -8485,6 +8505,7 @@
     return 0;
   }
 
+  check_insert_autoincrement();
   if (bitmap_cmp(&m_opened_partitions, &m_part_info->read_partitions) != 0)
     return 0;
 
@@ -9206,7 +9227,6 @@
   }
   if (m_extra_prepare_for_update)
   {
-    DBUG_ASSERT(m_extra_cache);
     (void) file->extra(HA_EXTRA_PREPARE_FOR_UPDATE);
   }
   m_extra_cache_part_id= partition_id;
@@ -10676,8 +10696,8 @@
   @param repair        If true, move misplaced rows to correct partition.
 
   @return Operation status.
-    @retval 0     Success
-    @retval != 0  Error
+    @retval HA_ADMIN_OK     Success
+    @retval != HA_ADMIN_OK  Error
 */
 
 int ha_partition::check_misplaced_rows(uint read_part_id, bool do_repair)
@@ -10691,6 +10711,17 @@
 
   DBUG_ASSERT(m_file);
 
+  if (m_part_info->vers_info &&
+      read_part_id != m_part_info->vers_info->now_part->id &&
+      !m_part_info->vers_info->interval.is_set())
+  {
+    print_admin_msg(ha_thd(), MYSQL_ERRMSG_SIZE, "note",
+                    table_share->db.str, table->alias,
+                    opt_op_name[CHECK_PARTS],
+                    "Not supported for non-INTERVAL history partitions");
+    DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
+  }
+
   if (do_repair)
   {
     /* We must read the full row, if we need to move it! */
diff -Nru mariadb-10.3-10.3.18/sql/ha_partition.h mariadb-10.3-10.3.22/sql/ha_partition.h
--- mariadb-10.3-10.3.18/sql/ha_partition.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/ha_partition.h	2020-01-26 18:37:29.000000000 +0000
@@ -92,6 +92,7 @@
   bool auto_inc_initialized;
   mysql_mutex_t auto_inc_mutex;                /**< protecting auto_inc val */
   ulonglong next_auto_inc_val;                 /**< first non reserved value */
+  ulonglong prev_auto_inc_val;                 /**< stored next_auto_inc_val */
   /**
     Hash of partition names. Initialized in the first ha_partition::open()
     for the table_share. After that it is read-only, i.e. no locking required.
@@ -103,6 +104,7 @@
   Partition_share()
     : auto_inc_initialized(false),
     next_auto_inc_val(0),
+    prev_auto_inc_val(0),
     partition_name_hash_initialized(false),
     partition_names(NULL)
   {
@@ -371,6 +373,24 @@
   MY_BITMAP m_locked_partitions;
   /** Stores shared auto_increment etc. */
   Partition_share *part_share;
+  /** Fix spurious -Werror=overloaded-virtual in GCC 9 */
+  virtual void restore_auto_increment(ulonglong prev_insert_id)
+  {
+    handler::restore_auto_increment(prev_insert_id);
+  }
+  /** Store and restore next_auto_inc_val over duplicate key errors. */
+  virtual void store_auto_increment()
+  {
+    DBUG_ASSERT(part_share);
+    part_share->prev_auto_inc_val= part_share->next_auto_inc_val;
+    handler::store_auto_increment();
+  }
+  virtual void restore_auto_increment()
+  {
+    DBUG_ASSERT(part_share);
+    part_share->next_auto_inc_val= part_share->prev_auto_inc_val;
+    handler::restore_auto_increment();
+  }
   /** Temporary storage for new partitions Handler_shares during ALTER */
   List m_new_partitions_share_refs;
   /** Sorted array of partition ids in descending order of number of rows. */
@@ -1309,6 +1329,19 @@
     unlock_auto_increment();
   }
 
+  void check_insert_autoincrement()
+  {
+    /*
+      If we INSERT into the table having the AUTO_INCREMENT column,
+      we have to read all partitions for the next autoincrement value
+      unless we already did it.
+    */
+    if (!part_share->auto_inc_initialized &&
+        ha_thd()->lex->sql_command == SQLCOM_INSERT &&
+        table->found_next_number_field)
+      bitmap_set_all(&m_part_info->read_partitions);
+  }
+
 public:
 
   /*
diff -Nru mariadb-10.3-10.3.18/sql/ha_sequence.cc mariadb-10.3-10.3.22/sql/ha_sequence.cc
--- mariadb-10.3-10.3.18/sql/ha_sequence.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/ha_sequence.cc	2020-01-26 18:37:29.000000000 +0000
@@ -108,7 +108,7 @@
       MY_TEST(flags & HA_OPEN_INTERNAL_TABLE);
     reset_statistics();
 
-    /* Don't try to read the inital row the call is part of create code */
+    /* Don't try to read the initial row the call is part of create code */
     if (!(flags & (HA_OPEN_FOR_CREATE | HA_OPEN_FOR_REPAIR)))
     {
       if (unlikely((error= table->s->sequence->read_initial_values(table))))
diff -Nru mariadb-10.3-10.3.18/sql/handler.cc mariadb-10.3-10.3.22/sql/handler.cc
--- mariadb-10.3-10.3.18/sql/handler.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/handler.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1446,7 +1446,8 @@
 
 #if 1 // FIXME: This should be done in ha_prepare().
   if (rw_trans || (thd->lex->sql_command == SQLCOM_ALTER_TABLE &&
-                   thd->lex->alter_info.flags & ALTER_ADD_SYSTEM_VERSIONING))
+                   thd->lex->alter_info.flags & ALTER_ADD_SYSTEM_VERSIONING &&
+                   is_real_trans))
   {
     ulonglong trx_start_id= 0, trx_end_id= 0;
     for (Ha_trx_info *ha_info= trans->ha_list; ha_info; ha_info= ha_info->next())
@@ -7164,8 +7165,7 @@
 
 
 bool Table_scope_and_contents_source_st::vers_fix_system_fields(
-  THD *thd, Alter_info *alter_info, const TABLE_LIST &create_table,
-  bool create_select)
+  THD *thd, Alter_info *alter_info, const TABLE_LIST &create_table)
 {
   DBUG_ASSERT(!(alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING));
 
@@ -7205,41 +7205,59 @@
   if (vers_info.fix_implicit(thd, alter_info))
     return true;
 
-  int plain_cols= 0; // columns don't have WITH or WITHOUT SYSTEM VERSIONING
-  int vers_cols= 0; // columns have WITH SYSTEM VERSIONING
-  it.rewind();
-  while (const Create_field *f= it++)
-  {
-    if (vers_info.is_start(*f) || vers_info.is_end(*f))
-      continue;
-
-    if (f->versioning == Column_definition::VERSIONING_NOT_SET)
-      plain_cols++;
-    else if (f->versioning == Column_definition::WITH_VERSIONING)
-      vers_cols++;
-  }
-
-  if (!thd->lex->tmp_table() &&
-    // CREATE from SELECT (Create_fields are not yet added)
-    !create_select && vers_cols == 0 && (plain_cols == 0 || !vers_info))
-  {
-    my_error(ER_VERS_TABLE_MUST_HAVE_COLUMNS, MYF(0),
-             create_table.table_name.str);
-    return true;
-  }
-
   return false;
 }
 
 
 bool Table_scope_and_contents_source_st::vers_check_system_fields(
-       THD *thd, Alter_info *alter_info, const TABLE_LIST &create_table)
+        THD *thd, Alter_info *alter_info, const Lex_table_name &table_name,
+        const Lex_table_name &db, int select_count)
 {
   if (!(options & HA_VERSIONED_TABLE))
     return false;
-  return vers_info.check_sys_fields(
-      create_table.table_name, create_table.db, alter_info,
-      ha_check_storage_engine_flag(db_type, HTON_NATIVE_SYS_VERSIONING));
+
+  if (!(alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING))
+  {
+    uint versioned_fields= 0;
+    uint fieldnr= 0;
+    List_iterator field_it(alter_info->create_list);
+    while (Create_field *f= field_it++)
+    {
+      /*
+         The field from the CREATE part can be duplicated in the SELECT part of
+         CREATE...SELECT. In that case double counts should be avoided.
+         select_create::create_table_from_items just pushes the fields back into
+         the create_list, without additional manipulations, so the fields from
+         SELECT go last there.
+       */
+      bool is_dup= false;
+      if (fieldnr >= alter_info->create_list.elements - select_count)
+      {
+        List_iterator dup_it(alter_info->create_list);
+        for (Create_field *dup= dup_it++; !is_dup && dup != f; dup= dup_it++)
+          is_dup= my_strcasecmp(default_charset_info,
+                                dup->field_name.str, f->field_name.str) == 0;
+      }
+
+      if (!(f->flags & VERS_UPDATE_UNVERSIONED_FLAG) && !is_dup)
+        versioned_fields++;
+      fieldnr++;
+    }
+    if (versioned_fields == VERSIONING_FIELDS)
+    {
+      my_error(ER_VERS_TABLE_MUST_HAVE_COLUMNS, MYF(0), table_name.str);
+      return true;
+    }
+  }
+
+  if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING))
+    return false;
+
+  bool can_native= ha_check_storage_engine_flag(db_type,
+                                                HTON_NATIVE_SYS_VERSIONING)
+                   || db_type->db_type == DB_TYPE_PARTITION_DB;
+
+  return vers_info.check_sys_fields(table_name, db, alter_info, can_native);
 }
 
 
@@ -7284,13 +7302,15 @@
     return false;
   }
 
+  if (!(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING))
   {
     List_iterator_fast it(alter_info->create_list);
     while (Create_field *f= it++)
     {
-      if (f->change.length && f->flags & VERS_SYSTEM_FIELD)
+      if (f->flags & VERS_SYSTEM_FIELD)
       {
-        my_error(ER_VERS_ALTER_SYSTEM_FIELD, MYF(0), f->field_name.str);
+        my_error(ER_VERS_DUPLICATE_ROW_START_END, MYF(0),
+                 f->flags & VERS_SYS_START_FLAG ? "START" : "END", f->field_name.str);
         return true;
       }
     }
@@ -7343,20 +7363,7 @@
     return false;
   }
 
-  if (fix_implicit(thd, alter_info))
-    return true;
-
-  if (alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING)
-  {
-    const bool can_native=
-        ha_check_storage_engine_flag(create_info->db_type,
-                                     HTON_NATIVE_SYS_VERSIONING) ||
-        create_info->db_type->db_type == DB_TYPE_PARTITION_DB;
-    if (check_sys_fields(table_name, share->db, alter_info, can_native))
-      return true;
-  }
-
-  return false;
+  return fix_implicit(thd, alter_info);
 }
 
 bool
diff -Nru mariadb-10.3-10.3.18/sql/handler.h mariadb-10.3-10.3.22/sql/handler.h
--- mariadb-10.3-10.3.18/sql/handler.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/handler.h	2020-01-26 18:37:29.000000000 +0000
@@ -1490,9 +1490,9 @@
      Used by open_table_error(), by the default rename_table and delete_table
      handler methods, and by the default discovery implementation.
   
-     For engines that have more than one file name extentions (separate
+     For engines that have more than one file name extensions (separate
      metadata, index, and/or data files), the order of elements is relevant.
-     First element of engine file name extentions array should be metadata
+     First element of engine file name extensions array should be metadata
      file extention. This is implied by the open_table_error()
      and the default discovery implementation.
      
@@ -2104,11 +2104,12 @@
   }
 
   bool vers_fix_system_fields(THD *thd, Alter_info *alter_info,
-                         const TABLE_LIST &create_table,
-                         bool create_select= false);
+                         const TABLE_LIST &create_table);
 
   bool vers_check_system_fields(THD *thd, Alter_info *alter_info,
-                                const TABLE_LIST &create_table);
+                                const Lex_table_name &table_name,
+                                const Lex_table_name &db,
+                                int select_count= 0);
 
 };
 
@@ -3007,6 +3008,10 @@
   */
   Handler_share **ha_share;
 
+  /** Stores next_insert_id for handling duplicate key errors. */
+  ulonglong m_prev_insert_id;
+
+
 public:
   handler(handlerton *ht_arg, TABLE_SHARE *share_arg)
     :table_share(share_arg), table(0),
@@ -3029,7 +3034,7 @@
     auto_inc_intervals_count(0),
     m_psi(NULL), set_top_table_fields(FALSE), top_table(0),
     top_table_field(0), top_table_fields(0),
-    m_lock_type(F_UNLCK), ha_share(NULL)
+    m_lock_type(F_UNLCK), ha_share(NULL), m_prev_insert_id(0)
   {
     DBUG_PRINT("info",
                ("handler created F_UNLCK %d F_RDLCK %d F_WRLCK %d",
@@ -3683,7 +3688,7 @@
     DBUG_PRINT("info",("auto_increment: next value %lu", (ulong)id));
     next_insert_id= id;
   }
-  void restore_auto_increment(ulonglong prev_insert_id)
+  virtual void restore_auto_increment(ulonglong prev_insert_id)
   {
     /*
       Insertion of a row failed, re-use the lastly generated auto_increment
@@ -3699,6 +3704,16 @@
       insert_id_for_cur_row;
   }
 
+  /** Store and restore next_insert_id over duplicate key errors. */
+  virtual void store_auto_increment()
+  {
+    m_prev_insert_id= next_insert_id;
+  }
+  virtual void restore_auto_increment()
+  {
+    restore_auto_increment(m_prev_insert_id);
+  }
+
   virtual void update_create_info(HA_CREATE_INFO *create_info) {}
   int check_old_types();
   virtual int assign_to_keycache(THD* thd, HA_CHECK_OPT* check_opt)
diff -Nru mariadb-10.3-10.3.18/sql/item.cc mariadb-10.3-10.3.22/sql/item.cc
--- mariadb-10.3-10.3.18/sql/item.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2797,7 +2797,7 @@
       
    @retval
      clone of the item
-     0 if an error occured
+     0 if an error occurred
 */ 
 
 Item* Item_func_or_sum::build_clone(THD *thd)
@@ -3097,7 +3097,7 @@
       
    @retval
      clone of the item
-     0 if an error occured
+     0 if an error occurred
 */ 
 
 Item* Item_ref::build_clone(THD *thd)
@@ -3461,12 +3461,13 @@
 
 bool Item_field::get_date_result(MYSQL_TIME *ltime, ulonglong fuzzydate)
 {
-  if (result_field->is_null() || result_field->get_date(ltime,fuzzydate))
+  if ((null_value= result_field->is_null()) ||
+      result_field->get_date(ltime, fuzzydate))
   {
     bzero((char*) ltime,sizeof(*ltime));
-    return (null_value= 1);
+    return true;
   }
-  return (null_value= 0);
+  return false;
 }
 
 
@@ -8404,7 +8405,7 @@
 longlong Item_ref::val_datetime_packed()
 {
   DBUG_ASSERT(fixed);
-  longlong tmp= (*ref)->val_datetime_packed();
+  longlong tmp= (*ref)->val_datetime_packed_result();
   null_value= (*ref)->null_value;
   return tmp;
 }
@@ -8413,7 +8414,7 @@
 longlong Item_ref::val_time_packed()
 {
   DBUG_ASSERT(fixed);
-  longlong tmp= (*ref)->val_time_packed();
+  longlong tmp= (*ref)->val_time_packed_result();
   null_value= (*ref)->null_value;
   return tmp;
 }
@@ -9250,6 +9251,46 @@
 }
 
 
+double Item_direct_view_ref::val_result()
+{
+  double tmp=(*ref)->val_result();
+  null_value=(*ref)->null_value;
+  return tmp;
+}
+
+
+longlong Item_direct_view_ref::val_int_result()
+{
+  longlong tmp=(*ref)->val_int_result();
+  null_value=(*ref)->null_value;
+  return tmp;
+}
+
+
+String *Item_direct_view_ref::str_result(String* tmp)
+{
+  tmp=(*ref)->str_result(tmp);
+  null_value=(*ref)->null_value;
+  return tmp;
+}
+
+
+my_decimal *Item_direct_view_ref::val_decimal_result(my_decimal *val)
+{
+  my_decimal *tmp= (*ref)->val_decimal_result(val);
+  null_value=(*ref)->null_value;
+  return tmp;
+}
+
+
+bool Item_direct_view_ref::val_bool_result()
+{
+  bool tmp= (*ref)->val_bool_result();
+  null_value=(*ref)->null_value;
+  return tmp;
+}
+
+
 bool Item_default_value::eq(const Item *item, bool binary_cmp) const
 {
   return item->type() == DEFAULT_VALUE_ITEM && 
@@ -10318,6 +10359,8 @@
     value_buff.copy(*value);
     value= &value_buff;
   }
+  else
+    value_buff.copy();
   return TRUE;
 }
 
diff -Nru mariadb-10.3-10.3.18/sql/item.h mariadb-10.3-10.3.22/sql/item.h
--- mariadb-10.3-10.3.18/sql/item.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item.h	2020-01-26 18:37:29.000000000 +0000
@@ -5392,6 +5392,15 @@
     item_equal= NULL;
     Item_direct_ref::cleanup();
   }
+  /*
+    TODO move these val_*_result function to Item_dierct_ref (maybe)
+  */
+  double val_result();
+  longlong val_int_result();
+  String *str_result(String* tmp);
+  my_decimal *val_decimal_result(my_decimal *val);
+  bool val_bool_result();
+
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
 };
diff -Nru mariadb-10.3-10.3.18/sql/item_cmpfunc.cc mariadb-10.3-10.3.22/sql/item_cmpfunc.cc
--- mariadb-10.3-10.3.18/sql/item_cmpfunc.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_cmpfunc.cc	2020-01-26 18:37:29.000000000 +0000
@@ -345,11 +345,9 @@
     TABLE *table= field->table;
     sql_mode_t orig_sql_mode= thd->variables.sql_mode;
     enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields;
-    my_bitmap_map *old_maps[2];
+    my_bitmap_map *old_maps[2] = { NULL, NULL };
     ulonglong UNINIT_VAR(orig_field_val); /* original field value if valid */
 
-    LINT_INIT_STRUCT(old_maps);
-
     /* table->read_set may not be set if we come here from a CREATE TABLE */
     if (table && table->read_set)
       dbug_tmp_use_all_columns(table, old_maps, 
@@ -4978,7 +4976,7 @@
       
    @retval
      clone of the item
-     0 if an error occured
+     0 if an error occurred
 */ 
 
 Item *Item_cond::build_clone(THD *thd)
diff -Nru mariadb-10.3-10.3.18/sql/item_cmpfunc.h mariadb-10.3-10.3.22/sql/item_cmpfunc.h
--- mariadb-10.3-10.3.18/sql/item_cmpfunc.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_cmpfunc.h	2020-01-26 18:37:29.000000000 +0000
@@ -2418,6 +2418,7 @@
   bool to_be_transformed_into_in_subq(THD *thd);
   bool create_value_list_for_tvc(THD *thd, List< List > *values);
   Item *in_predicate_to_in_subs_transformer(THD *thd, uchar *arg);
+  uint32 max_length_of_left_expr();
 };
 
 class cmp_item_row :public cmp_item
@@ -2611,7 +2612,6 @@
 
   bool escape_used_in_parsing;
   bool use_sampling;
-  bool negated;
 
   DTCollation cmp_collation;
   String cmp_value1, cmp_value2;
@@ -2628,6 +2628,7 @@
                        Item_func::Functype type, Item *value);
 public:
   int escape;
+  bool negated;
 
   Item_func_like(THD *thd, Item *a, Item *b, Item *escape_arg, bool escape_used):
     Item_bool_func2(thd, a, b), canDoTurboBM(FALSE), pattern(0), pattern_len(0),
diff -Nru mariadb-10.3-10.3.18/sql/item_func.cc mariadb-10.3-10.3.22/sql/item_func.cc
--- mariadb-10.3-10.3.18/sql/item_func.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_func.cc	2020-01-26 18:37:29.000000000 +0000
@@ -123,7 +123,8 @@
     arg_count= 0;
     return;
   }
-  memcpy(args, other->args, sizeof(Item*) * arg_count);
+  if (arg_count)
+    memcpy(args, other->args, sizeof(Item*) * arg_count);
 }
 
 
@@ -1338,17 +1339,22 @@
   if (Item_func_minus::type_handler()->Item_func_minus_fix_length_and_dec(this))
     DBUG_RETURN(TRUE);
   DBUG_PRINT("info", ("Type: %s", type_handler()->name().ptr()));
-  m_sql_mode_dependency= Item_func::value_depends_on_sql_mode();
-  if (unsigned_flag)
-  {
-    m_sql_mode_dependency|= Sql_mode_dependency(0,MODE_NO_UNSIGNED_SUBTRACTION);
-    if (current_thd->variables.sql_mode & MODE_NO_UNSIGNED_SUBTRACTION)
-      unsigned_flag= false;
-  }
+  if ((m_depends_on_sql_mode_no_unsigned_subtraction= unsigned_flag) &&
+      (current_thd->variables.sql_mode & MODE_NO_UNSIGNED_SUBTRACTION))
+    unsigned_flag= false;
   DBUG_RETURN(FALSE);
 }
 
 
+Sql_mode_dependency Item_func_minus::value_depends_on_sql_mode() const
+{
+  Sql_mode_dependency dep= Item_func_additive_op::value_depends_on_sql_mode();
+  if (m_depends_on_sql_mode_no_unsigned_subtraction)
+    dep|= Sql_mode_dependency(0, MODE_NO_UNSIGNED_SUBTRACTION);
+  return dep;
+}
+
+
 double Item_func_minus::real_op()
 {
   double value= args[0]->val_real() - args[1]->val_real();
@@ -1849,8 +1855,11 @@
 
 void Item_func_mod::result_precision()
 {
+  unsigned_flag= args[0]->unsigned_flag;
   decimals= MY_MAX(args[0]->decimal_scale(), args[1]->decimal_scale());
-  max_length= MY_MAX(args[0]->max_length, args[1]->max_length);
+  uint prec= MY_MAX(args[0]->decimal_precision(), args[1]->decimal_precision());
+  fix_char_length(my_decimal_precision_to_length_no_truncation(prec, decimals,
+                                                               unsigned_flag));
 }
 
 
diff -Nru mariadb-10.3-10.3.18/sql/item_func.h mariadb-10.3-10.3.22/sql/item_func.h
--- mariadb-10.3-10.3.18/sql/item_func.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_func.h	2020-01-26 18:37:29.000000000 +0000
@@ -1095,16 +1095,15 @@
 
 class Item_func_minus :public Item_func_additive_op
 {
-  Sql_mode_dependency m_sql_mode_dependency;
+  bool m_depends_on_sql_mode_no_unsigned_subtraction;
 public:
   Item_func_minus(THD *thd, Item *a, Item *b):
-    Item_func_additive_op(thd, a, b) {}
+    Item_func_additive_op(thd, a, b),
+    m_depends_on_sql_mode_no_unsigned_subtraction(false)
+  { }
   const char *func_name() const { return "-"; }
   enum precedence precedence() const { return ADD_PRECEDENCE; }
-  Sql_mode_dependency value_depends_on_sql_mode() const
-  {
-    return m_sql_mode_dependency;
-  }
+  Sql_mode_dependency value_depends_on_sql_mode() const;
   longlong int_op();
   double real_op();
   my_decimal *decimal_op(my_decimal *);
@@ -1210,14 +1209,13 @@
   }
   void fix_length_and_dec_decimal()
   {
-    Item_num_op::fix_length_and_dec_decimal();
-    unsigned_flag= args[0]->unsigned_flag;
+    result_precision();
+    fix_decimals();
   }
   void fix_length_and_dec_int()
   {
-    max_length= MY_MAX(args[0]->max_length, args[1]->max_length);
-    decimals= 0;
-    unsigned_flag= args[0]->unsigned_flag;
+    result_precision();
+    DBUG_ASSERT(decimals == 0);
     set_handler(type_handler_long_or_longlong());
   }
   bool check_partition_func_processor(void *int_arg) {return FALSE;}
diff -Nru mariadb-10.3-10.3.18/sql/item_strfunc.cc mariadb-10.3-10.3.22/sql/item_strfunc.cc
--- mariadb-10.3-10.3.18/sql/item_strfunc.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_strfunc.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2404,7 +2404,7 @@
               system_charset_info);
     return str;
   }
-  str->copy(STRING_WITH_LEN("normal, successful completition"),
+  str->copy(STRING_WITH_LEN("normal, successful completion"),
             system_charset_info);
   return str;
 }
diff -Nru mariadb-10.3-10.3.18/sql/item_sum.cc mariadb-10.3-10.3.22/sql/item_sum.cc
--- mariadb-10.3-10.3.18/sql/item_sum.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_sum.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1094,19 +1094,6 @@
 
 
 String *
-Item_sum_num::val_str(String *str)
-{
-  return val_string_from_real(str);
-}
-
-
-my_decimal *Item_sum_num::val_decimal(my_decimal *decimal_value)
-{
-  return val_decimal_from_real(decimal_value);
-}
-
-
-String *
 Item_sum_int::val_str(String *str)
 {
   return val_string_from_int(str);
@@ -2188,7 +2175,7 @@
 
 
 Item_sum_variance::Item_sum_variance(THD *thd, Item_sum_variance *item):
-  Item_sum_num(thd, item),
+  Item_sum_double(thd, item),
     count(item->count), sample(item->sample),
     prec_increment(item->prec_increment)
 {
@@ -2314,13 +2301,6 @@
 }
 
 
-my_decimal *Item_sum_variance::val_decimal(my_decimal *dec_buf)
-{
-  DBUG_ASSERT(fixed == 1);
-  return val_decimal_from_real(dec_buf);
-}
-
-
 void Item_sum_variance::reset_field()
 {
   double nr;
diff -Nru mariadb-10.3-10.3.18/sql/item_sum.h mariadb-10.3-10.3.22/sql/item_sum.h
--- mariadb-10.3-10.3.18/sql/item_sum.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_sum.h	2020-01-26 18:37:29.000000000 +0000
@@ -578,6 +578,7 @@
   void mark_as_window_func_sum_expr() { window_func_sum_expr_flag= true; }
   bool is_window_func_sum_expr() { return window_func_sum_expr_flag; }
   virtual void setup_caches(THD *thd) {};
+  virtual void set_partition_row_count(ulonglong count) { DBUG_ASSERT(0); }
 };
 
 
@@ -713,33 +714,45 @@
 
 class Item_sum_num :public Item_sum
 {
-protected:
-  /*
-   val_xxx() functions may be called several times during the execution of a 
-   query. Derived classes that require extensive calculation in val_xxx()
-   maintain cache of aggregate value. This variable governs the validity of 
-   that cache.
-  */
-  bool is_evaluated;
 public:
-  Item_sum_num(THD *thd): Item_sum(thd), is_evaluated(FALSE) {}
+  Item_sum_num(THD *thd): Item_sum(thd) {}
   Item_sum_num(THD *thd, Item *item_par):
-    Item_sum(thd, item_par), is_evaluated(FALSE) {}
+    Item_sum(thd, item_par) {}
   Item_sum_num(THD *thd, Item *a, Item* b):
-    Item_sum(thd, a, b), is_evaluated(FALSE) {}
+    Item_sum(thd, a, b) {}
   Item_sum_num(THD *thd, List &list):
-    Item_sum(thd, list), is_evaluated(FALSE) {}
+    Item_sum(thd, list) {}
   Item_sum_num(THD *thd, Item_sum_num *item):
-    Item_sum(thd, item),is_evaluated(item->is_evaluated) {}
+    Item_sum(thd, item) {}
   bool fix_fields(THD *, Item **);
-  longlong val_int() { return val_int_from_real();  /* Real as default */ }
-  String *val_str(String*str);
-  my_decimal *val_decimal(my_decimal *);
+  void reset_field();
+};
+
+
+class Item_sum_double :public Item_sum_num
+{
+public:
+  Item_sum_double(THD *thd): Item_sum_num(thd) {}
+  Item_sum_double(THD *thd, Item *item_par): Item_sum_num(thd, item_par) {}
+  Item_sum_double(THD *thd, List &list): Item_sum_num(thd, list) {}
+  Item_sum_double(THD *thd, Item_sum_double *item) :Item_sum_num(thd, item) {}
+  longlong val_int()
+  {
+    return val_int_from_real();
+  }
+  String *val_str(String*str)
+  {
+    return val_string_from_real(str);
+  }
+  my_decimal *val_decimal(my_decimal *to)
+  {
+    return val_decimal_from_real(to);
+  }
   bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
   {
-    return type_handler()->Item_get_date(this, ltime, fuzzydate);
+    return get_date_from_real(ltime, fuzzydate);
   }
-  void reset_field();
+  const Type_handler *type_handler() const { return &type_handler_double; }
 };
 
 
@@ -753,6 +766,10 @@
   double val_real() { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
   String *val_str(String*str);
   my_decimal *val_decimal(my_decimal *);
+  bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+  {
+    return get_date_from_int(ltime, fuzzydate);
+  }
   const Type_handler *type_handler() const { return &type_handler_longlong; }
   bool fix_length_and_dec()
   { decimals=0; max_length=21; maybe_null=null_value=0; return FALSE; }
@@ -794,6 +811,10 @@
   longlong val_int();
   String *val_str(String*str);
   my_decimal *val_decimal(my_decimal *);
+  bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+  {
+    return type_handler()->Item_get_date(this, ltime, fuzzydate);
+  }
   const Type_handler *type_handler() const
   { return Type_handler_hybrid_field_type::type_handler(); }
   void fix_length_and_dec_double();
@@ -964,7 +985,7 @@
 
 */
 
-class Item_sum_variance : public Item_sum_num
+class Item_sum_variance : public Item_sum_double
 {
   bool fix_length_and_dec();
 
@@ -975,7 +996,7 @@
   uint prec_increment;
 
   Item_sum_variance(THD *thd, Item *item_par, uint sample_arg):
-    Item_sum_num(thd, item_par), count(0),
+    Item_sum_double(thd, item_par), count(0),
     sample(sample_arg)
     {}
   Item_sum_variance(THD *thd, Item_sum_variance *item);
@@ -985,7 +1006,6 @@
   void clear();
   bool add();
   double val_real();
-  my_decimal *val_decimal(my_decimal *);
   void reset_field();
   void update_field();
   Item *result_item(THD *thd, Field *field);
@@ -994,11 +1014,10 @@
     { return sample ? "var_samp(" : "variance("; }
   Item *copy_or_same(THD* thd);
   Field *create_tmp_field(bool group, TABLE *table);
-  const Type_handler *type_handler() const { return &type_handler_double; }
   void cleanup()
   {
     count= 0;
-    Item_sum_num::cleanup();
+    Item_sum_double::cleanup();
   }
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
@@ -1679,15 +1698,15 @@
 
 #else /* Dummy functions to get sql_yacc.cc compiled */
 
-class Item_sum_udf_float :public Item_sum_num
+class Item_sum_udf_float :public Item_sum_double
 {
  public:
   Item_sum_udf_float(THD *thd, udf_func *udf_arg):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_float(THD *thd, udf_func *udf_arg, List &list):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_float(THD *thd, Item_sum_udf_float *item)
-    :Item_sum_num(thd, item) {}
+    :Item_sum_double(thd, item) {}
   enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; }
   double val_real() { DBUG_ASSERT(fixed == 1); return 0.0; }
   void clear() {}
@@ -1696,15 +1715,15 @@
 };
 
 
-class Item_sum_udf_int :public Item_sum_num
+class Item_sum_udf_int :public Item_sum_double
 {
 public:
   Item_sum_udf_int(THD *thd, udf_func *udf_arg):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_int(THD *thd, udf_func *udf_arg, List &list):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_int(THD *thd, Item_sum_udf_int *item)
-    :Item_sum_num(thd, item) {}
+    :Item_sum_double(thd, item) {}
   enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; }
   longlong val_int() { DBUG_ASSERT(fixed == 1); return 0; }
   double val_real() { DBUG_ASSERT(fixed == 1); return 0; }
@@ -1714,15 +1733,15 @@
 };
 
 
-class Item_sum_udf_decimal :public Item_sum_num
+class Item_sum_udf_decimal :public Item_sum_double
 {
  public:
   Item_sum_udf_decimal(THD *thd, udf_func *udf_arg):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_decimal(THD *thd, udf_func *udf_arg, List &list):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_decimal(THD *thd, Item_sum_udf_float *item)
-    :Item_sum_num(thd, item) {}
+    :Item_sum_double(thd, item) {}
   enum Sumfunctype sum_func () const { return UDF_SUM_FUNC; }
   double val_real() { DBUG_ASSERT(fixed == 1); return 0.0; }
   my_decimal *val_decimal(my_decimal *) { DBUG_ASSERT(fixed == 1); return 0; }
@@ -1732,15 +1751,15 @@
 };
 
 
-class Item_sum_udf_str :public Item_sum_num
+class Item_sum_udf_str :public Item_sum_double
 {
 public:
   Item_sum_udf_str(THD *thd, udf_func *udf_arg):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_str(THD *thd, udf_func *udf_arg, List &list):
-    Item_sum_num(thd) {}
+    Item_sum_double(thd) {}
   Item_sum_udf_str(THD *thd, Item_sum_udf_str *item)
-    :Item_sum_num(thd, item) {}
+    :Item_sum_double(thd, item) {}
   String *val_str(String *)
     { DBUG_ASSERT(fixed == 1); null_value=1; return 0; }
   double val_real() { DBUG_ASSERT(fixed == 1); null_value=1; return 0.0; }
diff -Nru mariadb-10.3-10.3.18/sql/item_timefunc.cc mariadb-10.3-10.3.22/sql/item_timefunc.cc
--- mariadb-10.3-10.3.18/sql/item_timefunc.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_timefunc.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1094,14 +1094,10 @@
 longlong Item_func_weekday::val_int()
 {
   DBUG_ASSERT(fixed == 1);
-  MYSQL_TIME ltime;
-  
-  if (get_arg0_date(<ime, TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE))
+  Datetime dt(current_thd, args[0], TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE);
+  if ((null_value= !dt.is_valid_datetime()))
     return 0;
-
-  return (longlong) calc_weekday(calc_daynr(ltime.year, ltime.month,
-                                            ltime.day),
-                                 odbc_type) + MY_TEST(odbc_type);
+  return dt.weekday(odbc_type) + MY_TEST(odbc_type);
 }
 
 bool Item_func_dayname::fix_length_and_dec()
@@ -1120,14 +1116,14 @@
 String* Item_func_dayname::val_str(String* str)
 {
   DBUG_ASSERT(fixed == 1);
-  uint weekday=(uint) val_int();		// Always Item_func_weekday()
   const char *day_name;
   uint err;
+  Datetime dt(current_thd, args[0], TIME_NO_ZERO_DATE | TIME_NO_ZERO_IN_DATE);
 
-  if (null_value)
+  if ((null_value= !dt.is_valid_datetime()))
     return (String*) 0;
   
-  day_name= locale->day_names->type_names[weekday];
+  day_name= locale->day_names->type_names[dt.weekday(false)];
   str->copy(day_name, (uint) strlen(day_name), &my_charset_utf8_bin,
 	    collation.collation, &err);
   return str;
diff -Nru mariadb-10.3-10.3.18/sql/item_timefunc.h mariadb-10.3-10.3.22/sql/item_timefunc.h
--- mariadb-10.3-10.3.18/sql/item_timefunc.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_timefunc.h	2020-01-26 18:37:29.000000000 +0000
@@ -170,28 +170,13 @@
 };
 
 
-class Item_func_month :public Item_func
+class Item_func_month :public Item_long_func
 {
 public:
-  Item_func_month(THD *thd, Item *a): Item_func(thd, a)
-  { collation.set_numeric(); }
+  Item_func_month(THD *thd, Item *a): Item_long_func(thd, a)
+  { }
   longlong val_int();
-  double val_real()
-  { DBUG_ASSERT(fixed == 1); return (double) Item_func_month::val_int(); }
-  String *val_str(String *str)
-  {
-    longlong nr= val_int();
-    if (null_value)
-      return 0;
-    str->set(nr, collation.collation);
-    return str;
-  }
-  bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
-  {
-    return get_date_from_int(ltime, fuzzydate);
-  }
   const char *func_name() const { return "month"; }
-  const Type_handler *type_handler() const { return &type_handler_long; }
   bool fix_length_and_dec()
   {
     decimals= 0;
@@ -441,20 +426,13 @@
 };
 
 
-class Item_func_weekday :public Item_func
+class Item_func_weekday :public Item_long_func
 {
   bool odbc_type;
 public:
   Item_func_weekday(THD *thd, Item *a, bool type_arg):
-    Item_func(thd, a), odbc_type(type_arg) { collation.set_numeric(); }
+    Item_long_func(thd, a), odbc_type(type_arg) { }
   longlong val_int();
-  double val_real() { DBUG_ASSERT(fixed == 1); return (double) val_int(); }
-  String *val_str(String *str)
-  {
-    DBUG_ASSERT(fixed == 1);
-    str->set(val_int(), &my_charset_bin);
-    return null_value ? 0 : str;
-  }
   const char *func_name() const
   {
      return (odbc_type ? "dayofweek" : "weekday");
@@ -463,7 +441,6 @@
   {
     return type_handler()->Item_get_date(this, ltime, fuzzydate);
   }
-  const Type_handler *type_handler() const { return &type_handler_long; }
   bool fix_length_and_dec()
   {
     decimals= 0;
@@ -481,11 +458,11 @@
   { return get_item_copy(thd, this); }
 };
 
-class Item_func_dayname :public Item_func_weekday
+class Item_func_dayname :public Item_str_func
 {
   MY_LOCALE *locale;
  public:
-  Item_func_dayname(THD *thd, Item *a): Item_func_weekday(thd, a, 0) {}
+  Item_func_dayname(THD *thd, Item *a): Item_str_func(thd, a) {}
   const char *func_name() const { return "dayname"; }
   String *val_str(String *str);
   const Type_handler *type_handler() const { return &type_handler_varchar; }
@@ -495,6 +472,12 @@
   {
     return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
   }
+  bool check_valid_arguments_processor(void *int_arg)
+  {
+    return !has_date_args();
+  }
+  Item *get_copy(THD *thd)
+  { return get_item_copy(thd, this); }
 };
 
 
@@ -918,6 +901,10 @@
   const char *func_name() const { return "from_unixtime"; }
   bool fix_length_and_dec();
   bool get_date(MYSQL_TIME *res, ulonglong fuzzy_date);
+  bool check_vcol_func_processor(void *arg)
+  {
+    return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
+  }
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
 };
diff -Nru mariadb-10.3-10.3.18/sql/item_windowfunc.h mariadb-10.3-10.3.22/sql/item_windowfunc.h
--- mariadb-10.3-10.3.18/sql/item_windowfunc.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/item_windowfunc.h	2020-01-26 18:37:29.000000000 +0000
@@ -438,27 +438,38 @@
   { return get_item_copy(thd, this); }
 };
 
-/*
-  A base window function (aggregate) that also holds a counter for the number
-  of rows.
-*/
-class Item_sum_window_with_row_count : public Item_sum_num
-{
- public:
-  Item_sum_window_with_row_count(THD *thd) : Item_sum_num(thd),
-                                             partition_row_count_(0) {}
-
-  Item_sum_window_with_row_count(THD *thd, Item *arg) :
-    Item_sum_num(thd, arg), partition_row_count_(0) {};
 
-  void set_row_count(ulonglong count) { partition_row_count_ = count; }
-
- protected:
+class Partition_row_count
+{
+public:
+  Partition_row_count() :partition_row_count_(0) { }
+  void set_partition_row_count(ulonglong count)
+  {
+    partition_row_count_ = count;
+  }
+  double calc_val_real(bool *null_value,
+                       ulonglong current_row_count)
+  {
+    if ((*null_value= (partition_row_count_ == 0)))
+      return 0;
+    return static_cast(current_row_count) / partition_row_count_;
+  }
+protected:
   longlong get_row_count() { return partition_row_count_; }
- private:
   ulonglong partition_row_count_;
 };
 
+
+class Current_row_count
+{
+public:
+  Current_row_count() :current_row_count_(0) { }
+protected:
+  ulonglong get_row_number() { return current_row_count_ ; }
+  ulonglong current_row_count_;
+};
+
+
 /*
   @detail
   "The relative rank of a row R is defined as (RK-1)/(NR-1), where RK is 
@@ -470,11 +481,12 @@
     This is held within the row_count context.
   - Second pass to compute rank of current row and the value of the function
 */
-class Item_sum_percent_rank: public Item_sum_window_with_row_count
+class Item_sum_percent_rank: public Item_sum_double,
+                             public Partition_row_count
 {
  public:
   Item_sum_percent_rank(THD *thd)
-    : Item_sum_window_with_row_count(thd), cur_rank(1), peer_tracker(NULL) {}
+    : Item_sum_double(thd), cur_rank(1), peer_tracker(NULL) {}
 
   longlong val_int()
   {
@@ -527,6 +539,12 @@
   }
 
   void setup_window_func(THD *thd, Window_spec *window_spec);
+
+  void set_partition_row_count(ulonglong count)
+  {
+    Partition_row_count::set_partition_row_count(count);
+  }
+
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
 
@@ -561,25 +579,17 @@
   two passes.
 */
 
-class Item_sum_cume_dist: public Item_sum_window_with_row_count
+class Item_sum_cume_dist: public Item_sum_double,
+                          public Partition_row_count,
+                          public Current_row_count
 {
  public:
-  Item_sum_cume_dist(THD *thd) : Item_sum_window_with_row_count(thd),
-                                 current_row_count_(0) {}
-
-  Item_sum_cume_dist(THD *thd, Item *arg) : Item_sum_window_with_row_count(thd,arg),
-                                 current_row_count_(0) {}
+  Item_sum_cume_dist(THD *thd) :Item_sum_double(thd) { }
+  Item_sum_cume_dist(THD *thd, Item *arg) :Item_sum_double(thd, arg) { }
 
   double val_real()
   {
-    if (get_row_count() == 0)
-    {
-      null_value= true;
-      return 0;
-    }
-    ulonglong partition_row_count= get_row_count();
-    null_value= false;
-    return static_cast(current_row_count_) / partition_row_count;
+    return calc_val_real(&null_value, current_row_count_);
   }
 
   bool add()
@@ -596,7 +606,7 @@
   void clear()
   {
     current_row_count_= 0;
-    set_row_count(0);
+    partition_row_count_= 0;
   }
 
   const char*func_name() const
@@ -614,29 +624,24 @@
     return FALSE;
   }
   
-  Item *get_copy(THD *thd)
-  { return get_item_copy(thd, this); }
-
-  ulonglong get_row_number()
+  void set_partition_row_count(ulonglong count)
   {
-    return current_row_count_ ;
+    Partition_row_count::set_partition_row_count(count);
   }
 
- private:
-  ulonglong current_row_count_;
+  Item *get_copy(THD *thd)
+  { return get_item_copy(thd, this); }
+
 };
 
-class Item_sum_ntile : public Item_sum_window_with_row_count
+class Item_sum_ntile : public Item_sum_int,
+                       public Partition_row_count,
+                       public Current_row_count
 {
  public:
   Item_sum_ntile(THD* thd, Item* num_quantiles_expr) :
-    Item_sum_window_with_row_count(thd, num_quantiles_expr),
-    current_row_count_(0) {};
-
-  double val_real()
-  {
-    return (double) val_int();
-  }
+    Item_sum_int(thd, num_quantiles_expr)
+  { }
 
   longlong val_int()
   {
@@ -677,7 +682,7 @@
   void clear()
   {
     current_row_count_= 0;
-    set_row_count(0);
+    partition_row_count_= 0;
   }
 
   const char*func_name() const
@@ -687,21 +692,25 @@
 
   void update_field() {}
 
-  const Type_handler *type_handler() const { return &type_handler_longlong; }
-  
+  void set_partition_row_count(ulonglong count)
+  {
+    Partition_row_count::set_partition_row_count(count);
+  }
+
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
 
  private:
   longlong get_num_quantiles() { return args[0]->val_int(); }
-  ulong current_row_count_;
 };
 
-class Item_sum_percentile_disc : public Item_sum_cume_dist,
-                                 public Type_handler_hybrid_field_type
+class Item_sum_percentile_disc : public Item_sum_num,
+                                 public Type_handler_hybrid_field_type,
+                                 public Partition_row_count,
+                                 public Current_row_count
 {
 public:
-  Item_sum_percentile_disc(THD *thd, Item* arg) : Item_sum_cume_dist(thd, arg),
+  Item_sum_percentile_disc(THD *thd, Item* arg) : Item_sum_num(thd, arg),
                            Type_handler_hybrid_field_type(&type_handler_longlong),
                            value(NULL), val_calculated(FALSE), first_call(TRUE),
                            prev_value(0), order_item(NULL){}
@@ -750,6 +759,17 @@
     return value->val_str(str);
   }
 
+  bool get_date(MYSQL_TIME *ltime, ulonglong fuzzydate)
+  {
+    if (get_row_count() == 0 || get_arg(0)->is_null())
+    {
+      null_value= true;
+      return 0;
+    }
+    null_value= false;
+    return value->get_date(ltime, fuzzydate);
+  }
+
   bool add()
   {
     Item *arg= get_arg(0);
@@ -783,8 +803,8 @@
     if (value->null_value)
       return false;
 
-    Item_sum_cume_dist::add();
-    double val= Item_sum_cume_dist::val_real();
+    current_row_count_++;
+    double val= calc_val_real(&null_value, current_row_count_);
 
     if (val >= prev_value && !val_calculated)
       val_calculated= true;
@@ -801,7 +821,8 @@
     val_calculated= false;
     first_call= true;
     value->clear();
-    Item_sum_cume_dist::clear();
+    partition_row_count_= 0;
+    current_row_count_= 0;
   }
 
   const char*func_name() const
@@ -810,7 +831,6 @@
   }
 
   void update_field() {}
-  void set_type_handler(Window_spec *window_spec);
   const Type_handler *type_handler() const
   {return Type_handler_hybrid_field_type::type_handler();}
 
@@ -821,6 +841,11 @@
     return FALSE;
   }
 
+  void set_partition_row_count(ulonglong count)
+  {
+    Partition_row_count::set_partition_row_count(count);
+  }
+
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
   void setup_window_func(THD *thd, Window_spec *window_spec);
@@ -835,12 +860,12 @@
   Item *order_item;
 };
 
-class Item_sum_percentile_cont : public Item_sum_cume_dist,
-                                 public Type_handler_hybrid_field_type
+class Item_sum_percentile_cont : public Item_sum_double,
+                                 public Partition_row_count,
+                                 public Current_row_count
 {
 public:
-  Item_sum_percentile_cont(THD *thd, Item* arg) : Item_sum_cume_dist(thd, arg),
-                           Type_handler_hybrid_field_type(&type_handler_double),
+  Item_sum_percentile_cont(THD *thd, Item* arg) : Item_sum_double(thd, arg),
                            floor_value(NULL), ceil_value(NULL), first_call(TRUE),prev_value(0),
                            ceil_val_calculated(FALSE), floor_val_calculated(FALSE), order_item(NULL){}
 
@@ -910,7 +935,7 @@
         return false;
     }
 
-    Item_sum_cume_dist::add();
+    current_row_count_++;
     double val= 1 + prev_value * (get_row_count()-1);
 
     if (!floor_val_calculated && get_row_number() == floor(val))
@@ -933,7 +958,8 @@
     ceil_value->clear();
     floor_val_calculated= false;
     ceil_val_calculated= false;
-    Item_sum_cume_dist::clear();
+    partition_row_count_= 0;
+    current_row_count_= 0;
   }
 
   const char*func_name() const
@@ -941,9 +967,6 @@
     return "percentile_cont";
   }
   void update_field() {}
-  void set_type_handler(Window_spec *window_spec);
-  const Type_handler *type_handler() const
-  {return Type_handler_hybrid_field_type::type_handler();}
 
   bool fix_length_and_dec()
   {
@@ -952,6 +975,11 @@
     return FALSE;
   }
 
+  void set_partition_row_count(ulonglong count)
+  {
+    Partition_row_count::set_partition_row_count(count);
+  }
+
   Item *get_copy(THD *thd)
   { return get_item_copy(thd, this); }
   void setup_window_func(THD *thd, Window_spec *window_spec);
diff -Nru mariadb-10.3-10.3.18/sql/keycaches.cc mariadb-10.3-10.3.22/sql/keycaches.cc
--- mariadb-10.3-10.3.18/sql/keycaches.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/keycaches.cc	2020-01-26 18:37:29.000000000 +0000
@@ -68,7 +68,7 @@
 }
 
 
-bool NAMED_ILIST::delete_element(const char *name, size_t length, void (*free_element)(const char *name, uchar*))
+bool NAMED_ILIST::delete_element(const char *name, size_t length, void (*free_element)(const char *name, void*))
 {
   I_List_iterator it(*this);
   NAMED_ILINK *element;
@@ -85,7 +85,7 @@
   DBUG_RETURN(1);
 }
 
-void NAMED_ILIST::delete_elements(void (*free_element)(const char *name, uchar*))
+void NAMED_ILIST::delete_elements(void (*free_element)(const char *name, void*))
 {
   NAMED_ILINK *element;
   DBUG_ENTER("NAMED_ILIST::delete_elements");
@@ -157,9 +157,9 @@
 }
 
 
-void free_key_cache(const char *name, KEY_CACHE *key_cache)
+void free_key_cache(const char *name, void *key_cache)
 {
-  end_key_cache(key_cache, 1);		// Can never fail
+  end_key_cache(static_cast(key_cache), 1); // Can never fail
   my_free(key_cache);
 }
 
@@ -221,13 +221,12 @@
   return filter;
 }
 
-void free_rpl_filter(const char *name, Rpl_filter *filter)
+void free_rpl_filter(const char *name, void *filter)
 {
-  delete filter;
-  filter= 0;
+  delete static_cast(filter);
 }
 
 void free_all_rpl_filters()
 {
-  rpl_filters.delete_elements((void (*)(const char*, uchar*)) free_rpl_filter);
+  rpl_filters.delete_elements(free_rpl_filter);
 }
diff -Nru mariadb-10.3-10.3.18/sql/keycaches.h mariadb-10.3-10.3.22/sql/keycaches.h
--- mariadb-10.3-10.3.18/sql/keycaches.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/keycaches.h	2020-01-26 18:37:29.000000000 +0000
@@ -30,8 +30,8 @@
 class NAMED_ILIST: public I_List
 {
   public:
-  void delete_elements(void (*free_element)(const char*, uchar*));
-  bool delete_element(const char *name, size_t length, void (*free_element)(const char*, uchar*));
+  void delete_elements(void (*free_element)(const char*, void*));
+  bool delete_element(const char *name, size_t length, void (*free_element)(const char*, void*));
 };
 
 /* For key cache */
@@ -42,7 +42,7 @@
 KEY_CACHE *create_key_cache(const char *name, size_t length);
 KEY_CACHE *get_key_cache(const LEX_CSTRING *cache_name);
 KEY_CACHE *get_or_create_key_cache(const char *name, size_t length);
-void free_key_cache(const char *name, KEY_CACHE *key_cache);
+void free_key_cache(const char *name, void *key_cache);
 bool process_key_caches(process_key_cache_t func, void *param);
 
 /* For Rpl_filter */
@@ -52,7 +52,6 @@
 Rpl_filter *create_rpl_filter(const char *name, size_t length);
 Rpl_filter *get_rpl_filter(LEX_CSTRING *filter_name);
 Rpl_filter *get_or_create_rpl_filter(const char *name, size_t length);
-void free_rpl_filter(const char *name, Rpl_filter *filter);
 void free_all_rpl_filters(void);
 
 #endif /* KEYCACHES_INCLUDED */
diff -Nru mariadb-10.3-10.3.18/sql/lex.h mariadb-10.3-10.3.22/sql/lex.h
--- mariadb-10.3-10.3.18/sql/lex.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/lex.h	2020-01-26 18:37:29.000000000 +0000
@@ -23,7 +23,7 @@
 #include "lex_symbol.h"
 
 SYM_GROUP sym_group_common= {"", ""};
-SYM_GROUP sym_group_geom= {"Spatial extentions", "HAVE_SPATIAL"};
+SYM_GROUP sym_group_geom= {"Spatial extensions", "HAVE_SPATIAL"};
 SYM_GROUP sym_group_rtree= {"RTree keys", "HAVE_RTREE_KEYS"};
 
 /* We don't want to include sql_yacc.h into gen_lex_hash */
diff -Nru mariadb-10.3-10.3.18/sql/log.cc mariadb-10.3-10.3.22/sql/log.cc
--- mariadb-10.3-10.3.18/sql/log.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/log.cc	2020-01-26 18:37:29.000000000 +0000
@@ -484,6 +484,7 @@
   void truncate(my_off_t pos, bool reset_cache=0)
   {
     DBUG_PRINT("info", ("truncating to position %lu", (ulong) pos));
+    cache_log.error=0;
     if (pending())
     {
       delete pending();
@@ -492,7 +493,7 @@
     reinit_io_cache(&cache_log, WRITE_CACHE, pos, 0, reset_cache);
     cache_log.end_of_file= saved_max_binlog_cache_size;
   }
- 
+
   binlog_cache_data& operator=(const binlog_cache_data& info);
   binlog_cache_data(const binlog_cache_data& info);
 };
@@ -5909,7 +5910,6 @@
   DBUG_ASSERT(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open());
   DBUG_PRINT("enter", ("event: %p", event));
 
-  int error= 0;
   binlog_cache_mngr *const cache_mngr=
     (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
 
@@ -5947,7 +5947,7 @@
 
   thd->binlog_set_pending_rows_event(event, is_transactional);
 
-  DBUG_RETURN(error);
+  DBUG_RETURN(0);
 }
 
 
@@ -7691,7 +7691,7 @@
   mysql_mutex_unlock(&LOCK_prepare_ordered);
   DEBUG_SYNC(orig_entry->thd, "commit_after_release_LOCK_prepare_ordered");
 
-  DBUG_PRINT("info", ("Queued for group commit as %s\n",
+  DBUG_PRINT("info", ("Queued for group commit as %s",
                       (orig_queue == NULL) ? "leader" : "participant"));
   DBUG_RETURN(orig_queue == NULL);
 }
diff -Nru mariadb-10.3-10.3.18/sql/log_event.cc mariadb-10.3-10.3.22/sql/log_event.cc
--- mariadb-10.3-10.3.18/sql/log_event.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/log_event.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1058,9 +1058,14 @@
 
 uint32 binlog_get_uncompress_len(const char *buf)
 {
-  DBUG_ASSERT((buf[0] & 0xe0) == 0x80);
-  uint32 lenlen = buf[0] & 0x07;
   uint32 len = 0;
+  uint32 lenlen = 0;
+
+  if ((buf == NULL) || ((buf[0] & 0xe0) != 0x80))
+    return len;
+
+  lenlen = buf[0] & 0x07;
+
   switch(lenlen)
   {
   case 1:
@@ -2096,6 +2101,19 @@
          alg != BINLOG_CHECKSUM_ALG_OFF))
       event_len= event_len - BINLOG_CHECKSUM_LEN;
 
+    /*
+      Create an object of Ignorable_log_event for unrecognized sub-class.
+      So that SLAVE SQL THREAD will only update the position and continue.
+      We should look for this flag first instead of judging by event_type
+      Any event can be Ignorable_log_event if it has this flag on.
+      look into @note of Ignorable_log_event
+    */
+    if (uint2korr(buf + FLAGS_OFFSET) & LOG_EVENT_IGNORABLE_F)
+    {
+      ev= new Ignorable_log_event(buf, fdle,
+                                  get_type_str((Log_event_type) event_type));
+      goto exit;
+    }
     switch(event_type) {
     case QUERY_EVENT:
       ev  = new Query_log_event(buf, event_len, fdle, QUERY_EVENT);
@@ -2222,24 +2240,13 @@
       ev = new Start_encryption_log_event(buf, event_len, fdle);
       break;
     default:
-      /*
-        Create an object of Ignorable_log_event for unrecognized sub-class.
-        So that SLAVE SQL THREAD will only update the position and continue.
-      */
-      if (uint2korr(buf + FLAGS_OFFSET) & LOG_EVENT_IGNORABLE_F)
-      {
-        ev= new Ignorable_log_event(buf, fdle,
-                                    get_type_str((Log_event_type) event_type));
-      }
-      else
-      {
-        DBUG_PRINT("error",("Unknown event code: %d",
-                            (uchar) buf[EVENT_TYPE_OFFSET]));
-        ev= NULL;
-        break;
-      }
+      DBUG_PRINT("error",("Unknown event code: %d",
+                          (uchar) buf[EVENT_TYPE_OFFSET]));
+      ev= NULL;
+      break;
     }
   }
+exit:
 
   if (ev)
   {
@@ -3423,7 +3430,18 @@
   case MYSQL_TYPE_SET:
     return meta & 0xFF;
   case MYSQL_TYPE_BLOB:
-    return (meta <= 4 ? meta : 0);
+    switch (meta) {
+    default:
+      return 0;
+    case 1:
+      return *ptr + 1;
+    case 2:
+      return uint2korr(ptr) + 2;
+    case 3:
+      return uint3korr(ptr) + 3;
+    case 4:
+      return uint4korr(ptr) + 4;
+    }
   case MYSQL_TYPE_VARCHAR:
   case MYSQL_TYPE_VAR_STRING:
     length= meta;
@@ -4559,6 +4577,18 @@
 }
 #endif
 
+#define VALIDATE_BYTES_READ(CUR_POS, START, EVENT_LEN)      \
+  do {                                                      \
+       uchar *cur_pos= (uchar *)CUR_POS;                    \
+       uchar *start= (uchar *)START;                        \
+       uint len= EVENT_LEN;                                 \
+       uint bytes_read= (uint)(cur_pos - start);            \
+       DBUG_PRINT("info", ("Bytes read: %u event_len:%u.\n",\
+             bytes_read, len));                             \
+       if (bytes_read >= len)                               \
+         DBUG_VOID_RETURN;                                  \
+  } while (0)
+
 /**
    Macro to check that there is enough space to read from memory.
 
@@ -4569,7 +4599,6 @@
 #define CHECK_SPACE(PTR,END,CNT)                      \
   do {                                                \
     DBUG_PRINT("info", ("Read %s", code_name(pos[-1]))); \
-    DBUG_ASSERT((PTR) + (CNT) <= (END));              \
     if ((PTR) + (CNT) > (END)) {                      \
       DBUG_PRINT("info", ("query= 0"));               \
       query= 0;                                       \
@@ -4880,7 +4909,9 @@
 
   uint32 max_length= uint32(event_len - ((const char*)(end + db_len + 1) -
                                          (buf - common_header_len)));
-  if (q_len != max_length)
+  if (q_len != max_length ||
+      (event_len < uint((const char*)(end + db_len + 1) -
+                        (buf - common_header_len))))
   {
     q_len= 0;
     query= NULL;
@@ -7060,6 +7091,8 @@
 {
   DBUG_ENTER("Load_log_event::copy_log_event");
   uint data_len;
+  if ((int) event_len <= body_offset)
+    DBUG_RETURN(1);
   char* buf_end = (char*)buf + event_len;
   /* this is the beginning of the post-header */
   const char* data_head = buf + description_event->common_header_len;
@@ -7069,9 +7102,7 @@
   table_name_len = (uint)data_head[L_TBL_LEN_OFFSET];
   db_len = (uint)data_head[L_DB_LEN_OFFSET];
   num_fields = uint4korr(data_head + L_NUM_FIELDS_OFFSET);
-	  
-  if ((int) event_len < body_offset)
-    DBUG_RETURN(1);
+
   /*
     Sql_ex.init() on success returns the pointer to the first byte after
     the sql_ex structure, which is the start of field lengths array.
@@ -7080,7 +7111,7 @@
                                         buf_end,
                                         (uchar)buf[EVENT_TYPE_OFFSET] != LOAD_EVENT)))
     DBUG_RETURN(1);
-  
+
   data_len = event_len - body_offset;
   if (num_fields > data_len) // simple sanity check against corruption
     DBUG_RETURN(1);
@@ -7644,7 +7675,7 @@
   // The caller will ensure that event_len is what we have at EVENT_LEN_OFFSET
   uint8 post_header_len= description_event->post_header_len[ROTATE_EVENT-1];
   uint ident_offset;
-  if (event_len < LOG_EVENT_MINIMAL_HEADER_LEN)
+  if (event_len < (uint)(LOG_EVENT_MINIMAL_HEADER_LEN + post_header_len))
     DBUG_VOID_RETURN;
   buf+= LOG_EVENT_MINIMAL_HEADER_LEN;
   pos= post_header_len ? uint8korr(buf + R_POS_OFFSET) : 4;
@@ -9223,6 +9254,11 @@
       we keep the flags set to UNDEF_F.
     */
     size_t bytes_read= (val + val_len) - buf_start;
+    if (bytes_read > event_len)
+    {
+      error= true;
+      goto err;
+    }
     if ((data_written - bytes_read) > 0)
     {
       flags= (uint) *(buf + UV_VAL_IS_NULL + UV_VAL_TYPE_SIZE +
@@ -10846,9 +10882,16 @@
   uint8 const common_header_len= description_event->common_header_len;
   Log_event_type event_type= (Log_event_type)(uchar)buf[EVENT_TYPE_OFFSET];
   m_type= event_type;
-  
+  m_cols_ai.bitmap= 0;
+
   uint8 const post_header_len= description_event->post_header_len[event_type-1];
 
+  if (event_len < (uint)(common_header_len + post_header_len))
+  {
+    m_cols.bitmap= 0;
+    DBUG_VOID_RETURN;
+  }
+
   DBUG_PRINT("enter",("event_len: %u  common_header_len: %d  "
 		      "post_header_len: %d",
 		      event_len, common_header_len,
@@ -10880,7 +10923,14 @@
       which includes length bytes
     */
     var_header_len= uint2korr(post_start);
-    assert(var_header_len >= 2);
+    /* Check length and also avoid out of buffer read */
+    if (var_header_len < 2 ||
+        event_len < static_cast(var_header_len +
+          (post_start - buf)))
+    {
+      m_cols.bitmap= 0;
+      DBUG_VOID_RETURN;
+    }
     var_header_len-= 2;
 
     /* Iterate over var-len header, extracting 'chunks' */
@@ -12545,14 +12595,12 @@
     m_data_size(0), m_field_metadata(0), m_field_metadata_size(0),
     m_null_bits(0), m_meta_memory(NULL)
 {
-  unsigned int bytes_read= 0;
   DBUG_ENTER("Table_map_log_event::Table_map_log_event(const char*,uint,...)");
 
   uint8 common_header_len= description_event->common_header_len;
   uint8 post_header_len= description_event->post_header_len[TABLE_MAP_EVENT-1];
   DBUG_PRINT("info",("event_len: %u  common_header_len: %d  post_header_len: %d",
                      event_len, common_header_len, post_header_len));
-
   /*
     Don't print debug messages when running valgrind since they can
     trigger false warnings.
@@ -12561,10 +12609,14 @@
   DBUG_DUMP("event buffer", (uchar*) buf, event_len);
 #endif
 
+  if (event_len < (uint)(common_header_len + post_header_len))
+    DBUG_VOID_RETURN;
+
   /* Read the post-header */
   const char *post_start= buf + common_header_len;
 
   post_start+= TM_MAPID_OFFSET;
+  VALIDATE_BYTES_READ(post_start, buf, event_len);
   if (post_header_len == 6)
   {
     /* Master is of an intermediate source tree before 5.1.4. Id is 4 bytes */
@@ -12587,15 +12639,18 @@
 
   /* Extract the length of the various parts from the buffer */
   uchar const *const ptr_dblen= (uchar const*)vpart + 0;
+  VALIDATE_BYTES_READ(ptr_dblen, buf, event_len);
   m_dblen= *(uchar*) ptr_dblen;
 
   /* Length of database name + counter + terminating null */
   uchar const *const ptr_tbllen= ptr_dblen + m_dblen + 2;
+  VALIDATE_BYTES_READ(ptr_tbllen, buf, event_len);
   m_tbllen= *(uchar*) ptr_tbllen;
 
   /* Length of table name + counter + terminating null */
   uchar const *const ptr_colcnt= ptr_tbllen + m_tbllen + 2;
   uchar *ptr_after_colcnt= (uchar*) ptr_colcnt;
+  VALIDATE_BYTES_READ(ptr_after_colcnt, buf, event_len);
   m_colcnt= net_field_length(&ptr_after_colcnt);
 
   DBUG_PRINT("info",("m_dblen: %lu  off: %ld  m_tbllen: %lu  off: %ld  m_colcnt: %lu  off: %ld",
@@ -12618,23 +12673,27 @@
     memcpy(m_coltype, ptr_after_colcnt, m_colcnt);
 
     ptr_after_colcnt= ptr_after_colcnt + m_colcnt;
-    bytes_read= (uint) (ptr_after_colcnt - (uchar *)buf);
-    DBUG_PRINT("info", ("Bytes read: %d", bytes_read));
-    if (bytes_read < event_len)
+    VALIDATE_BYTES_READ(ptr_after_colcnt, buf, event_len);
+    m_field_metadata_size= net_field_length(&ptr_after_colcnt);
+    if(m_field_metadata_size <= (m_colcnt * 2))
     {
-      m_field_metadata_size= net_field_length(&ptr_after_colcnt);
-      DBUG_ASSERT(m_field_metadata_size <= (m_colcnt * 2));
       uint num_null_bytes= (m_colcnt + 7) / 8;
       m_meta_memory= (uchar *)my_multi_malloc(MYF(MY_WME),
-                                     &m_null_bits, num_null_bytes,
-                                     &m_field_metadata, m_field_metadata_size,
-                                     NULL);
+          &m_null_bits, num_null_bytes,
+          &m_field_metadata, m_field_metadata_size,
+          NULL);
       memcpy(m_field_metadata, ptr_after_colcnt, m_field_metadata_size);
       ptr_after_colcnt= (uchar*)ptr_after_colcnt + m_field_metadata_size;
       memcpy(m_null_bits, ptr_after_colcnt, num_null_bytes);
     }
+    else
+    {
+      m_coltype= NULL;
+      my_free(m_memory);
+      m_memory= NULL;
+      DBUG_VOID_RETURN;
+    }
   }
-
   DBUG_VOID_RETURN;
 }
 #endif
@@ -13437,6 +13496,7 @@
   {
     ulong sec_part;
     bitmap_set_bit(table->read_set, table->vers_start_field()->field_index);
+    table->file->column_bitmaps_signal();
     // Check whether a row came from unversioned table and fix vers fields.
     if (table->vers_start_field()->get_timestamp(&sec_part) == 0 && sec_part == 0)
       table->vers_update_fields();
@@ -13997,6 +14057,7 @@
       table->vers_end_field()->set_max();
       m_vers_from_plain= true;
     }
+    table->file->column_bitmaps_signal();
   }
 
   DBUG_PRINT("info",("looking for the following record"));
@@ -14487,9 +14548,12 @@
 
 Update_rows_log_event::~Update_rows_log_event()
 {
-  if (m_cols_ai.bitmap == m_bitbuf_ai) // no my_malloc happened
-    m_cols_ai.bitmap= 0; // so no my_free in my_bitmap_free
-  my_bitmap_free(&m_cols_ai); // To pair with my_bitmap_init().
+  if (m_cols_ai.bitmap)
+  {
+    if (m_cols_ai.bitmap == m_bitbuf_ai) // no my_malloc happened
+      m_cols_ai.bitmap= 0; // so no my_free in my_bitmap_free
+    my_bitmap_free(&m_cols_ai); // To pair with my_bitmap_init().
+  }
 }
 
 
diff -Nru mariadb-10.3-10.3.18/sql/log_event.h mariadb-10.3-10.3.22/sql/log_event.h
--- mariadb-10.3-10.3.18/sql/log_event.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/log_event.h	2020-01-26 18:37:29.000000000 +0000
@@ -2223,7 +2223,15 @@
  ****************************************************************************/
 struct sql_ex_info
 {
-  sql_ex_info() {}                            /* Remove gcc warning */
+  sql_ex_info():
+    cached_new_format(-1),
+    field_term_len(0),
+    enclosed_len(0),
+    line_term_len(0),
+    line_start_len(0),
+    escaped_len(0),
+    empty_flags(0)
+  {}                            /* Remove gcc warning */
   const char* field_term;
   const char* enclosed;
   const char* line_term;
@@ -3590,7 +3598,7 @@
   bool write_data_header();
   bool write_data_body();
   /*
-    Cut out Create_file extentions and
+    Cut out Create_file extensions and
     write it as Load event - used on the slave
   */
   bool write_base();
@@ -5211,6 +5219,9 @@
 bool event_checksum_test(uchar *buf, ulong event_len, enum_binlog_checksum_alg alg);
 enum enum_binlog_checksum_alg get_checksum_alg(const char* buf, ulong len);
 extern TYPELIB binlog_checksum_typelib;
+#ifdef WITH_WSREP
+enum Log_event_type wsrep_peak_event(rpl_group_info *rgi, ulonglong* event_size);
+#endif /* WITH_WSREP */
 
 /**
   @} (end of group Replication)
diff -Nru mariadb-10.3-10.3.18/sql/log_event_old.cc mariadb-10.3-10.3.22/sql/log_event_old.cc
--- mariadb-10.3-10.3.18/sql/log_event_old.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/log_event_old.cc	2020-01-26 18:37:29.000000000 +0000
@@ -835,7 +835,7 @@
   table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
   table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
   /*
-    reseting the extra with 
+    resetting the extra with 
     table->file->extra(HA_EXTRA_NO_IGNORE_NO_KEY); 
     fires bug#27077
     todo: explain or fix
@@ -2459,7 +2459,7 @@
   m_table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
   m_table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
   /*
-    reseting the extra with 
+    resetting the extra with 
     table->file->extra(HA_EXTRA_NO_IGNORE_NO_KEY); 
     fires bug#27077
     todo: explain or fix
diff -Nru mariadb-10.3-10.3.18/sql/multi_range_read.cc mariadb-10.3-10.3.22/sql/multi_range_read.cc
--- mariadb-10.3-10.3.18/sql/multi_range_read.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/multi_range_read.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1589,11 +1589,10 @@
   }
 
   uint add_len= share->key_info[keyno].key_length + primary_file->ref_length; 
-  *bufsz -= add_len;
-  if (get_disk_sweep_mrr_cost(keyno, rows, *flags, bufsz, &dsmrr_cost))
+  if (get_disk_sweep_mrr_cost(keyno, rows, *flags, bufsz, add_len,
+                              &dsmrr_cost))
     return TRUE;
-  *bufsz += add_len;
-  
+
   bool force_dsmrr;
   /* 
     If mrr_cost_based flag is not set, then set cost of DS-MRR to be minimum of
@@ -1682,6 +1681,11 @@
   @param rows               E(Number of rows to be scanned)
   @param flags              Scan parameters (HA_MRR_* flags)
   @param buffer_size INOUT  Buffer size
+                            IN: Buffer of size 0 means the function
+                            will determine the best size and return it.
+  @param extra_mem_overhead Extra memory overhead of the MRR implementation
+                            (the function assumes this many bytes of buffer
+                             space will not be usable by DS-MRR)
   @param cost        OUT    The cost
 
   @retval FALSE  OK
@@ -1690,7 +1694,9 @@
 */
 
 bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
-                                         uint *buffer_size, Cost_estimate *cost)
+                                         uint *buffer_size,
+                                         uint extra_mem_overhead,
+                                         Cost_estimate *cost)
 {
   ulong max_buff_entries, elem_size;
   ha_rows rows_in_full_step;
@@ -1700,11 +1706,24 @@
 
   elem_size= primary_file->ref_length + 
              sizeof(void*) * (!MY_TEST(flags & HA_MRR_NO_ASSOCIATION));
-  max_buff_entries = *buffer_size / elem_size;
 
-  if (!max_buff_entries)
+  if (!*buffer_size)
+  {
+    /*
+      We are requested to determine how much memory we need.
+      Request memory to finish the scan in one pass but do not request
+      more than @@mrr_buff_size.
+    */
+    *buffer_size= (uint) MY_MIN(extra_mem_overhead + elem_size*(ulong)rows,
+                                MY_MAX(table->in_use->variables.mrr_buff_size,
+                                       extra_mem_overhead));
+  }
+
+  if (elem_size + extra_mem_overhead > *buffer_size)
     return TRUE; /* Buffer has not enough space for even 1 rowid */
 
+  max_buff_entries = (*buffer_size - extra_mem_overhead) / elem_size;
+
   /* Number of iterations we'll make with full buffer */
   n_full_steps= (uint)floor(rows2double(rows) / max_buff_entries);
   
diff -Nru mariadb-10.3-10.3.18/sql/multi_range_read.h mariadb-10.3-10.3.22/sql/multi_range_read.h
--- mariadb-10.3-10.3.18/sql/multi_range_read.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/multi_range_read.h	2020-01-26 18:37:29.000000000 +0000
@@ -631,8 +631,9 @@
   
   bool choose_mrr_impl(uint keyno, ha_rows rows, uint *flags, uint *bufsz, 
                        Cost_estimate *cost);
-  bool get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags, 
-                               uint *buffer_size, Cost_estimate *cost);
+  bool get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
+                               uint *buffer_size, uint extra_mem_overhead,
+                               Cost_estimate *cost);
   bool check_cpk_scan(THD *thd, TABLE_SHARE *share, uint keyno, uint mrr_flags);
 
   bool setup_buffer_sharing(uint key_size_in_keybuf, key_part_map key_tuple_map);
diff -Nru mariadb-10.3-10.3.18/sql/mysql_upgrade_service.cc mariadb-10.3-10.3.22/sql/mysql_upgrade_service.cc
--- mariadb-10.3-10.3.18/sql/mysql_upgrade_service.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/mysql_upgrade_service.cc	2020-01-26 18:37:29.000000000 +0000
@@ -134,7 +134,7 @@
   }
 
   /*
-    Stop service that we started, if it was not initally running at
+    Stop service that we started, if it was not initially running at
     program start.
   */
   if (initial_service_state != UINT_MAX && initial_service_state != SERVICE_RUNNING)
diff -Nru mariadb-10.3-10.3.18/sql/mysqld.cc mariadb-10.3-10.3.22/sql/mysqld.cc
--- mariadb-10.3-10.3.18/sql/mysqld.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/mysqld.cc	2020-01-26 18:37:29.000000000 +0000
@@ -157,16 +157,11 @@
 
 #include 
 
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
-
 #ifdef __WIN__ 
 #include 
 #endif
 
 #ifdef HAVE_SOLARIS_LARGE_PAGES
-#include 
 #if defined(__sun__) && defined(__GNUC__) && defined(__cplusplus) \
     && defined(_XOPEN_SOURCE)
 extern int getpagesizes(size_t *, int);
@@ -1209,12 +1204,9 @@
 #endif
 
 #ifndef EMBEDDED_LIBRARY
-void net_before_header_psi(struct st_net *net, void *user_data, size_t /* unused: count */)
+void net_before_header_psi(struct st_net *net, void *thd, size_t /* unused: count */)
 {
-  THD *thd;
-  thd= static_cast (user_data);
-  DBUG_ASSERT(thd != NULL);
-
+  DBUG_ASSERT(thd);
   /*
     We only come where when the server is IDLE, waiting for the next command.
     Technically, it is a wait on a socket, which may take a long time,
@@ -1223,7 +1215,8 @@
     Instead, start explicitly an IDLE event.
   */
   MYSQL_SOCKET_SET_STATE(net->vio->mysql_socket, PSI_SOCKET_STATE_IDLE);
-  MYSQL_START_IDLE_WAIT(thd->m_idle_psi, &thd->m_idle_state);
+  MYSQL_START_IDLE_WAIT(static_cast(thd)->m_idle_psi,
+                        &static_cast(thd)->m_idle_state);
 }
 
 void net_after_header_psi(struct st_net *net, void *user_data,
@@ -2261,7 +2254,7 @@
   tdc_deinit();
   mdl_destroy();
   dflt_key_cache= 0;
-  key_caches.delete_elements((void (*)(const char*, uchar*)) free_key_cache);
+  key_caches.delete_elements(free_key_cache);
   wt_end();
   multi_keycache_free();
   sp_cache_end();
@@ -4784,7 +4777,6 @@
     return 1;
   }
 
-  global_system_variables.in_subquery_conversion_threshold= IN_SUBQUERY_CONVERSION_THRESHOLD;
 
 #ifdef WITH_WSREP
   /*
@@ -8915,8 +8907,8 @@
          "\nbecause execution stopped before plugins were initialized.");
   }
 
-  puts("\nTo see what values a running MySQL server is using, type"
-       "\n'mysqladmin variables' instead of 'mysqld --verbose --help'.");
+    puts("\nTo see what variables a running MySQL server is using, type"
+         "\n'mysqladmin variables' instead of 'mysqld --verbose --help'.");
   }
   DBUG_VOID_RETURN;
 }
diff -Nru mariadb-10.3-10.3.18/sql/mysqld.h mariadb-10.3-10.3.22/sql/mysqld.h
--- mariadb-10.3-10.3.18/sql/mysqld.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/mysqld.h	2020-01-26 18:37:29.000000000 +0000
@@ -189,7 +189,8 @@
   SYSTEM_TIME_AS_OF,
   SYSTEM_TIME_FROM_TO,
   SYSTEM_TIME_BETWEEN,
-  SYSTEM_TIME_BEFORE,
+  SYSTEM_TIME_BEFORE,  // used for DELETE HISTORY ... BEFORE
+  SYSTEM_TIME_HISTORY, // used for DELETE HISTORY
   SYSTEM_TIME_ALL
 };
 
diff -Nru mariadb-10.3-10.3.18/sql/opt_range.cc mariadb-10.3-10.3.22/sql/opt_range.cc
--- mariadb-10.3-10.3.18/sql/opt_range.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/opt_range.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2414,12 +2414,16 @@
   records= head->stat_records();
   if (!records)
     records++;					/* purecov: inspected */
-  scan_time= (double) records / TIME_FOR_COMPARE + 1;
-  read_time= (double) head->file->scan_time() + scan_time + 1.1;
-  if (head->force_index)
+
+  if (head->force_index || force_quick_range)
     scan_time= read_time= DBL_MAX;
-  if (limit < records)
-    read_time= (double) records + scan_time + 1; // Force to use index
+  else
+  {
+    scan_time= (double) records / TIME_FOR_COMPARE + 1;
+    read_time= (double) head->file->scan_time() + scan_time + 1.1;
+    if (limit < records)
+      read_time= (double) records + scan_time + 1; // Force to use index
+  }
   
   possible_keys.clear_all();
 
@@ -8995,6 +8999,8 @@
   }
   if (key1->type == SEL_ARG::MAYBE_KEY)
   {
+    if (key2->type == SEL_ARG::KEY_RANGE)
+      return key2;
     key1->right= key1->left= &null_element;
     key1->next= key1->prev= 0;
   }
@@ -10413,6 +10419,16 @@
                                             bufsize, mrr_flags, cost);
   if (rows != HA_POS_ERROR)
   {
+    ha_rows table_records= param->table->stat_records();
+    if (rows > table_records)
+    {
+      /*
+        For any index the total number of records within all ranges
+        cannot be be bigger than the number of records in the table
+      */
+      rows= table_records;
+      set_if_bigger(rows, 1);
+    }
     param->quick_rows[keynr]= rows;
     param->possible_keys.set_bit(keynr);
     if (update_tbl_stats)
diff -Nru mariadb-10.3-10.3.18/sql/opt_subselect.cc mariadb-10.3-10.3.22/sql/opt_subselect.cc
--- mariadb-10.3-10.3.18/sql/opt_subselect.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/opt_subselect.cc	2020-01-26 18:37:29.000000000 +0000
@@ -452,11 +452,6 @@
 static SJ_MATERIALIZATION_INFO *
 at_sjmat_pos(const JOIN *join, table_map remaining_tables, const JOIN_TAB *tab,
              uint idx, bool *loose_scan);
-void best_access_path(JOIN *join, JOIN_TAB *s, 
-                             table_map remaining_tables, uint idx, 
-                             bool disable_jbuf, double record_count,
-                             POSITION *pos, POSITION *loose_scan_pos);
-
 static Item *create_subq_in_equalities(THD *thd, SJ_MATERIALIZATION_INFO *sjm, 
                                 Item_in_subselect *subq_pred);
 static bool remove_sj_conds(THD *thd, Item **tree);
@@ -834,7 +829,12 @@
 
   in_subs->types_allow_materialization= FALSE;  // Assign default values
   in_subs->sjm_scan_allowed= FALSE;
-  
+
+  /*
+    The checks here must be kept in sync with the one in
+    Item_func_in::in_predicate_to_in_subs_transformer().
+  */
+
   bool all_are_fields= TRUE;
   uint32 total_key_length = 0;
   for (uint i= 0; i < elements; i++)
@@ -2614,9 +2614,17 @@
       {
         do  /* For all equalities on all key parts */
         {
-          /* Check if this is "t.keypart = expr(outer_tables) */
+          /*
+            Check if this is "t.keypart = expr(outer_tables)
+
+            Don't allow variants that can produce duplicates:
+            - Dont allow "ref or null"
+            - the keyuse (that is, the operation) must be null-rejecting,
+              unless the other expression is non-NULLable.
+          */
           if (!(keyuse->used_tables & sj_inner_tables) &&
-              !(keyuse->optimize & KEY_OPTIMIZE_REF_OR_NULL))
+              !(keyuse->optimize & KEY_OPTIMIZE_REF_OR_NULL) &&
+              (keyuse->null_rejecting || !keyuse->val->maybe_null))
           {
             bound_parts |= 1 << keyuse->keypart;
           }
@@ -2718,6 +2726,13 @@
     NULL,
   };
 
+#ifdef HAVE_valgrind
+  new (&pos->firstmatch_picker) Firstmatch_picker;
+  new (&pos->loosescan_picker) LooseScan_picker;
+  new (&pos->sjmat_picker) Sj_materialization_picker;
+  new (&pos->dups_weedout_picker) Duplicate_weedout_picker;
+#endif
+
   if (join->emb_sjm_nest)
   {
     /* 
@@ -3007,7 +3022,8 @@
     bool disable_jbuf= (join->thd->variables.join_cache_level == 0);
     for (i= first_tab + mat_info->tables; i <= idx; i++)
     {
-      best_access_path(join, join->positions[i].table, rem_tables, i,
+      best_access_path(join, join->positions[i].table, rem_tables,
+                       join->positions, i,
                        disable_jbuf, prefix_rec_count, &curpos, &dummy);
       prefix_rec_count= COST_MULT(prefix_rec_count, curpos.records_read);
       prefix_cost= COST_ADD(prefix_cost, curpos.read_time);
@@ -3018,7 +3034,22 @@
 
     *strategy= SJ_OPT_MATERIALIZE_SCAN;
     *read_time=    prefix_cost;
-    *record_count= prefix_rec_count / mat_info->rows_with_duplicates;
+    /*
+      Note: the next line means we did not remove the subquery's fanout from
+      *record_count. It needs to be removed, as the join prefix is
+
+        ntX  SJM-SCAN(it1 ... itN) | (ot1 ... otN) ...
+
+      here, the SJM-SCAN may have introduced subquery's fanout (duplicate rows,
+      rows that don't have matches in ot1_i). All this fanout is gone after
+      table otN (or earlier) but taking it into account is hard.
+
+      Some consolation here is that SJM-Scan strategy is applicable when the
+      subquery is smaller than tables otX. If the subquery has large cardinality,
+      we can greatly overestimate *record_count here, but it doesn't matter as
+      SJ-Materialization-Lookup is a better strategy anyway.
+    */
+    *record_count= prefix_rec_count;
     *handled_fanout= mat_nest->sj_inner_tables;
     return TRUE;
   }
@@ -3626,7 +3657,8 @@
       join->cur_sj_inner_tables= 0;
       for (i= first + sjm->tables; i <= tablenr; i++)
       {
-        best_access_path(join, join->best_positions[i].table, rem_tables, i, 
+        best_access_path(join, join->best_positions[i].table, rem_tables,
+                         join->best_positions, i,
                          FALSE, prefix_rec_count,
                          join->best_positions + i, &dummy);
         prefix_rec_count *= join->best_positions[i].records_read;
@@ -3658,8 +3690,9 @@
       {
         if (join->best_positions[idx].use_join_buffer)
         {
-           best_access_path(join, join->best_positions[idx].table, 
-                            rem_tables, idx, TRUE /* no jbuf */,
+           best_access_path(join, join->best_positions[idx].table,
+                            rem_tables, join->best_positions, idx,
+                            TRUE /* no jbuf */,
                             record_count, join->best_positions + idx, &dummy);
         }
         record_count *= join->best_positions[idx].records_read;
@@ -3689,7 +3722,8 @@
         if (join->best_positions[idx].use_join_buffer || (idx == first))
         {
            best_access_path(join, join->best_positions[idx].table,
-                            rem_tables, idx, TRUE /* no jbuf */,
+                            rem_tables, join->best_positions, idx,
+                            TRUE /* no jbuf */,
                             record_count, join->best_positions + idx,
                             &loose_scan_pos);
            if (idx==first)
@@ -4370,7 +4404,7 @@
     field->reset();
     /*
       Test if there is a default field value. The test for ->ptr is to skip
-      'offset' fields generated by initalize_tables
+      'offset' fields generated by initialize_tables
     */
     // Initialize the table field:
     bzero(field->ptr, field->pack_length());
diff -Nru mariadb-10.3-10.3.18/sql/opt_subselect.h mariadb-10.3-10.3.22/sql/opt_subselect.h
--- mariadb-10.3-10.3.18/sql/opt_subselect.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/opt_subselect.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,5 +1,5 @@
 /*
-   Copyright (c) 2010, 2015, MariaDB
+   Copyright (c) 2010, 2019, 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
@@ -88,10 +88,11 @@
   KEYUSE *best_loose_scan_start_key;
 
   uint best_max_loose_keypart;
+  table_map best_ref_depend_map;
 
 public:
   Loose_scan_opt():
-    try_loosescan(FALSE),
+    try_loosescan(false),
     bound_sj_equalities(0),
     quick_uses_applicable_index(0),
     quick_max_loose_keypart(0),
@@ -99,10 +100,11 @@
     best_loose_scan_cost(0),
     best_loose_scan_records(0),
     best_loose_scan_start_key(NULL),
-    best_max_loose_keypart(0)
+    best_max_loose_keypart(0),
+    best_ref_depend_map(0)
   {
   }
-  
+
   void init(JOIN *join, JOIN_TAB *s, table_map remaining_tables)
   {
     /*
@@ -249,13 +251,14 @@
           best_loose_scan_records= records;
           best_max_loose_keypart= max_loose_keypart;
           best_loose_scan_start_key= start_key;
+          best_ref_depend_map= 0;
         }
       }
     }
   }
   
   void check_ref_access_part2(uint key, KEYUSE *start_key, double records, 
-                              double read_time)
+                              double read_time, table_map ref_depend_map_arg)
   {
     if (part1_conds_met && read_time < best_loose_scan_cost)
     {
@@ -265,6 +268,7 @@
       best_loose_scan_records= records;
       best_max_loose_keypart= max_loose_keypart;
       best_loose_scan_start_key= start_key;
+      best_ref_depend_map= ref_depend_map_arg;
     }
   }
 
@@ -280,6 +284,7 @@
       best_loose_scan_records= rows2double(quick->records);
       best_max_loose_keypart= quick_max_loose_keypart;
       best_loose_scan_start_key= NULL;
+      best_ref_depend_map= 0;
     }
   }
 
@@ -295,7 +300,7 @@
       pos->loosescan_picker.loosescan_parts= best_max_loose_keypart + 1;
       pos->use_join_buffer= FALSE;
       pos->table=           tab;
-      // todo need ref_depend_map ?
+      pos->ref_depend_map=  best_ref_depend_map;
       DBUG_PRINT("info", ("Produced a LooseScan plan, key %s, %s",
                           tab->table->key_info[best_loose_scan_key].name.str,
                           best_loose_scan_start_key? "(ref access)":
diff -Nru mariadb-10.3-10.3.18/sql/proxy_protocol.cc mariadb-10.3-10.3.22/sql/proxy_protocol.cc
--- mariadb-10.3-10.3.18/sql/proxy_protocol.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/proxy_protocol.cc	2020-01-26 18:37:29.000000000 +0000
@@ -470,7 +470,7 @@
   int byte_count= bit_count / 8;
   if (byte_count && (result= memcmp(s1, s2, byte_count)))
     return result;
-  int rem= byte_count % 8;
+  int rem= bit_count % 8;
   if (rem)
   {
     // compare remaining bits i.e partial bytes.
diff -Nru mariadb-10.3-10.3.18/sql/rpl_mi.cc mariadb-10.3-10.3.22/sql/rpl_mi.cc
--- mariadb-10.3-10.3.18/sql/rpl_mi.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/rpl_mi.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1173,7 +1173,7 @@
     }
     else
     {
-      /* Initialization of Master_info succeded. Add it to HASH */
+      /* Initialization of Master_info succeeded. Add it to HASH */
       if (global_system_variables.log_warnings > 1)
         sql_print_information("Initialized Master_info from '%s'",
                               buf_master_info_file);
diff -Nru mariadb-10.3-10.3.18/sql/rpl_parallel.cc mariadb-10.3-10.3.22/sql/rpl_parallel.cc
--- mariadb-10.3-10.3.18/sql/rpl_parallel.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/rpl_parallel.cc	2020-01-26 18:37:29.000000000 +0000
@@ -228,6 +228,12 @@
       entry->stop_on_error_sub_id == (uint64)ULONGLONG_MAX)
     entry->stop_on_error_sub_id= sub_id;
   mysql_mutex_unlock(&entry->LOCK_parallel_entry);
+  DBUG_EXECUTE_IF("hold_worker_on_schedule", {
+      if (entry->stop_on_error_sub_id < (uint64)ULONGLONG_MAX)
+      {
+        debug_sync_set_action(thd, STRING_WITH_LEN("now SIGNAL continue_worker"));
+      }
+    });
 
   DBUG_EXECUTE_IF("rpl_parallel_simulate_wait_at_retry", {
       if (rgi->current_gtid.seq_no == 1000) {
@@ -1136,6 +1142,13 @@
         bool did_enter_cond= false;
         PSI_stage_info old_stage;
 
+        DBUG_EXECUTE_IF("hold_worker_on_schedule", {
+            if (rgi->current_gtid.domain_id == 0 &&
+                rgi->current_gtid.seq_no == 100) {
+                  debug_sync_set_action(thd,
+                STRING_WITH_LEN("now SIGNAL reached_pause WAIT_FOR continue_worker"));
+            }
+          });
         DBUG_EXECUTE_IF("rpl_parallel_scheduled_gtid_0_x_100", {
             if (rgi->current_gtid.domain_id == 0 &&
                 rgi->current_gtid.seq_no == 100) {
@@ -1177,7 +1190,10 @@
         skip_event_group= do_gco_wait(rgi, gco, &did_enter_cond, &old_stage);
 
         if (unlikely(entry->stop_on_error_sub_id <= rgi->wait_commit_sub_id))
+        {
           skip_event_group= true;
+          rgi->worker_error= 1;
+        }
         if (likely(!skip_event_group))
           do_ftwrl_wait(rgi, &did_enter_cond, &old_stage);
 
diff -Nru mariadb-10.3-10.3.18/sql/rpl_record.cc mariadb-10.3-10.3.22/sql/rpl_record.cc
--- mariadb-10.3-10.3.18/sql/rpl_record.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/rpl_record.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,5 +1,5 @@
 /* Copyright (c) 2007, 2013, Oracle and/or its affiliates.
-   Copyright (c) 2008, 2014, SkySQL Ab.
+   Copyright (c) 2008, 2019, 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
@@ -319,7 +319,7 @@
           normal unpack operation.
         */
         uint16 const metadata= tabledef->field_metadata(i);
-        uchar const *const old_pack_ptr= pack_ptr;
+        IF_DBUG(uchar const *const old_pack_ptr= pack_ptr;,)
 
         pack_ptr= f->unpack(f->ptr, pack_ptr, row_end, metadata);
 	DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;"
@@ -337,10 +337,9 @@
               Galera Node throws "Could not read field" error and drops out of cluster
             */
             WSREP_WARN("ROW event unpack field: %s  metadata: 0x%x;"
-                       " pack_ptr: %p; conv_table %p conv_field %p table %s"
+                       " conv_table %p conv_field %p table %s"
                        " row_end: %p",
-                       f->field_name.str, metadata,
-                       old_pack_ptr, conv_table, conv_field,
+                       f->field_name.str, metadata, conv_table, conv_field,
                        (table_found) ? "found" : "not found", row_end
             );
 	  }
diff -Nru mariadb-10.3-10.3.18/sql/rpl_rli.cc mariadb-10.3-10.3.22/sql/rpl_rli.cc
--- mariadb-10.3-10.3.18/sql/rpl_rli.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/rpl_rli.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1561,7 +1561,7 @@
     sub_id= (ulonglong)table->field[1]->val_int();
     server_id= (uint32)table->field[2]->val_int();
     seq_no= (ulonglong)table->field[3]->val_int();
-    DBUG_PRINT("info", ("Read slave state row: %u-%u-%lu sub_id=%lu\n",
+    DBUG_PRINT("info", ("Read slave state row: %u-%u-%lu sub_id=%lu",
                         (unsigned)domain_id, (unsigned)server_id,
                         (ulong)seq_no, (ulong)sub_id));
 
diff -Nru mariadb-10.3-10.3.18/sql/semisync_master.cc mariadb-10.3-10.3.22/sql/semisync_master.cc
--- mariadb-10.3-10.3.18/sql/semisync_master.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/semisync_master.cc	2020-01-26 18:37:29.000000000 +0000
@@ -806,7 +806,7 @@
     if (!get_master_enabled() || !is_on())
       goto l_end;
 
-    DBUG_PRINT("semisync", ("%s: wait pos (%s, %lu), repl(%d)\n",
+    DBUG_PRINT("semisync", ("%s: wait pos (%s, %lu), repl(%d)",
                             "Repl_semi_sync_master::commit_trx",
                             trx_wait_binlog_name, (ulong)trx_wait_binlog_pos,
                             (int)is_on()));
diff -Nru mariadb-10.3-10.3.18/sql/session_tracker.cc mariadb-10.3-10.3.22/sql/session_tracker.cc
--- mariadb-10.3-10.3.18/sql/session_tracker.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/session_tracker.cc	2020-01-26 18:37:29.000000000 +0000
@@ -810,7 +810,7 @@
         statement even for a transaction that isn't the first in an
         ongoing chain. Consider
 
-          SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED;
+          SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
           START TRANSACTION READ ONLY, WITH CONSISTENT SNAPSHOT;
           # work
           COMMIT AND CHAIN;
@@ -818,7 +818,7 @@
         If we switch away at this point, the replay in the new session
         needs to be
 
-          SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED;
+          SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
           START TRANSACTION READ ONLY;
 
         When a transaction ends (COMMIT/ROLLBACK sans CHAIN), all
diff -Nru mariadb-10.3-10.3.18/sql/share/errmsg-utf8.txt mariadb-10.3-10.3.22/sql/share/errmsg-utf8.txt
--- mariadb-10.3-10.3.18/sql/share/errmsg-utf8.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/share/errmsg-utf8.txt	2020-01-26 18:37:29.000000000 +0000
@@ -7338,6 +7338,8 @@
 ER_WARN_AGGFUNC_DEPENDENCE
         eng "Aggregate function '%-.192s)' of SELECT #%d belongs to SELECT #%d"
         ukr "Ðгрегатна Ñ„ÑƒÐ½ÐºÑ†Ñ–Ñ '%-.192s)' з SELECTу #%d належить до SELECTу #%d"
+WARN_INNODB_PARTITION_OPTION_IGNORED
+        eng "<%-.64s> option ignored for InnoDB partition"
 
 #
 # Internal errors, not used
@@ -7453,7 +7455,7 @@
   eng "Calling geometry function %s with unsupported types of arguments."
 
 ER_GIS_UNKNOWN_ERROR
-  eng "Unknown GIS error occured in function %s."
+  eng "Unknown GIS error occurred in function %s."
 
 ER_GIS_UNKNOWN_EXCEPTION
   eng "Unknown exception caught in GIS function %s."
@@ -7867,7 +7869,7 @@
         eng "Can not DROP SYSTEM VERSIONING for table %`s partitioned BY SYSTEM_TIME"
 
 ER_VERS_DB_NOT_SUPPORTED
-      eng "System versioning tables in the %`s database are not suported"
+      eng "System versioning tables in the %`s database are not supported"
 
 ER_VERS_TRT_IS_DISABLED
         eng "Transaction registry is disabled"
diff -Nru mariadb-10.3-10.3.18/sql/slave.cc mariadb-10.3-10.3.22/sql/slave.cc
--- mariadb-10.3-10.3.18/sql/slave.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/slave.cc	2020-01-26 18:37:29.000000000 +0000
@@ -481,6 +481,9 @@
   thd->store_globals();
   thd->security_ctx->skip_grants();
   thd->set_command(COM_DAEMON);
+#ifdef WITH_WSREP
+  thd->variables.wsrep_on= 0;
+#endif
 
   thd_proc_info(thd, "Loading slave GTID position from table");
   if (rpl_load_gtid_slave_state(thd))
@@ -4656,6 +4659,9 @@
   }
 
 
+#ifdef WITH_WSREP
+  thd->variables.wsrep_on= 0;
+#endif
   if (DBUG_EVALUATE_IF("failed_slave_start", 1, 0)
       || repl_semisync_slave.slave_start(mi))
   {
@@ -4911,13 +4917,14 @@
         goto err;
       }
 
-      if (rpl_semi_sync_slave_status && (mi->semi_ack & SEMI_SYNC_NEED_ACK) &&
-          repl_semisync_slave.slave_reply(mi))
+      if (rpl_semi_sync_slave_status && (mi->semi_ack & SEMI_SYNC_NEED_ACK))
       {
-        mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, NULL,
-                   ER_THD(thd, ER_SLAVE_FATAL_ERROR),
-                   "Failed to run 'after_queue_event' hook");
-        goto err;
+        /*
+          We deliberately ignore the error in slave_reply, such error should
+          not cause the slave IO thread to stop, and the error messages are
+          already reported.
+        */
+        (void)repl_semisync_slave.slave_reply(mi);
       }
 
       if (mi->using_gtid == Master_info::USE_GTID_NO &&
@@ -6213,6 +6220,7 @@
                     DBUG_ASSERT(debug_sync_service);
                     DBUG_ASSERT(!debug_sync_set_action(current_thd,
                                                        STRING_WITH_LEN(act)));
+                    dbug_rows_event_count = 0;
                   };);
 #endif
   mysql_mutex_lock(&mi->data_lock);
@@ -6457,7 +6465,7 @@
       error= ER_SLAVE_HEARTBEAT_FAILURE;
       error_msg.append(STRING_WITH_LEN("inconsistent heartbeat event content;"));
       error_msg.append(STRING_WITH_LEN("the event's data: log_file_name "));
-      error_msg.append(hb.get_log_ident(), (uint) strlen(hb.get_log_ident()));
+      error_msg.append(hb.get_log_ident(), (uint) hb.get_ident_len());
       error_msg.append(STRING_WITH_LEN(" log_pos "));
       error_msg.append_ulonglong(hb.log_pos);
       goto err;
@@ -6483,7 +6491,7 @@
       error= ER_SLAVE_HEARTBEAT_FAILURE;
       error_msg.append(STRING_WITH_LEN("heartbeat is not compatible with local info;"));
       error_msg.append(STRING_WITH_LEN("the event's data: log_file_name "));
-      error_msg.append(hb.get_log_ident(), (uint) strlen(hb.get_log_ident()));
+      error_msg.append(hb.get_log_ident(), (uint) hb.get_ident_len());
       error_msg.append(STRING_WITH_LEN(" log_pos "));
       error_msg.append_ulonglong(hb.log_pos);
       goto err;
@@ -6739,7 +6747,18 @@
           mi->last_queued_gtid.seq_no == 1000)
         goto skip_relay_logging;
     });
+    goto default_action;
 #endif
+  case START_ENCRYPTION_EVENT:
+    if (uint2korr(buf + FLAGS_OFFSET) & LOG_EVENT_IGNORABLE_F)
+    {
+      /*
+         If the event was not requested by the slave (the slave did not ask for
+         it), i.e. has end_log_pos=0, we do not increment mi->master_log_pos
+      */
+      inc_pos= uint4korr(buf+LOG_POS_OFFSET) ? event_len : 0;
+      break;
+    }
     /* fall through */
   default:
   default_action:
@@ -7831,7 +7850,39 @@
     sql_print_error("Error reading relay log event: %s", errmsg);
   DBUG_RETURN(0);
 }
+#ifdef WITH_WSREP
+enum Log_event_type wsrep_peak_event(rpl_group_info *rgi, ulonglong* event_size)
+{
+  enum Log_event_type ev_type;
+
+  mysql_mutex_lock(&rgi->rli->data_lock);
 
+  unsigned long long event_pos= rgi->event_relay_log_pos;
+  unsigned long long orig_future_pos= rgi->future_event_relay_log_pos;
+  unsigned long long future_pos= rgi->future_event_relay_log_pos;
+
+  /* scan the log to read next event and we skip
+     annotate events. */
+  do {
+    my_b_seek(rgi->rli->cur_log, future_pos);
+    rgi->rli->event_relay_log_pos= future_pos;
+    rgi->event_relay_log_pos= future_pos;
+    Log_event* ev= next_event(rgi, event_size);
+    ev_type= (ev) ? ev->get_type_code() : UNKNOWN_EVENT;
+    delete ev;
+    future_pos+= *event_size;
+  } while (ev_type == ANNOTATE_ROWS_EVENT);
+
+  /* scan the log back and re-set the positions to original values */
+  rgi->rli->event_relay_log_pos= event_pos;
+  rgi->event_relay_log_pos= event_pos;
+  my_b_seek(rgi->rli->cur_log, orig_future_pos);
+
+  mysql_mutex_unlock(&rgi->rli->data_lock);
+
+  return ev_type;
+}
+#endif /* WITH_WSREP */
 /*
   Rotate a relay log (this is used only by FLUSH LOGS; the automatic rotation
   because of size is simpler because when we do it we already have all relevant
diff -Nru mariadb-10.3-10.3.18/sql/sp.cc mariadb-10.3-10.3.22/sql/sp.cc
--- mariadb-10.3-10.3.18/sql/sp.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sp.cc	2020-01-26 18:37:29.000000000 +0000
@@ -854,7 +854,7 @@
   if (parse_sql(thd, & parser_state, creation_ctx) || thd->lex == NULL)
   {
     sp= thd->lex->sphead;
-    delete sp;
+    sp_head::destroy(sp);
     sp= 0;
   }
   else
@@ -1466,7 +1466,7 @@
     /* Such a statement can always go directly to binlog, no trans cache */
     if (thd->binlog_query(THD::STMT_QUERY_TYPE,
                           log_query.ptr(), log_query.length(),
-                          FALSE, FALSE, FALSE, 0))
+                          FALSE, FALSE, FALSE, 0) > 0)
     {
       my_error(ER_ERROR_ON_WRITE, MYF(MY_WME), "binary log", -1);
       goto done;
diff -Nru mariadb-10.3-10.3.18/sql/sp_cache.cc mariadb-10.3-10.3.22/sql/sp_cache.cc
--- mariadb-10.3-10.3.18/sql/sp_cache.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sp_cache.cc	2020-01-26 18:37:29.000000000 +0000
@@ -283,7 +283,7 @@
 void hash_free_sp_head(void *p)
 {
   sp_head *sp= (sp_head *)p;
-  delete sp;
+  sp_head::destroy(sp);
 }
 
 
diff -Nru mariadb-10.3-10.3.18/sql/sp_head.cc mariadb-10.3-10.3.22/sql/sp_head.cc
--- mariadb-10.3-10.3.18/sql/sp_head.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sp_head.cc	2020-01-26 18:37:29.000000000 +0000
@@ -473,48 +473,46 @@
  *  sp_head
  *
  */
-
-void *
-sp_head::operator new(size_t size) throw()
+ 
+sp_head *sp_head::create(sp_package *parent, const Sp_handler *handler)
 {
-  DBUG_ENTER("sp_head::operator new");
   MEM_ROOT own_root;
+  init_sql_alloc(&own_root, "sp_head", MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC,
+                 MYF(0));
   sp_head *sp;
+  if (!(sp= new (&own_root) sp_head(&own_root, parent, handler)))
+    free_root(&own_root, MYF(0));
 
-  init_sql_alloc(&own_root, "sp_head",
-                 MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC, MYF(0));
-  sp= (sp_head *) alloc_root(&own_root, size);
-  if (sp == NULL)
-    DBUG_RETURN(NULL);
-  sp->main_mem_root= own_root;
-  DBUG_PRINT("info", ("mem_root %p", &sp->mem_root));
-  DBUG_RETURN(sp);
+  return sp;
 }
 
-void
-sp_head::operator delete(void *ptr, size_t size) throw()
-{
-  DBUG_ENTER("sp_head::operator delete");
-  MEM_ROOT own_root;
-
-  if (ptr == NULL)
-    DBUG_VOID_RETURN;
 
-  sp_head *sp= (sp_head *) ptr;
-
-  /* Make a copy of main_mem_root as free_root will free the sp */
-  own_root= sp->main_mem_root;
-  DBUG_PRINT("info", ("mem_root %p moved to %p",
-                      &sp->mem_root, &own_root));
-  free_root(&own_root, MYF(0));
+void sp_head::destroy(sp_head *sp)
+{
+  if (sp)
+  {
+    /* Make a copy of main_mem_root as free_root will free the sp */
+    MEM_ROOT own_root= sp->main_mem_root;
+    DBUG_PRINT("info", ("mem_root %p moved to %p",
+                        &sp->mem_root, &own_root));
+    delete sp;
 
-  DBUG_VOID_RETURN;
+ 
+    free_root(&own_root, MYF(0));
+  }
 }
 
+/*
+ *
+ *  sp_head
+ *
+ */
 
-sp_head::sp_head(sp_package *parent, const Sp_handler *sph)
-  :Query_arena(&main_mem_root, STMT_INITIALIZED_FOR_SP),
+sp_head::sp_head(MEM_ROOT *mem_root_arg, sp_package *parent, 
+                 const Sp_handler *sph)
+  :Query_arena(NULL, STMT_INITIALIZED_FOR_SP),
    Database_qualified_name(&null_clex_str, &null_clex_str),
+   main_mem_root(*mem_root_arg),
    m_parent(parent),
    m_handler(sph),
    m_flags(0),
@@ -545,6 +543,8 @@
    m_pcont(new (&main_mem_root) sp_pcontext()),
    m_cont_level(0)
 {
+  mem_root= &main_mem_root;
+
   m_first_instance= this;
   m_first_free_instance= this;
   m_last_cached_sp= this;
@@ -567,10 +567,25 @@
 }
 
 
-sp_package::sp_package(LEX *top_level_lex,
+sp_package *sp_package::create(LEX *top_level_lex, const sp_name *name,
+                               const Sp_handler *sph)
+{
+  MEM_ROOT own_root;
+  init_sql_alloc(&own_root, "sp_package", MEM_ROOT_BLOCK_SIZE,
+                 MEM_ROOT_PREALLOC, MYF(0));
+  sp_package *sp;
+  if (!(sp= new (&own_root) sp_package(&own_root, top_level_lex, name, sph)))
+    free_root(&own_root, MYF(0));
+
+  return sp;
+}
+
+
+sp_package::sp_package(MEM_ROOT *mem_root_arg,
+                       LEX *top_level_lex,
                        const sp_name *name,
                        const Sp_handler *sph)
- :sp_head(NULL, sph),
+ :sp_head(mem_root_arg, NULL, sph),
   m_current_routine(NULL),
   m_top_level_lex(top_level_lex),
   m_rcontext(NULL),
@@ -588,7 +603,7 @@
   m_routine_declarations.cleanup();
   m_body= null_clex_str;
   if (m_current_routine)
-    delete m_current_routine->sphead;
+    sp_head::destroy(m_current_routine->sphead);
   delete m_rcontext;
 }
 
@@ -845,7 +860,7 @@
   my_hash_free(&m_sptabs);
   my_hash_free(&m_sroutines);
 
-  delete m_next_cached_sp;
+  sp_head::destroy(m_next_cached_sp);
 
   DBUG_VOID_RETURN;
 }
@@ -2571,7 +2586,7 @@
       }
       if (bp->instr_type == CPOP)
       {
-        uint n= lab->ctx->diff_cursors(lab_begin_block->ctx, true);
+        uint n= bp->instr->m_ctx->diff_cursors(lab_begin_block->ctx, true);
         if (n == 0)
         {
           // Remove cpop instr
@@ -2588,7 +2603,7 @@
       }
       if (bp->instr_type == HPOP)
       {
-        uint n= lab->ctx->diff_handlers(lab_begin_block->ctx, true);
+        uint n= bp->instr->m_ctx->diff_handlers(lab_begin_block->ctx, true);
         if (n == 0)
         {
           // Remove hpop instr
@@ -3082,6 +3097,8 @@
   sp_instr *i;
   uint src, dst;
 
+  DBUG_EXECUTE_IF("sp_head_optimize_disable", return; );
+
   opt_mark();
 
   bp.empty();
@@ -3379,11 +3396,7 @@
     Update the state of the active arena if no errors on
     open_tables stage.
   */
-  if (likely(!res) || likely(!thd->is_error()) ||
-      (thd->get_stmt_da()->sql_errno() != ER_CANT_REOPEN_TABLE &&
-       thd->get_stmt_da()->sql_errno() != ER_NO_SUCH_TABLE &&
-       thd->get_stmt_da()->sql_errno() != ER_NO_SUCH_TABLE_IN_ENGINE &&
-       thd->get_stmt_da()->sql_errno() != ER_UPDATE_TABLE_USED))
+  if (likely(!res) || likely(!thd->is_error()))
     thd->stmt_arena->state= Query_arena::STMT_EXECUTED;
 
   /*
@@ -4652,6 +4665,7 @@
   uint lock_count;
   uint query_lock_count;
   uint8 trg_event_map;
+  my_bool for_insert_data;
 } SP_TABLE;
 
 
@@ -4747,6 +4761,7 @@
         if (tab->query_lock_count > tab->lock_count)
           tab->lock_count++;
         tab->trg_event_map|= table->trg_event_map;
+        tab->for_insert_data|= table->for_insert_data;
       }
       else
       {
@@ -4770,6 +4785,7 @@
         tab->lock_type= table->lock_type;
         tab->lock_count= tab->query_lock_count= 1;
         tab->trg_event_map= table->trg_event_map;
+        tab->for_insert_data= table->for_insert_data;
         if (my_hash_insert(&m_sptabs, (uchar *)tab))
           return FALSE;
       }
@@ -4853,7 +4869,8 @@
                                            TABLE_LIST::PRELOCK_ROUTINE,
                                            belong_to_view,
                                            stab->trg_event_map,
-                                           query_tables_last_ptr);
+                                           query_tables_last_ptr,
+                                           stab->for_insert_data);
       tab_buff+= ALIGN_SIZE(sizeof(TABLE_LIST));
       result= TRUE;
     }
diff -Nru mariadb-10.3-10.3.18/sql/sp_head.h mariadb-10.3-10.3.22/sql/sp_head.h
--- mariadb-10.3-10.3.18/sql/sp_head.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sp_head.h	2020-01-26 18:37:29.000000000 +0000
@@ -127,7 +127,8 @@
 check_routine_name(const LEX_CSTRING *ident);
 
 class sp_head :private Query_arena,
-               public Database_qualified_name
+               public Database_qualified_name,
+               public Sql_alloc
 {
   sp_head(const sp_head &);	/**< Prevent use of these */
   void operator=(sp_head &);
@@ -316,13 +317,12 @@
   */
   SQL_I_List m_trg_table_fields;
 
-  static void *
-  operator new(size_t size) throw ();
-
-  static void
-  operator delete(void *ptr, size_t size) throw ();
-
-  sp_head(sp_package *parent, const Sp_handler *handler);
+protected:
+  sp_head(MEM_ROOT *mem_root, sp_package *parent, const Sp_handler *handler);
+  virtual ~sp_head();
+public:
+  static void destroy(sp_head *sp);
+  static sp_head *create(sp_package *parent, const Sp_handler *handler);
 
   /// Initialize after we have reset mem_root
   void
@@ -340,7 +340,6 @@
   void
   set_stmt_end(THD *thd);
 
-  virtual ~sp_head();
 
   bool
   execute_trigger(THD *thd,
@@ -964,10 +963,16 @@
   bool m_is_instantiated;
   bool m_is_cloning_routine;
 
-  sp_package(LEX *top_level_lex,
+private:
+  sp_package(MEM_ROOT *mem_root,
+             LEX *top_level_lex,
              const sp_name *name,
              const Sp_handler *sph);
   ~sp_package();
+public:
+  static sp_package *create(LEX *top_level_lex, const sp_name *name,
+                            const Sp_handler *sph);
+
   bool add_routine_declaration(LEX *lex)
   {
     return m_routine_declarations.check_dup_qualified(lex->sphead) ||
diff -Nru mariadb-10.3-10.3.18/sql/sql_acl.cc mariadb-10.3-10.3.22/sql/sql_acl.cc
--- mariadb-10.3-10.3.18/sql/sql_acl.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_acl.cc	2020-01-26 18:37:29.000000000 +0000
@@ -3354,7 +3354,7 @@
     DBUG_ASSERT(query_length);
     thd->clear_error();
     result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length,
-                              FALSE, FALSE, FALSE, 0);
+                              FALSE, FALSE, FALSE, 0) > 0;
   }
 end:
   close_mysql_tables(thd);
@@ -3516,7 +3516,7 @@
       DBUG_ASSERT(query_length);
       thd->clear_error();
       result= thd->binlog_query(THD::STMT_QUERY_TYPE, buff, query_length,
-                                FALSE, FALSE, FALSE, 0);
+                                FALSE, FALSE, FALSE, 0) > 0;
     }
   end:
     close_mysql_tables(thd);
@@ -12253,6 +12253,7 @@
   int2store(end+5, thd->client_capabilities >> 16);
   end[7]= data_len;
   DBUG_EXECUTE_IF("poison_srv_handshake_scramble_len", end[7]= -100;);
+  DBUG_EXECUTE_IF("increase_srv_handshake_scramble_len", end[7]= 50;);
   bzero(end + 8, 6);
   int4store(end + 14, thd->client_capabilities >> 32);
   end+= 18;
diff -Nru mariadb-10.3-10.3.18/sql/sql_admin.cc mariadb-10.3-10.3.22/sql/sql_admin.cc
--- mariadb-10.3-10.3.18/sql/sql_admin.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_admin.cc	2020-01-26 18:37:29.000000000 +0000
@@ -175,7 +175,7 @@
   /*
     Check if this is a table type that stores index and data separately,
     like ISAM or MyISAM. We assume fixed order of engine file name
-    extentions array. First element of engine file name extentions array
+    extensions array. First element of engine file name extensions array
     is meta/index file extention. Second element - data file extention. 
   */
   ext= table->file->bas_ext();
@@ -1314,7 +1314,7 @@
                          "analyze", lock_type, 1, 0, 0, 0,
                          &handler::ha_analyze, 0);
   /* ! we write after unlocking the table */
-  if (!res && !m_lex->no_write_to_binlog)
+  if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
   {
     /*
       Presumably, ANALYZE and binlog writing doesn't require synchronization
@@ -1372,7 +1372,7 @@
                       "optimize", TL_WRITE, 1, 0, 0, 0,
                       &handler::ha_optimize, 0);
   /* ! we write after unlocking the table */
-  if (!res && !m_lex->no_write_to_binlog)
+  if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
   {
     /*
       Presumably, OPTIMIZE and binlog writing doesn't require synchronization
@@ -1406,7 +1406,7 @@
                          &handler::ha_repair, &view_repair);
 
   /* ! we write after unlocking the table */
-  if (!res && !m_lex->no_write_to_binlog)
+  if (!res && !m_lex->no_write_to_binlog && (!opt_readonly || thd->slave_thread))
   {
     /*
       Presumably, REPAIR and binlog writing doesn't require synchronization
diff -Nru mariadb-10.3-10.3.18/sql/sql_audit.h mariadb-10.3-10.3.22/sql/sql_audit.h
--- mariadb-10.3-10.3.18/sql/sql_audit.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_audit.h	2020-01-26 18:37:29.000000000 +0000
@@ -284,7 +284,9 @@
 }
 
 static inline
-void mysql_audit_external_lock(THD *thd, TABLE_SHARE *share, int lock)
+void mysql_audit_external_lock_ex(THD *thd, my_thread_id thread_id,
+    const char *user, const char *host, const char *ip, query_id_t query_id,
+    TABLE_SHARE *share, int lock)
 {
   if (lock != F_UNLCK && mysql_audit_table_enabled())
   {
@@ -293,25 +295,33 @@
 
     event.event_subclass= MYSQL_AUDIT_TABLE_LOCK;
     event.read_only= lock == F_RDLCK;
-    event.thread_id= (unsigned long)thd->thread_id;
-    event.user= sctx->user;
+    event.thread_id= (unsigned long)thread_id;
+    event.user= user;
     event.priv_user= sctx->priv_user;
     event.priv_host= sctx->priv_host;
     event.external_user= sctx->external_user;
     event.proxy_user= sctx->proxy_user;
-    event.host= sctx->host;
-    event.ip= sctx->ip;
+    event.host= host;
+    event.ip= ip;
     event.database= share->db;
     event.table= share->table_name;
     event.new_database= null_clex_str;
     event.new_table= null_clex_str;
-    event.query_id= thd->query_id;
+    event.query_id= query_id;
 
     mysql_audit_notify(thd, MYSQL_AUDIT_TABLE_CLASS, &event);
   }
 }
 
 static inline
+void mysql_audit_external_lock(THD *thd, TABLE_SHARE *share, int lock)
+{
+  mysql_audit_external_lock_ex(thd, thd->thread_id, thd->security_ctx->user,
+      thd->security_ctx->host, thd->security_ctx->ip, thd->query_id,
+      share, lock);
+}
+
+static inline
 void mysql_audit_create_table(TABLE *table)
 {
   if (mysql_audit_table_enabled())
diff -Nru mariadb-10.3-10.3.18/sql/sql_base.cc mariadb-10.3-10.3.22/sql/sql_base.cc
--- mariadb-10.3-10.3.18/sql/sql_base.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_base.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2494,6 +2494,7 @@
         {
           thd->locked_tables_list.unlink_from_list(thd, table_list, false);
           mysql_lock_remove(thd, thd->lock, *prev);
+          (*prev)->file->extra(HA_EXTRA_PREPARE_FOR_FORCED_CLOSE);
           close_thread_table(thd, prev);
           break;
         }
@@ -3751,32 +3752,6 @@
     goto end;
   }
 
-  if (get_use_stat_tables_mode(thd) > NEVER && tables->table)
-  {
-    TABLE_SHARE *table_share= tables->table->s;
-    if (table_share && table_share->table_category == TABLE_CATEGORY_USER &&
-        table_share->tmp_table == NO_TMP_TABLE)
-    {
-      if (table_share->stats_cb.stats_can_be_read ||
-	  !alloc_statistics_for_table_share(thd, table_share, FALSE))
-      {
-        if (table_share->stats_cb.stats_can_be_read)
-        {   
-          KEY *key_info= table_share->key_info;
-          KEY *key_info_end= key_info + table_share->keys;
-          KEY *table_key_info= tables->table->key_info;
-          for ( ; key_info < key_info_end; key_info++, table_key_info++)
-            table_key_info->read_stats= key_info->read_stats;
-          Field **field_ptr= table_share->field;
-          Field **table_field_ptr= tables->table->field;
-          for ( ; *field_ptr; field_ptr++, table_field_ptr++)
-            (*table_field_ptr)->read_stats= (*field_ptr)->read_stats;
-          tables->table->stats_is_read= table_share->stats_cb.stats_is_read;
-        }
-      }	
-    }
-  }
-
 process_view_routines:
   /*
     Again we may need cache all routines used by this view and add
@@ -4446,9 +4421,11 @@
                     TABLE_LIST *tables)
 {
   TABLE_LIST *global_table_list= prelocking_ctx->query_tables;
+  DBUG_ENTER("add_internal_tables");
 
   do
   {
+    DBUG_PRINT("info", ("table name: %s", tables->table_name.str));
     /*
       Skip table if already in the list. Can happen with prepared statements
     */
@@ -4458,20 +4435,22 @@
 
     TABLE_LIST *tl= (TABLE_LIST *) thd->alloc(sizeof(TABLE_LIST));
     if (!tl)
-      return TRUE;
+      DBUG_RETURN(TRUE);
     tl->init_one_table_for_prelocking(&tables->db,
                                       &tables->table_name,
                                       NULL, tables->lock_type,
                                       TABLE_LIST::PRELOCK_NONE,
                                       0, 0,
-                                      &prelocking_ctx->query_tables_last);
+                                      &prelocking_ctx->query_tables_last,
+                                      tables->for_insert_data);
     /*
       Store link to the new table_list that will be used by open so that
       Item_func_nextval() can find it
     */
     tables->next_local= tl;
+    DBUG_PRINT("info", ("table name: %s added", tables->table_name.str));
   } while ((tables= tables->next_global));
-  return FALSE;
+  DBUG_RETURN(FALSE);
 }
 
 
@@ -4502,6 +4481,7 @@
 handle_table(THD *thd, Query_tables_list *prelocking_ctx,
              TABLE_LIST *table_list, bool *need_prelocking)
 {
+  DBUG_ENTER("handle_table");
   TABLE *table= table_list->table;
   /* We rely on a caller to check that table is going to be changed. */
   DBUG_ASSERT(table_list->lock_type >= TL_WRITE_ALLOW_WRITE ||
@@ -4532,7 +4512,7 @@
       {
         if (arena)
           thd->restore_active_arena(arena, &backup);
-        return TRUE;
+        DBUG_RETURN(TRUE);
       }
 
       *need_prelocking= TRUE;
@@ -4560,7 +4540,8 @@
                                           NULL, lock_type,
                                           TABLE_LIST::PRELOCK_FK,
                                           table_list->belong_to_view, op,
-                                          &prelocking_ctx->query_tables_last);
+                                          &prelocking_ctx->query_tables_last,
+                                          table_list->for_insert_data);
       }
       if (arena)
         thd->restore_active_arena(arena, &backup);
@@ -4568,8 +4549,11 @@
   }
 
   /* Open any tables used by DEFAULT (like sequence tables) */
+  DBUG_PRINT("info", ("table: %p  name: %s  db: %s  flags: %u",
+                      table_list, table_list->table_name.str,
+                      table_list->db.str, table_list->for_insert_data));
   if (table->internal_tables &&
-      ((sql_command_flags[thd->lex->sql_command] & CF_INSERTS_DATA) ||
+      (table_list->for_insert_data ||
        thd->lex->default_used))
   {
     Query_arena *arena, backup;
@@ -4582,10 +4566,10 @@
     if (unlikely(error))
     {
       *need_prelocking= TRUE;
-      return TRUE;
+      DBUG_RETURN(TRUE);
     }
   }
-  return FALSE;
+  DBUG_RETURN(FALSE);
 }
 
 
@@ -4602,7 +4586,7 @@
   THD *thd= table->in_use;
   TABLE_LIST *tl;
   MYSQL_LOCK *save_lock,*new_lock;
-  DBUG_ENTER("open_internal_tables");
+  DBUG_ENTER("open_and_lock_internal_tables");
 
   /* remove pointer to old select_lex which is already destroyed */
   for (tl= table->internal_tables ; tl ; tl= tl->next_global)
diff -Nru mariadb-10.3-10.3.18/sql/sql_cache.cc mariadb-10.3-10.3.22/sql/sql_cache.cc
--- mariadb-10.3-10.3.18/sql/sql_cache.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_cache.cc	2020-01-26 18:37:29.000000000 +0000
@@ -329,9 +329,6 @@
 */
 
 #include "mariadb.h"                          /* NO_EMBEDDED_ACCESS_CHECKS */
-#if defined(DBUG_OFF) && defined(HAVE_MADVISE)
-#include 
-#endif
 #include "sql_priv.h"
 #include "sql_basic_types.h"
 #include "sql_cache.h"
@@ -2662,7 +2659,7 @@
 #if defined(DBUG_OFF) && defined(HAVE_MADVISE) &&  defined(MADV_DONTDUMP)
   if (madvise(cache, query_cache_size+additional_data_size, MADV_DONTDUMP))
   {
-    DBUG_PRINT("warning", ("coudn't mark query cache memory as MADV_DONTDUMP: %s",
+    DBUG_PRINT("warning", ("coudn't mark query cache memory as " DONTDUMP_STR ": %s",
 			 strerror(errno)));
   }
 #endif
@@ -2831,7 +2828,7 @@
 #if defined(DBUG_OFF) && defined(HAVE_MADVISE) &&  defined(MADV_DODUMP)
   if (madvise(cache, query_cache_size+additional_data_size, MADV_DODUMP))
   {
-    DBUG_PRINT("warning", ("coudn't mark query cache memory as MADV_DODUMP: %s",
+    DBUG_PRINT("warning", ("coudn't mark query cache memory as " DODUMP_STR ": %s",
 			 strerror(errno)));
   }
 #endif
diff -Nru mariadb-10.3-10.3.18/sql/sql_class.cc mariadb-10.3-10.3.22/sql/sql_class.cc
--- mariadb-10.3-10.3.18/sql/sql_class.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_class.cc	2020-01-26 18:37:29.000000000 +0000
@@ -49,7 +49,7 @@
 #include 
 #include 
 #include 
-#ifdef	__WIN__
+#ifdef	__WIN__0
 #include 
 #endif
 #include 
@@ -850,7 +850,6 @@
   invoker.init();
   prepare_derived_at_open= FALSE;
   create_tmp_table_for_derived= FALSE;
-  force_read_stats= FALSE;
   save_prep_leaf_list= FALSE;
   org_charset= 0;
   /* Restore THR_THD */
@@ -6022,17 +6021,33 @@
       Get the capabilities vector for all involved storage engines and
       mask out the flags for the binary log.
     */
-    for (TABLE_LIST *table= tables; table; table= table->next_global)
+    for (TABLE_LIST *tbl= tables; tbl; tbl= tbl->next_global)
     {
-      if (table->placeholder())
+      TABLE *table;
+      TABLE_SHARE *share;
+      handler::Table_flags flags;
+      if (tbl->placeholder())
         continue;
 
-      handler::Table_flags const flags= table->table->file->ha_table_flags();
+      table= tbl->table;
+      share= table->s;
+      flags= table->file->ha_table_flags();
+      if (!share->table_creation_was_logged)
+      {
+        /*
+          This is a temporary table which was not logged in the binary log.
+          Disable statement logging to enforce row level logging.
+        */
+        DBUG_ASSERT(share->tmp_table);
+        flags&= ~HA_BINLOG_STMT_CAPABLE;
+        /* We can only use row logging */
+        set_current_stmt_binlog_format_row();
+      }
 
       DBUG_PRINT("info", ("table: %s; ha_table_flags: 0x%llx",
-                          table->table_name.str, flags));
+                          tbl->table_name.str, flags));
 
-      if (table->table->s->no_replicate)
+      if (share->no_replicate)
       {
         /*
           The statement uses a table that is not replicated.
@@ -6050,44 +6065,44 @@
         */
         lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_TABLE);
 
-        if (table->lock_type >= TL_WRITE_ALLOW_WRITE)
+        if (tbl->lock_type >= TL_WRITE_ALLOW_WRITE)
         {
           non_replicated_tables_count++;
           continue;
         }
       }
-      if (table == lex->first_not_own_table())
+      if (tbl == lex->first_not_own_table())
         found_first_not_own_table= true;
 
       replicated_tables_count++;
 
-      if (table->prelocking_placeholder != TABLE_LIST::PRELOCK_FK)
+      if (tbl->prelocking_placeholder != TABLE_LIST::PRELOCK_FK)
       {
-        if (table->lock_type <= TL_READ_NO_INSERT)
+        if (tbl->lock_type <= TL_READ_NO_INSERT)
           has_read_tables= true;
-        else if (table->table->found_next_number_field &&
-                 (table->lock_type >= TL_WRITE_ALLOW_WRITE))
+        else if (table->found_next_number_field &&
+                 (tbl->lock_type >= TL_WRITE_ALLOW_WRITE))
         {
           has_auto_increment_write_tables= true;
           has_auto_increment_write_tables_not_first= found_first_not_own_table;
-          if (table->table->s->next_number_keypart != 0)
+          if (share->next_number_keypart != 0)
             has_write_table_auto_increment_not_first_in_pk= true;
         }
       }
 
-      if (table->lock_type >= TL_WRITE_ALLOW_WRITE)
+      if (tbl->lock_type >= TL_WRITE_ALLOW_WRITE)
       {
         bool trans;
         if (prev_write_table && prev_write_table->file->ht !=
-            table->table->file->ht)
+            table->file->ht)
           multi_write_engine= TRUE;
-        if (table->table->s->non_determinstic_insert &&
+        if (share->non_determinstic_insert &&
             !(sql_command_flags[lex->sql_command] & CF_SCHEMA_CHANGE))
           has_write_tables_with_unsafe_statements= true;
 
-        trans= table->table->file->has_transactions();
+        trans= table->file->has_transactions();
 
-        if (table->table->s->tmp_table)
+        if (share->tmp_table)
           lex->set_stmt_accessed_table(trans ? LEX::STMT_WRITES_TEMP_TRANS_TABLE :
                                                LEX::STMT_WRITES_TEMP_NON_TRANS_TABLE);
         else
@@ -6098,17 +6113,16 @@
         flags_write_some_set |= flags;
         is_write= TRUE;
 
-        prev_write_table= table->table;
+        prev_write_table= table;
 
       }
       flags_access_some_set |= flags;
 
-      if (lex->sql_command != SQLCOM_CREATE_TABLE ||
-          (lex->sql_command == SQLCOM_CREATE_TABLE && lex->tmp_table()))
+      if (lex->sql_command != SQLCOM_CREATE_TABLE || lex->tmp_table())
       {
-        my_bool trans= table->table->file->has_transactions();
+        my_bool trans= table->file->has_transactions();
 
-        if (table->table->s->tmp_table)
+        if (share->tmp_table)
           lex->set_stmt_accessed_table(trans ? LEX::STMT_READS_TEMP_TRANS_TABLE :
                                                LEX::STMT_READS_TEMP_NON_TRANS_TABLE);
         else
@@ -6117,10 +6131,10 @@
       }
 
       if (prev_access_table && prev_access_table->file->ht !=
-          table->table->file->ht)
+          table->file->ht)
         multi_access_engine= TRUE;
 
-      prev_access_table= table->table;
+      prev_access_table= table;
     }
 
     if (wsrep_binlog_format() != BINLOG_FORMAT_ROW)
@@ -6249,9 +6263,16 @@
         {
           /*
             5. Error: Cannot modify table that uses a storage engine
-               limited to row-logging when binlog_format = STATEMENT
+               limited to row-logging when binlog_format = STATEMENT, except
+               if all tables that are updated are temporary tables
           */
-	  if (IF_WSREP((!WSREP(this) || wsrep_exec_mode == LOCAL_STATE),1))
+          if (!lex->stmt_writes_to_non_temp_table())
+          {
+            /* As all updated tables are temporary, nothing will be logged */
+            set_current_stmt_binlog_format_row();
+          }
+          else if (IF_WSREP((!WSREP(this) ||
+                             wsrep_exec_mode == LOCAL_STATE),1))
 	  {
             my_error((error= ER_BINLOG_STMT_MODE_AND_ROW_ENGINE), MYF(0), "");
 	  }
@@ -6320,10 +6341,8 @@
                         "ROW" : "STATEMENT"));
 
     if (variables.binlog_format == BINLOG_FORMAT_ROW &&
-        (lex->sql_command == SQLCOM_UPDATE ||
-         lex->sql_command == SQLCOM_UPDATE_MULTI ||
-         lex->sql_command == SQLCOM_DELETE ||
-         lex->sql_command == SQLCOM_DELETE_MULTI))
+        (sql_command_flags[lex->sql_command] &
+         (CF_UPDATES_DATA | CF_DELETES_DATA)))
     {
       String table_names;
       /*
@@ -6343,8 +6362,8 @@
       }
       if (!table_names.is_empty())
       {
-        bool is_update= (lex->sql_command == SQLCOM_UPDATE ||
-                         lex->sql_command == SQLCOM_UPDATE_MULTI);
+        bool is_update= MY_TEST(sql_command_flags[lex->sql_command] &
+                                CF_UPDATES_DATA);
         /*
           Replace the last ',' with '.' for table_names
         */
@@ -7178,11 +7197,12 @@
 
   @see decide_logging_format
 
+  @retval < 0 No logging of query (ok)
   @retval 0 Success
-
-  @retval nonzero If there is a failure when writing the query (e.g.,
-  write failure), then the error code is returned.
+  @retval > 0  If there is a failure when writing the query (e.g.,
+               write failure), then the error code is returned.
 */
+
 int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
                       ulong query_len, bool is_trans, bool direct, 
                       bool suppress_use, int errcode)
@@ -7208,7 +7228,7 @@
       The current statement is to be ignored, and not written to
       the binlog. Do not call issue_unsafe_warnings().
     */
-    DBUG_RETURN(0);
+    DBUG_RETURN(-1);
   }
 
   /*
@@ -7224,7 +7244,10 @@
   {
     int error;
     if (unlikely(error= binlog_flush_pending_rows_event(TRUE, is_trans)))
+    {
+      DBUG_ASSERT(error > 0);
       DBUG_RETURN(error);
+    }
   }
 
   /*
@@ -7267,7 +7290,7 @@
                ("is_current_stmt_binlog_format_row: %d",
                 is_current_stmt_binlog_format_row()));
     if (is_current_stmt_binlog_format_row())
-      DBUG_RETURN(0);
+      DBUG_RETURN(-1);
     /* Fall through */
 
     /*
@@ -7308,7 +7331,7 @@
       }
 
       binlog_table_maps= 0;
-      DBUG_RETURN(error);
+      DBUG_RETURN(error >= 0 ? error : 1);
     }
 
   case THD::QUERY_TYPE_COUNT:
diff -Nru mariadb-10.3-10.3.18/sql/sql_class.h mariadb-10.3-10.3.22/sql/sql_class.h
--- mariadb-10.3-10.3.18/sql/sql_class.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_class.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,6 @@
 /*
    Copyright (c) 2000, 2016, Oracle and/or its affiliates.
-   Copyright (c) 2009, 2017, MariaDB Corporation.
+   Copyright (c) 2009, 2019, 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
@@ -1620,12 +1620,16 @@
 /**
   @class Sub_statement_state
   @brief Used to save context when executing a function or trigger
+
+  operations on stat tables aren't technically a sub-statement, but they are
+  similar in a sense that they cannot change the transaction status.
 */
 
 /* Defines used for Sub_statement_state::in_sub_stmt */
 
 #define SUB_STMT_TRIGGER 1
 #define SUB_STMT_FUNCTION 2
+#define SUB_STMT_STAT_TABLES 4
 
 
 class Sub_statement_state
@@ -2444,9 +2448,6 @@
   */ 
   bool create_tmp_table_for_derived;
 
-  /* The flag to force reading statistics from EITS tables */
-  bool force_read_stats;
-
   bool save_prep_leaf_list;
 
   /* container for handler's private per-connection data */
@@ -6340,6 +6341,11 @@
 /* Bits in server_command_flags */
 
 /**
+  Statement that deletes existing rows (DELETE, DELETE_MULTI)
+*/
+#define CF_DELETES_DATA (1U << 24)
+
+/**
   Skip the increase of the global query id counter. Commonly set for
   commands that are stateless (won't cause any change on the server
   internal states).
@@ -6543,6 +6549,22 @@
   sql_mode_t old_mode; // SQL mode saved at construction time.
 };
 
+class Switch_to_definer_security_ctx
+{
+ public:
+  Switch_to_definer_security_ctx(THD *thd, TABLE_LIST *table) :
+    m_thd(thd), m_sctx(thd->security_ctx)
+  {
+    if (table->security_ctx)
+      thd->security_ctx= table->security_ctx;
+  }
+  ~Switch_to_definer_security_ctx() { m_thd->security_ctx = m_sctx; }
+
+ private:
+  THD *m_thd;
+  Security_context *m_sctx;
+};
+
 
 /**
   This class resembles the SQL Standard schema qualified object name:
@@ -6761,11 +6783,12 @@
 class ScopedStatementReplication
 {
 public:
-  ScopedStatementReplication(THD *thd) : thd(thd)
-  {
-    if (thd)
-      saved_binlog_format= thd->set_current_stmt_binlog_format_stmt();
-  }
+  ScopedStatementReplication(THD *thd) :
+    saved_binlog_format(thd
+                        ? thd->set_current_stmt_binlog_format_stmt()
+                        : BINLOG_FORMAT_MIXED),
+    thd(thd)
+  {}
   ~ScopedStatementReplication()
   {
     if (thd)
@@ -6773,8 +6796,8 @@
   }
 
 private:
-  enum_binlog_format saved_binlog_format;
-  THD *thd;
+  const enum_binlog_format saved_binlog_format;
+  THD *const thd;
 };
 
 #endif /* MYSQL_SERVER */
diff -Nru mariadb-10.3-10.3.18/sql/sql_cte.cc mariadb-10.3-10.3.22/sql/sql_cte.cc
--- mariadb-10.3-10.3.18/sql/sql_cte.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_cte.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1430,6 +1430,22 @@
 void With_element::print(String *str, enum_query_type query_type)
 {
   str->append(query_name);
+  if (column_list.elements)
+  {
+    List_iterator_fast li(column_list);
+    str->append('(');
+    for (LEX_CSTRING *col_name= li++; ; )
+    {
+      str->append(col_name);
+      col_name= li++;
+      if (!col_name)
+      {
+        str->append(')');
+        break;
+      }
+      str->append(',');
+    }
+  }
   str->append(STRING_WITH_LEN(" as "));
   str->append('(');
   spec->print(str, query_type);
diff -Nru mariadb-10.3-10.3.18/sql/sql_db.cc mariadb-10.3-10.3.22/sql/sql_db.cc
--- mariadb-10.3-10.3.18/sql/sql_db.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_db.cc	2020-01-26 18:37:29.000000000 +0000
@@ -50,7 +50,7 @@
 #define MAX_DROP_TABLE_Q_LEN      1024
 
 const char *del_exts[]= {".BAK", ".opt", NullS};
-static TYPELIB deletable_extentions=
+static TYPELIB deletable_extensions=
 {array_elements(del_exts)-1,"del_exts", del_exts, NULL};
 
 static bool find_db_tables_and_rm_known_files(THD *, MY_DIR *, const char *,
@@ -1140,7 +1140,7 @@
     }
     if (!(extension= strrchr(file->name, '.')))
       extension= strend(file->name);
-    if (find_type(extension, &deletable_extentions, FIND_TYPE_NO_PREFIX) > 0)
+    if (find_type(extension, &deletable_extensions, FIND_TYPE_NO_PREFIX) > 0)
     {
       strxmov(filePath, path, "/", file->name, NullS);
       /*
diff -Nru mariadb-10.3-10.3.18/sql/sql_delete.cc mariadb-10.3-10.3.22/sql/sql_delete.cc
--- mariadb-10.3-10.3.18/sql/sql_delete.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_delete.cc	2020-01-26 18:37:29.000000000 +0000
@@ -225,19 +225,11 @@
 static bool record_should_be_deleted(THD *thd, TABLE *table, SQL_SELECT *sel,
                                      Explain_delete *explain, bool truncate_history)
 {
-  bool check_delete= true;
-
-  if (table->versioned())
-  {
-    bool historical= !table->vers_end_field()->is_max();
-    check_delete= truncate_history ? historical : !historical;
-  }
-
   explain->tracker.on_record_read();
   thd->inc_examined_row_count(1);
   if (table->vfield)
     (void) table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_DELETE);
-  if (check_delete && (!sel || sel->skip_record(thd) > 0))
+  if (!sel || sel->skip_record(thd) > 0)
   {
     explain->tracker.on_record_after_where();
     return true;
@@ -305,29 +297,7 @@
 
   THD_STAGE_INFO(thd, stage_init_update);
 
-  bool delete_history= table_list->vers_conditions.is_set();
-  if (delete_history)
-  {
-    if (table_list->is_view_or_derived())
-    {
-      my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
-      DBUG_RETURN(true);
-    }
-
-    DBUG_ASSERT(table_list->table);
-
-    DBUG_ASSERT(!conds || thd->stmt_arena->is_stmt_execute());
-
-    // conds could be cached from previous SP call
-    if (!conds)
-    {
-      if (select_lex->vers_setup_conds(thd, table_list))
-        DBUG_RETURN(TRUE);
-
-      conds= table_list->on_expr;
-      table_list->on_expr= NULL;
-    }
-  }
+  const bool delete_history= table_list->vers_conditions.delete_history;
 
   if (thd->lex->handle_list_of_derived(table_list, DT_MERGE_FOR_INSERT))
     DBUG_RETURN(TRUE);
@@ -851,7 +821,7 @@
                                         transactional_table, FALSE, FALSE,
                                         errcode);
 
-      if (log_result)
+      if (log_result > 0)
       {
 	error=1;
       }
@@ -940,16 +910,22 @@
                                     select_lex->leaf_tables, FALSE, 
                                     DELETE_ACL, SELECT_ACL, TRUE))
     DBUG_RETURN(TRUE);
-  if (table_list->vers_conditions.is_set())
+
+  if (table_list->vers_conditions.is_set() && table_list->is_view_or_derived())
   {
-    if (table_list->is_view())
-    {
-      my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
-      DBUG_RETURN(true);
-    }
-    if (select_lex->vers_setup_conds(thd, table_list))
-      DBUG_RETURN(true);
+    my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
+    DBUG_RETURN(true);
   }
+
+  DBUG_ASSERT(table_list->table);
+  // conds could be cached from previous SP call
+  DBUG_ASSERT(!table_list->vers_conditions.need_setup() ||
+              !*conds || thd->stmt_arena->is_stmt_execute());
+  if (select_lex->vers_setup_conds(thd, table_list))
+    DBUG_RETURN(TRUE);
+
+  *conds= select_lex->where;
+
   if ((wild_num && setup_wild(thd, table_list, field_list, NULL, wild_num,
                               &select_lex->hidden_bit_fields)) ||
       setup_fields(thd, Ref_ptr_array(),
@@ -1238,11 +1214,6 @@
     if (table->status & (STATUS_NULL_ROW | STATUS_DELETED))
       continue;
 
-    if (table->versioned() && !table->vers_end_field()->is_max())
-    {
-      continue;
-    }
-
     table->file->position(table->record[0]);
     found++;
 
@@ -1522,7 +1493,7 @@
       if (unlikely(thd->binlog_query(THD::ROW_QUERY_TYPE,
                                      thd->query(), thd->query_length(),
                                      transactional_tables, FALSE, FALSE,
-                                     errcode)) &&
+                                     errcode) > 0) &&
           !normal_tables)
       {
 	local_error=1;  // Log write failed: roll back the SQL statement
diff -Nru mariadb-10.3-10.3.18/sql/sql_derived.cc mariadb-10.3-10.3.22/sql/sql_derived.cc
--- mariadb-10.3-10.3.18/sql/sql_derived.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_derived.cc	2020-01-26 18:37:29.000000000 +0000
@@ -689,7 +689,39 @@
        !(derived->is_multitable() &&
          (thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
           thd->lex->sql_command == SQLCOM_DELETE_MULTI))))
+  {
+    /*
+       System versioned tables may still require to get versioning conditions
+       when modifying view (see vers_setup_conds()). Only UPDATE and DELETE are
+       affected because they use WHERE condition.
+    */
+    if (!unit->prepared &&
+        derived->table->versioned() &&
+        derived->merge_underlying_list &&
+        /* choose only those merged views that do not select from other views */
+        !derived->merge_underlying_list->merge_underlying_list)
+    {
+      switch (thd->lex->sql_command)
+      {
+      case SQLCOM_DELETE:
+      case SQLCOM_DELETE_MULTI:
+      case SQLCOM_UPDATE:
+      case SQLCOM_UPDATE_MULTI:
+        if ((res= first_select->vers_setup_conds(thd,
+                                                 derived->merge_underlying_list)))
+          goto exit;
+        if (derived->merge_underlying_list->where)
+        {
+          Query_arena_stmt on_stmt_arena(thd);
+          derived->where= and_items(thd, derived->where,
+                                    derived->merge_underlying_list->where);
+        }
+      default:
+        break;
+      }
+    }
     DBUG_RETURN(FALSE);
+  }
 
   /* prevent name resolving out of derived table */
   for (SELECT_LEX *sl= first_select; sl; sl= sl->next_select())
@@ -807,7 +839,7 @@
   {
     if (!derived->is_with_table_recursive_reference())
     {
-      if (derived->table)
+      if (derived->table && derived->table->s->tmp_table)
         free_tmp_table(thd, derived->table);
       delete derived->derived_result;
     }
diff -Nru mariadb-10.3-10.3.18/sql/sql_insert.cc mariadb-10.3-10.3.22/sql/sql_insert.cc
--- mariadb-10.3-10.3.18/sql/sql_insert.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_insert.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1186,13 +1186,13 @@
           else if (thd->binlog_query(THD::ROW_QUERY_TYPE,
                                      log_query.c_ptr(), log_query.length(),
                                      transactional_table, FALSE, FALSE,
-                                     errcode))
+                                     errcode) > 0)
             error= 1;
         }
         else if (thd->binlog_query(THD::ROW_QUERY_TYPE,
 			           thd->query(), thd->query_length(),
 			           transactional_table, FALSE, FALSE,
-                                   errcode))
+                                   errcode) > 0)
 	  error= 1;
       }
     }
@@ -1646,6 +1646,8 @@
 int vers_insert_history_row(TABLE *table)
 {
   DBUG_ASSERT(table->versioned(VERS_TIMESTAMP));
+  if (!table->vers_write)
+    return 0;
   restore_record(table,record[1]);
 
   // Set Sys_end to now()
@@ -1691,7 +1693,7 @@
   int error, trg_error= 0;
   char *key=0;
   MY_BITMAP *save_read_set, *save_write_set;
-  ulonglong prev_insert_id= table->file->next_insert_id;
+  table->file->store_auto_increment();
   ulonglong insert_id_for_cur_row= 0;
   ulonglong prev_insert_id_for_cur_row= 0;
   DBUG_ENTER("write_record");
@@ -1844,7 +1846,7 @@
         if (res == VIEW_CHECK_ERROR)
           goto before_trg_err;
 
-        table->file->restore_auto_increment(prev_insert_id);
+        table->file->restore_auto_increment();
         info->touched++;
         if (different_records)
         {
@@ -1945,6 +1947,7 @@
           if (table->versioned(VERS_TRX_ID))
           {
             bitmap_set_bit(table->write_set, table->vers_start_field()->field_index);
+            table->file->column_bitmaps_signal();
             table->vers_start_field()->store(0, false);
           }
           if (unlikely(error= table->file->ha_update_row(table->record[1],
@@ -2037,7 +2040,7 @@
     if (!(thd->variables.old_behavior &
           OLD_MODE_NO_DUP_KEY_WARNINGS_WITH_IGNORE))
       table->file->print_error(error, MYF(ME_JUST_WARNING));
-    table->file->restore_auto_increment(prev_insert_id);
+    table->file->restore_auto_increment();
     goto ok_or_after_trg_err;
   }
 
@@ -2060,7 +2063,7 @@
   table->file->print_error(error,MYF(0));
   
 before_trg_err:
-  table->file->restore_auto_increment(prev_insert_id);
+  table->file->restore_auto_increment();
   if (key)
     my_safe_afree(key, table->s->max_unique_length);
   table->column_bitmaps_set(save_read_set, save_write_set);
@@ -2112,11 +2115,15 @@
   ulong auto_increment_offset;
   LEX_STRING query;
   Time_zone *time_zone;
+  char *user, *host, *ip;
+  query_id_t query_id;
+  my_thread_id thread_id;
 
   delayed_row(LEX_STRING const query_arg, enum_duplicates dup_arg,
               bool ignore_arg, bool log_query_arg)
     : record(0), dup(dup_arg), ignore(ignore_arg), log_query(log_query_arg),
-      forced_insert_id(0), query(query_arg), time_zone(0)
+      forced_insert_id(0), query(query_arg), time_zone(0),
+      user(0), host(0), ip(0)
     {}
   ~delayed_row()
   {
@@ -2164,7 +2171,6 @@
     passed from connection thread to the handler thread.
   */
   MDL_request grl_protection;
-
   Delayed_insert(SELECT_LEX *current_select)
     :locks_in_memory(0), thd(next_thread_id()),
      table(0),tables_in_use(0), stacked_inserts(0),
@@ -2173,6 +2179,8 @@
     DBUG_ENTER("Delayed_insert constructor");
     thd.security_ctx->user=(char*) delayed_user;
     thd.security_ctx->host=(char*) my_localhost;
+    thd.security_ctx->ip= NULL;
+    thd.query_id= 0;
     strmake_buf(thd.security_ctx->priv_user, thd.security_ctx->user);
     thd.current_tablenr=0;
     thd.set_command(COM_DELAYED_INSERT);
@@ -2679,6 +2687,7 @@
   delayed_row *row= 0;
   Delayed_insert *di=thd->di;
   const Discrete_interval *forced_auto_inc;
+  size_t user_len, host_len, ip_len;
   DBUG_ENTER("write_delayed");
   DBUG_PRINT("enter", ("query = '%s' length %lu", query.str,
                        (ulong) query.length));
@@ -2712,11 +2721,45 @@
     goto err;
   }
 
+  user_len= host_len= ip_len= 0;
+  row->user= row->host= row->ip= NULL;
+  if (thd->security_ctx)
+  {
+    if (thd->security_ctx->user)
+      user_len= strlen(thd->security_ctx->user) + 1;
+    if (thd->security_ctx->host)
+      host_len= strlen(thd->security_ctx->host) + 1;
+    if (thd->security_ctx->ip)
+      ip_len= strlen(thd->security_ctx->ip) + 1;
+  }
   /* This can't be THREAD_SPECIFIC as it's freed in delayed thread */
-  if (!(row->record= (char*) my_malloc(table->s->reclength,
+  if (!(row->record= (char*) my_malloc(table->s->reclength +
+                                       user_len + host_len + ip_len,
                                        MYF(MY_WME))))
     goto err;
   memcpy(row->record, table->record[0], table->s->reclength);
+
+  if (thd->security_ctx)
+  {
+    if (thd->security_ctx->user)
+    {
+      row->user= row->record + table->s->reclength;
+      memcpy(row->user, thd->security_ctx->user, user_len);
+    }
+    if (thd->security_ctx->host)
+    {
+      row->host= row->record + table->s->reclength + user_len;
+      memcpy(row->host, thd->security_ctx->host, host_len);
+    }
+    if (thd->security_ctx->ip)
+    {
+      row->ip= row->record + table->s->reclength + user_len + host_len;
+      memcpy(row->ip, thd->security_ctx->ip, ip_len);
+    }
+  }
+  row->query_id= thd->query_id;
+  row->thread_id= thd->thread_id;
+
   row->start_time=                thd->start_time;
   row->start_time_sec_part=       thd->start_time_sec_part;
   row->query_start_sec_part_used= thd->query_start_sec_part_used;
@@ -3134,6 +3177,20 @@
       }
       if (di->stacked_inserts)
       {
+        delayed_row *row;
+        I_List_iterator it(di->rows);
+        my_thread_id cur_thd= di->thd.thread_id;
+
+        while ((row= it++))
+        {
+          if (cur_thd != row->thread_id)
+          {
+            mysql_audit_external_lock_ex(&di->thd, row->thread_id,
+                row->user, row->host, row->ip, row->query_id,
+                di->table->s, F_WRLCK);
+            cur_thd= row->thread_id;
+          }
+        }
         if (di->handle_inserts())
         {
           /* Some fatal error */
@@ -3930,6 +3987,7 @@
   int error;
   bool const trans_table= table->file->has_transactions();
   bool changed;
+  bool binary_logged= 0;
   killed_state killed_status= thd->killed;
 
   DBUG_ENTER("select_insert::prepare_eof");
@@ -3977,18 +4035,22 @@
       (likely(!error) || thd->transaction.stmt.modified_non_trans_table))
   {
     int errcode= 0;
+    int res;
     if (likely(!error))
       thd->clear_error();
     else
       errcode= query_error_code(thd, killed_status == NOT_KILLED);
-    if (thd->binlog_query(THD::ROW_QUERY_TYPE,
-                      thd->query(), thd->query_length(),
-                      trans_table, FALSE, FALSE, errcode))
+    res= thd->binlog_query(THD::ROW_QUERY_TYPE,
+                           thd->query(), thd->query_length(),
+                           trans_table, FALSE, FALSE, errcode);
+    if (res > 0)
     {
       table->file->ha_release_auto_increment();
       DBUG_RETURN(true);
     }
+    binary_logged= res == 0 || !table->s->tmp_table;
   }
+  table->s->table_creation_was_logged|= binary_logged;
   table->file->ha_release_auto_increment();
 
   if (unlikely(error))
@@ -4039,8 +4101,9 @@
   DBUG_RETURN(res);
 }
 
-void select_insert::abort_result_set() {
-
+void select_insert::abort_result_set()
+{
+  bool binary_logged= 0;
   DBUG_ENTER("select_insert::abort_result_set");
   /*
     If the creation of the table failed (due to a syntax error, for
@@ -4092,16 +4155,20 @@
         if(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open())
         {
           int errcode= query_error_code(thd, thd->killed == NOT_KILLED);
+          int res;
           /* error of writing binary log is ignored */
-          (void) thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(),
-                                   thd->query_length(),
-                                   transactional_table, FALSE, FALSE, errcode);
+          res= thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(),
+                                 thd->query_length(),
+                                 transactional_table, FALSE, FALSE, errcode);
+          binary_logged= res == 0 || !table->s->tmp_table;
         }
 	if (changed)
 	  query_cache_invalidate3(thd, table, 1);
     }
     DBUG_ASSERT(transactional_table || !changed ||
 		thd->transaction.stmt.modified_non_trans_table);
+
+    table->s->table_creation_was_logged|= binary_logged;
     table->file->ha_release_auto_increment();
   }
 
@@ -4172,6 +4239,7 @@
   /* Add selected items to field list */
   List_iterator_fast it(*items);
   Item *item;
+  bool save_table_creation_was_logged;
   DBUG_ENTER("select_create::create_table_from_items");
 
   tmp_table.s= &share;
@@ -4185,8 +4253,7 @@
   if (!opt_explicit_defaults_for_timestamp)
     promote_first_timestamp_column(&alter_info->create_list);
 
-  if (create_info->vers_fix_system_fields(thd, alter_info, *create_table,
-                                          true))
+  if (create_info->vers_fix_system_fields(thd, alter_info, *create_table))
     DBUG_RETURN(NULL);
 
   while ((item=it++))
@@ -4225,7 +4292,10 @@
     alter_info->create_list.push_back(cr_field, thd->mem_root);
   }
 
-  if (create_info->vers_check_system_fields(thd, alter_info, *create_table))
+  if (create_info->vers_check_system_fields(thd, alter_info,
+                                            create_table->table_name,
+                                            create_table->db,
+                                            select_field_count))
     DBUG_RETURN(NULL);
 
   DEBUG_SYNC(thd,"create_table_select_before_create");
@@ -4323,6 +4393,14 @@
 
   table->reginfo.lock_type=TL_WRITE;
   hooks->prelock(&table, 1);                    // Call prelock hooks
+
+  /*
+    Ensure that decide_logging_format(), called by mysql_lock_tables(), works
+    with temporary tables that will be logged later if needed.
+  */
+  save_table_creation_was_logged= table->s->table_creation_was_logged;
+  table->s->table_creation_was_logged= 1;
+
   /*
     mysql_lock_tables() below should never fail with request to reopen table
     since it won't wait for the table lock (we have exclusive metadata lock on
@@ -4335,8 +4413,11 @@
     /*
       This can happen in innodb when you get a deadlock when using same table
       in insert and select or when you run out of memory.
+      It can also happen if there was a conflict in
+      THD::decide_logging_format()
     */
-    my_error(ER_CANT_LOCK, MYF(0), my_errno);
+    if (!thd->is_error())
+      my_error(ER_CANT_LOCK, MYF(0), my_errno);
     if (*lock)
     {
       mysql_unlock_tables(thd, *lock);
@@ -4346,6 +4427,7 @@
     DBUG_RETURN(0);
     /* purecov: end */
   }
+  table->s->table_creation_was_logged= save_table_creation_was_logged;
   DBUG_RETURN(table);
 }
 
@@ -4551,7 +4633,7 @@
                               /* is_trans */ TRUE,
                               /* direct */ FALSE,
                               /* suppress_use */ FALSE,
-                              errcode);
+                              errcode) > 0;
   }
 
   ha_fake_trx_id(thd);
@@ -4664,8 +4746,6 @@
     }
 #endif /* WITH_WSREP */
   }
-  else if (!thd->is_current_stmt_binlog_format_row())
-    table->s->table_creation_was_logged= 1;
 
   /*
     exit_done must only be set after last potential call to
@@ -4751,7 +4831,8 @@
   if (table)
   {
     bool tmp_table= table->s->tmp_table;
-
+    bool table_creation_was_logged= (!tmp_table ||
+                                     table->s->table_creation_was_logged);
     if (tmp_table)
     {
       DBUG_ASSERT(saved_tmp_table_share);
@@ -4780,7 +4861,9 @@
       /* Remove logging of drop, create + insert rows */
       binlog_reset_cache(thd);
       /* Original table was deleted. We have to log it */
-      log_drop_table(thd, &create_table->db, &create_table->table_name, tmp_table);
+      if (table_creation_was_logged)
+        log_drop_table(thd, &create_table->db, &create_table->table_name,
+                       tmp_table);
     }
   }
   DBUG_VOID_RETURN;
diff -Nru mariadb-10.3-10.3.18/sql/sql_join_cache.cc mariadb-10.3-10.3.22/sql/sql_join_cache.cc
--- mariadb-10.3-10.3.18/sql/sql_join_cache.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_join_cache.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2141,7 +2141,7 @@
     DBUG_ASSERT(!is_key_access());
     /*
        Restore the last record from the join buffer to generate
-       all extentions for it.
+       all extensions for it.
     */
     get_record();		               
   }
diff -Nru mariadb-10.3-10.3.18/sql/sql_lex.cc mariadb-10.3-10.3.22/sql/sql_lex.cc
--- mariadb-10.3-10.3.18/sql/sql_lex.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_lex.cc	2020-01-26 18:37:29.000000000 +0000
@@ -793,7 +793,7 @@
   }
   else
   {
-    delete lex->sphead;
+    sp_head::destroy(lex->sphead);
     lex->sphead= NULL;
   }
 
@@ -3049,13 +3049,13 @@
       DBUG_ASSERT(pkg == pkg->m_top_level_lex->sphead);
       pkg->restore_thd_mem_root(thd);
       LEX *top= pkg->m_top_level_lex;
-      delete pkg;
+      sp_package::destroy(pkg);
       thd->lex= top;
       thd->lex->sphead= NULL;
     }
     else
     {
-      delete thd->lex->sphead;
+      sp_head::destroy(thd->lex->sphead);
       thd->lex->sphead= NULL;
     }
   }
@@ -4480,7 +4480,7 @@
   }
 
   Item *item;
-  List_iterator_fast it(join->fields_list);
+  List_iterator_fast it(join->all_fields);
   select_list_tables= 0;
   while ((item= it++))
   {
@@ -6190,7 +6190,7 @@
   sp_head *sp;
 
   /* Order is important here: new - reset - init */
-  if (likely((sp= new sp_head(package, sph))))
+  if (likely((sp= sp_head::create(package, sph))))
   {
     sp->reset_thd_mem_root(thd);
     sp->init(this);
@@ -7314,7 +7314,7 @@
 
 #define UNSAFE(a, b, c) \
   { \
-  DBUG_PRINT("unsafe_mixed_statement", ("SETTING BASE VALUES: %s, %s, %02X\n", \
+  DBUG_PRINT("unsafe_mixed_statement", ("SETTING BASE VALUES: %s, %s, %02X", \
     LEX::stmt_accessed_table_string(a), \
     LEX::stmt_accessed_table_string(b), \
     c)); \
@@ -7829,7 +7829,7 @@
       return 0;
     }
   }
-  if (unlikely(!(pkg= new sp_package(this, name_arg, sph))))
+  if (unlikely(!(pkg= sp_package::create(this, name_arg, sph))))
     return NULL;
   pkg->reset_thd_mem_root(thd);
   pkg->init(this);
diff -Nru mariadb-10.3-10.3.18/sql/sql_lex.h mariadb-10.3-10.3.22/sql/sql_lex.h
--- mariadb-10.3-10.3.18/sql/sql_lex.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_lex.h	2020-01-26 18:37:29.000000000 +0000
@@ -1522,28 +1522,6 @@
   uint sroutines_list_own_elements;
 
   /**
-    Locking state of tables in this particular statement.
-
-    If we under LOCK TABLES or in prelocked mode we consider tables
-    for the statement to be "locked" if there was a call to lock_tables()
-    (which called handler::start_stmt()) for tables of this statement
-    and there was no matching close_thread_tables() call.
-
-    As result this state may differ significantly from one represented
-    by Open_tables_state::lock/locked_tables_mode more, which are always
-    "on" under LOCK TABLES or in prelocked mode.
-  */
-  enum enum_lock_tables_state {
-    LTS_NOT_LOCKED = 0,
-    LTS_LOCKED
-  };
-  enum_lock_tables_state lock_tables_state;
-  bool is_query_tables_locked()
-  {
-    return (lock_tables_state == LTS_LOCKED);
-  }
-
-  /**
     Number of tables which were open by open_tables() and to be locked
     by lock_tables().
     Note that we set this member only in some cases, when this value
@@ -2018,6 +1996,14 @@
                 ((1U << STMT_READS_TEMP_TRANS_TABLE) |
                  (1U << STMT_WRITES_TEMP_TRANS_TABLE))) != 0);
   }
+  inline bool stmt_writes_to_non_temp_table()
+  {
+    DBUG_ENTER("THD::stmt_writes_to_non_temp_table");
+
+    DBUG_RETURN((stmt_accessed_table_flag &
+                ((1U << STMT_WRITES_TRANS_TABLE) |
+                 (1U << STMT_WRITES_NON_TRANS_TABLE))));
+  }
 
   /**
     Checks if a temporary non-transactional table is about to be accessed
@@ -2069,7 +2055,7 @@
       unsafe= (binlog_unsafe_map[stmt_accessed_table_flag] & condition);
 
 #if !defined(DBUG_OFF)
-      DBUG_PRINT("LEX::is_mixed_stmt_unsafe", ("RESULT %02X %02X %02X\n", condition,
+      DBUG_PRINT("LEX::is_mixed_stmt_unsafe", ("RESULT %02X %02X %02X", condition,
               binlog_unsafe_map[stmt_accessed_table_flag],
               (binlog_unsafe_map[stmt_accessed_table_flag] & condition)));
  
@@ -4060,6 +4046,8 @@
   }
   bool tvc_finalize();
   bool tvc_finalize_derived();
+
+  void mark_first_table_as_inserting();
 };
 
 
diff -Nru mariadb-10.3-10.3.18/sql/sql_load.cc mariadb-10.3-10.3.22/sql/sql_load.cc
--- mariadb-10.3-10.3.18/sql/sql_load.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_load.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2063,7 +2063,7 @@
       chr= read_value(delim, &value);
       if (attribute.length() > 0 && value.length() > 0)
       {
-        DBUG_PRINT("read_xml", ("lev:%i att:%s val:%s\n",
+        DBUG_PRINT("read_xml", ("lev:%i att:%s val:%s",
                                 level + 1,
                                 attribute.c_ptr_safe(),
                                 value.c_ptr_safe()));
diff -Nru mariadb-10.3-10.3.18/sql/sql_parse.cc mariadb-10.3-10.3.22/sql/sql_parse.cc
--- mariadb-10.3-10.3.18/sql/sql_parse.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_parse.cc	2020-01-26 18:37:29.000000000 +0000
@@ -522,7 +522,6 @@
   server_command_flags[COM_STMT_SEND_LONG_DATA]= CF_SKIP_WSREP_CHECK;
   server_command_flags[COM_REGISTER_SLAVE]= CF_SKIP_WSREP_CHECK;
   server_command_flags[COM_MULTI]= CF_SKIP_WSREP_CHECK | CF_NO_COM_MULTI;
-  server_command_flags[CF_NO_COM_MULTI]= CF_NO_COM_MULTI;
 
   /* Initialize the sql command flags array. */
   memset(sql_command_flags, 0, sizeof(sql_command_flags));
@@ -606,11 +605,12 @@
                                             CF_CAN_GENERATE_ROW_EVENTS |
                                             CF_OPTIMIZER_TRACE |
                                             CF_CAN_BE_EXPLAINED |
-                                            CF_SP_BULK_SAFE;
+                                            CF_SP_BULK_SAFE | CF_DELETES_DATA;
   sql_command_flags[SQLCOM_DELETE_MULTI]=   CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
                                             CF_CAN_GENERATE_ROW_EVENTS |
                                             CF_OPTIMIZER_TRACE |
-                                            CF_CAN_BE_EXPLAINED;
+                                            CF_CAN_BE_EXPLAINED |
+                                            CF_DELETES_DATA;
   sql_command_flags[SQLCOM_REPLACE]=        CF_CHANGES_DATA | CF_REEXECUTION_FRAGILE |
                                             CF_CAN_GENERATE_ROW_EVENTS |
                                             CF_OPTIMIZER_TRACE |
@@ -3283,6 +3283,10 @@
 #endif
   DBUG_ENTER("mysql_execute_command");
 
+  // check that we correctly marked first table for data insertion
+  DBUG_ASSERT(!(sql_command_flags[lex->sql_command] & CF_INSERTS_DATA) ||
+              first_table->for_insert_data);
+
   DBUG_ASSERT(thd->transaction.stmt.is_empty() || thd->in_sub_stmt);
   /*
     Each statement or replication event which might produce deadlock
@@ -4706,8 +4710,10 @@
     {
       result= new (thd->mem_root) multi_delete(thd, aux_tables,
                                                lex->table_count);
-      if (unlikely(result))
+      if (likely(result))
       {
+        if (unlikely(select_lex->vers_setup_conds(thd, aux_tables)))
+          goto multi_delete_error;
         res= mysql_select(thd,
                           select_lex->get_table_list(),
                           select_lex->with_wild,
@@ -4729,6 +4735,7 @@
           if (lex->describe || lex->analyze_stmt)
             res= thd->lex->explain->send_explain(thd);
         }
+      multi_delete_error:
         delete result;
       }
     }
@@ -5076,7 +5083,7 @@
   /* Don't do it, if we are inside a SP */
   if (!thd->spcont)
   {
-    delete lex->sphead;
+    sp_head::destroy(lex->sphead);
     lex->sphead= NULL;
   }
   /* lex->unit.cleanup() is called outside, no need to call it here */
@@ -6681,11 +6688,7 @@
 bool check_single_table_access(THD *thd, ulong privilege, 
                                TABLE_LIST *all_tables, bool no_errors)
 {
-  Security_context * backup_ctx= thd->security_ctx;
-
-  /* we need to switch to the saved context (if any) */
-  if (all_tables->security_ctx)
-    thd->security_ctx= all_tables->security_ctx;
+  Switch_to_definer_security_ctx backup_sctx(thd, all_tables);
 
   const char *db_name;
   if ((all_tables->view || all_tables->field_translation) &&
@@ -6698,20 +6701,15 @@
                    &all_tables->grant.privilege,
                    &all_tables->grant.m_internal,
                    0, no_errors))
-    goto deny;
+    return 1;
 
   /* Show only 1 table for check_grant */
   if (!(all_tables->belong_to_view &&
         (thd->lex->sql_command == SQLCOM_SHOW_FIELDS)) &&
       check_grant(thd, privilege, all_tables, FALSE, 1, no_errors))
-    goto deny;
+    return 1;
 
-  thd->security_ctx= backup_ctx;
   return 0;
-
-deny:
-  thd->security_ctx= backup_ctx;
-  return 1;
 }
 
 /**
@@ -6886,7 +6884,6 @@
 {
   TABLE_LIST *org_tables= tables;
   TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table();
-  Security_context *sctx= thd->security_ctx, *backup_ctx= thd->security_ctx;
   uint i= 0;
   /*
     The check that first_not_own_table is not reached is for the case when
@@ -6898,12 +6895,9 @@
   {
     TABLE_LIST *const table_ref= tables->correspondent_table ?
       tables->correspondent_table : tables;
+    Switch_to_definer_security_ctx backup_ctx(thd, table_ref);
 
     ulong want_access= requirements;
-    if (table_ref->security_ctx)
-      sctx= table_ref->security_ctx;
-    else
-      sctx= backup_ctx;
 
     /*
        Register access for view underlying table.
@@ -6914,7 +6908,7 @@
     if (table_ref->schema_table_reformed)
     {
       if (check_show_access(thd, table_ref))
-        goto deny;
+        return 1;
       continue;
     }
 
@@ -6924,8 +6918,6 @@
     if (table_ref->is_anonymous_derived_table())
       continue;
 
-    thd->security_ctx= sctx;
-
     if (table_ref->sequence)
     {
       /* We want to have either SELECT or INSERT rights to sequences depending
@@ -6939,15 +6931,11 @@
                      &table_ref->grant.privilege,
                      &table_ref->grant.m_internal,
                      0, no_errors))
-      goto deny;
+      return 1;
   }
-  thd->security_ctx= backup_ctx;
   return check_grant(thd,requirements,org_tables,
                      any_combination_of_privileges_will_do,
                      number, no_errors);
-deny:
-  thd->security_ctx= backup_ctx;
-  return TRUE;
 }
 
 
@@ -8487,9 +8475,9 @@
 
   TABLE_LIST *tbl;
   List *right_op_jl= right_op->join_list;
-  TABLE_LIST *r_tbl= right_op_jl->pop();
+  IF_DBUG(const TABLE_LIST *r_tbl=,) right_op_jl->pop();
   DBUG_ASSERT(right_op == r_tbl);
-  TABLE_LIST *l_tbl= right_op_jl->pop();
+  IF_DBUG(const TABLE_LIST *l_tbl=,) right_op_jl->pop();
   DBUG_ASSERT(left_op == l_tbl);
   TABLE_LIST *cj_nest;
 
@@ -9498,7 +9486,7 @@
 bool delete_precheck(THD *thd, TABLE_LIST *tables)
 {
   DBUG_ENTER("delete_precheck");
-  if (tables->vers_conditions.is_set())
+  if (tables->vers_conditions.delete_history)
   {
     if (check_one_table_access(thd, DELETE_HISTORY_ACL, tables))
       DBUG_RETURN(TRUE);
@@ -10201,3 +10189,14 @@
   }
   return cs;
 }
+
+void LEX::mark_first_table_as_inserting()
+{
+  TABLE_LIST *t= select_lex.table_list.first;
+  DBUG_ENTER("Query_tables_list::mark_tables_with_important_flags");
+  DBUG_ASSERT(sql_command_flags[sql_command] & CF_INSERTS_DATA);
+  t->for_insert_data= TRUE;
+  DBUG_PRINT("info", ("table_list: %p  name: %s  db: %s  command: %u",
+                      t, t->table_name.str,t->db.str, sql_command));
+  DBUG_VOID_RETURN;
+}
diff -Nru mariadb-10.3-10.3.18/sql/sql_partition.cc mariadb-10.3-10.3.22/sql/sql_partition.cc
--- mariadb-10.3-10.3.18/sql/sql_partition.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_partition.cc	2020-01-26 18:37:29.000000000 +0000
@@ -146,7 +146,7 @@
   item= item->safe_charset_converter(thd, cs);
   context->table_list= NULL;
   thd->where= "convert character set partition constant";
-  if (item->fix_fields_if_needed(thd, (Item**)NULL))
+  if (item && item->fix_fields_if_needed(thd, (Item**)NULL))
     item= NULL;
   thd->where= save_where;
   context->table_list= save_list;
@@ -4794,6 +4794,69 @@
 }
 
 
+/**
+  Check if the ALTER command tries to change DATA DIRECTORY
+  or INDEX DIRECTORY for its partitions and warn if so.
+  @param thd  THD
+  @param part_elem partition_element to check
+ */
+static void warn_if_datadir_altered(THD *thd,
+    const partition_element *part_elem)
+{
+  DBUG_ASSERT(part_elem);
+
+  if (part_elem->engine_type &&
+      part_elem->engine_type->db_type != DB_TYPE_INNODB)
+    return;
+
+  if (part_elem->data_file_name)
+  {
+    push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+        WARN_INNODB_PARTITION_OPTION_IGNORED,
+        ER(WARN_INNODB_PARTITION_OPTION_IGNORED),
+        "DATA DIRECTORY");
+  }
+  if (part_elem->index_file_name)
+  {
+    push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+        WARN_INNODB_PARTITION_OPTION_IGNORED,
+        ER(WARN_INNODB_PARTITION_OPTION_IGNORED),
+        "INDEX DIRECTORY");
+  }
+}
+
+
+/**
+  Currently changing DATA DIRECTORY and INDEX DIRECTORY for InnoDB partitions is
+  not possible. This function checks it and warns on that case.
+  @param thd THD
+  @param tab_part_info old partition info
+  @param alt_part_info new partition info
+ */
+static void check_datadir_altered_for_innodb(THD *thd,
+    partition_info *tab_part_info,
+    partition_info *alt_part_info)
+{
+  if (tab_part_info->default_engine_type->db_type != DB_TYPE_INNODB)
+    return;
+
+  for (List_iterator_fast it(alt_part_info->partitions);
+       partition_element *part_elem= it++;)
+  {
+    if (alt_part_info->is_sub_partitioned())
+    {
+      for (List_iterator_fast it2(part_elem->subpartitions);
+           const partition_element *sub_part_elem= it2++;)
+      {
+        warn_if_datadir_altered(thd, sub_part_elem);
+      }
+    }
+    else
+      warn_if_datadir_altered(thd, part_elem);
+  }
+}
+
+
 /*
   Prepare for ALTER TABLE of partition structure
 
@@ -5629,6 +5692,8 @@
       {
         goto err;
       }
+      check_datadir_altered_for_innodb(thd, tab_part_info, alt_part_info);
+
 /*
 Online handling:
 REORGANIZE PARTITION:
diff -Nru mariadb-10.3-10.3.18/sql/sql_partition_admin.cc mariadb-10.3-10.3.22/sql/sql_partition_admin.cc
--- mariadb-10.3-10.3.18/sql/sql_partition_admin.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_partition_admin.cc	2020-01-26 18:37:29.000000000 +0000
@@ -61,7 +61,7 @@
     referenced from this structure will be modified.
     @todo move these into constructor...
   */
-  HA_CREATE_INFO create_info(lex->create_info);
+  IF_DBUG(HA_CREATE_INFO create_info(lex->create_info);,)
   Alter_info alter_info(lex->alter_info, thd->mem_root);
   ulong priv_needed= ALTER_ACL | DROP_ACL | INSERT_ACL | CREATE_ACL;
 
diff -Nru mariadb-10.3-10.3.18/sql/sql_prepare.cc mariadb-10.3-10.3.22/sql/sql_prepare.cc
--- mariadb-10.3-10.3.18/sql/sql_prepare.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_prepare.cc	2020-01-26 18:37:29.000000000 +0000
@@ -3274,7 +3274,7 @@
   /* Query text for binary, general or slow log, if any of them is open */
   String expanded_query;
   DBUG_ENTER("mysql_sql_stmt_execute");
-  DBUG_PRINT("info", ("EXECUTE: %.*s\n", (int) name->length, name->str));
+  DBUG_PRINT("info", ("EXECUTE: %.*s", (int) name->length, name->str));
 
   if (!(stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
   {
@@ -3512,7 +3512,7 @@
 {
   Prepared_statement* stmt;
   LEX_CSTRING *name= &thd->lex->prepared_stmt_name;
-  DBUG_PRINT("info", ("DEALLOCATE PREPARE: %.*s\n", (int) name->length,
+  DBUG_PRINT("info", ("DEALLOCATE PREPARE: %.*s", (int) name->length,
                       name->str));
 
   if (! (stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
@@ -3848,7 +3848,7 @@
   free_items();
   if (lex)
   {
-    delete lex->sphead;
+    sp_head::destroy(lex->sphead);
     delete lex->result;
     delete (st_lex_local *) lex;
   }
diff -Nru mariadb-10.3-10.3.18/sql/sql_repl.cc mariadb-10.3-10.3.22/sql/sql_repl.cc
--- mariadb-10.3-10.3.18/sql/sql_repl.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_repl.cc	2020-01-26 18:37:29.000000000 +0000
@@ -427,16 +427,27 @@
 
 /**
    Internal to mysql_binlog_send() routine that recalculates checksum for
-   a FD event (asserted) that needs additional arranment prior sending to slave.
+   1. FD event (asserted) that needs additional arranment prior sending to slave.
+   2. Start_encryption_log_event whose Ignored flag is set
+TODO DBUG_ASSERT can be removed if this function is used for more general cases
 */
-inline void fix_checksum(String *packet, ulong ev_offset)
+
+inline void fix_checksum(enum_binlog_checksum_alg checksum_alg, String *packet,
+                         ulong ev_offset)
 {
+  if (checksum_alg == BINLOG_CHECKSUM_ALG_OFF ||
+      checksum_alg == BINLOG_CHECKSUM_ALG_UNDEF)
+    return;
   /* recalculate the crc for this event */
   uint data_len = uint4korr(packet->ptr() + ev_offset + EVENT_LEN_OFFSET);
   ha_checksum crc;
-  DBUG_ASSERT(data_len == 
+  DBUG_ASSERT((data_len ==
               LOG_EVENT_MINIMAL_HEADER_LEN + FORMAT_DESCRIPTION_HEADER_LEN +
-              BINLOG_CHECKSUM_ALG_DESC_LEN + BINLOG_CHECKSUM_LEN);
+              BINLOG_CHECKSUM_ALG_DESC_LEN + BINLOG_CHECKSUM_LEN) ||
+              (data_len ==
+              LOG_EVENT_MINIMAL_HEADER_LEN + BINLOG_CRYPTO_SCHEME_LENGTH +
+              BINLOG_KEY_VERSION_LENGTH + BINLOG_NONCE_LENGTH +
+              BINLOG_CHECKSUM_LEN));
   crc= my_checksum(0, (uchar *)packet->ptr() + ev_offset, data_len -
                    BINLOG_CHECKSUM_LEN);
   int4store(packet->ptr() + ev_offset + data_len - BINLOG_CHECKSUM_LEN, crc);
@@ -2169,6 +2180,7 @@
   THD *thd= info->thd;
   String *packet= info->packet;
   Log_event_type event_type;
+  bool initial_log_pos= info->clear_initial_log_pos;
   DBUG_ENTER("send_format_descriptor_event");
 
   /**
@@ -2267,7 +2279,7 @@
 
   (*packet)[FLAGS_OFFSET+ev_offset] &= ~LOG_EVENT_BINLOG_IN_USE_F;
 
-  if (info->clear_initial_log_pos)
+  if (initial_log_pos)
   {
     info->clear_initial_log_pos= false;
     /*
@@ -2285,9 +2297,7 @@
               ST_CREATED_OFFSET+ev_offset, (ulong) 0);
 
     /* fix the checksum due to latest changes in header */
-    if (info->current_checksum_alg != BINLOG_CHECKSUM_ALG_OFF &&
-      info->current_checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF)
-      fix_checksum(packet, ev_offset);
+    fix_checksum(info->current_checksum_alg, packet, ev_offset);
   }
   else if (info->using_gtid_state)
   {
@@ -2308,9 +2318,7 @@
     {
       int4store((char*) packet->ptr()+LOG_EVENT_MINIMAL_HEADER_LEN+
                 ST_CREATED_OFFSET+ev_offset, (ulong) 0);
-      if (info->current_checksum_alg != BINLOG_CHECKSUM_ALG_OFF &&
-          info->current_checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF)
-        fix_checksum(packet, ev_offset);
+      fix_checksum(info->current_checksum_alg, packet, ev_offset);
     }
   }
 
@@ -2323,12 +2331,16 @@
   }
 
   /*
-    Read the following Start_encryption_log_event but don't send it to slave.
-    Slave doesn't need to know whether master's binlog is encrypted,
-    and if it'll want to encrypt its logs, it should generate its own
-    random nonce, not use the one from the master.
+    Read the following Start_encryption_log_event and send it to slave as
+    Ignorable_log_event. Although Slave doesn't need to know whether master's
+    binlog is encrypted but it needs to update slave log pos (for mysqlbinlog).
+
+    If slave want to encrypt its logs, it should generate its own
+    random nonce, it should not use the one from the master.
   */
-  packet->length(0);
+  /* reset transmit packet for the event read from binary log file */
+  if (reset_transmit_packet(info, info->flags, &ev_offset, &info->errmsg))
+    DBUG_RETURN(1);
   info->last_pos= linfo->pos;
   error= Log_event::read_log_event(log, packet, info->fdev,
                                    opt_master_verify_checksum
@@ -2342,12 +2354,13 @@
     DBUG_RETURN(1);
   }
 
-  event_type= (Log_event_type)((uchar)(*packet)[LOG_EVENT_OFFSET]);
+  event_type= (Log_event_type)((uchar)(*packet)[LOG_EVENT_OFFSET + ev_offset]);
   if (event_type == START_ENCRYPTION_EVENT)
   {
     Start_encryption_log_event *sele= (Start_encryption_log_event *)
-      Log_event::read_log_event(packet->ptr(), packet->length(), &info->errmsg,
-                                info->fdev, BINLOG_CHECKSUM_ALG_OFF);
+      Log_event::read_log_event(packet->ptr() + ev_offset, packet->length()
+                                - ev_offset, &info->errmsg, info->fdev,
+                                BINLOG_CHECKSUM_ALG_OFF);
     if (!sele)
     {
       info->error= ER_MASTER_FATAL_ERROR_READING_BINLOG;
@@ -2361,6 +2374,18 @@
       delete sele;
       DBUG_RETURN(1);
     }
+    /* Make it Ignorable_log_event and send it */
+    (*packet)[FLAGS_OFFSET+ev_offset] |= LOG_EVENT_IGNORABLE_F;
+    if (initial_log_pos)
+      int4store((char*) packet->ptr()+LOG_POS_OFFSET+ev_offset, (ulong) 0);
+    /* fix the checksum due to latest changes in header */
+    fix_checksum(info->current_checksum_alg, packet, ev_offset);
+    if (my_net_write(info->net, (uchar*) packet->ptr(), packet->length()))
+    {
+      info->errmsg= "Failed on my_net_write()";
+      info->error= ER_UNKNOWN_ERROR;
+      DBUG_RETURN(1);
+    }
     delete sele;
   }
   else if (start_pos == BIN_LOG_HEADER_SIZE)
@@ -2752,7 +2777,10 @@
 
   /* Check if the dump thread is created by a slave with semisync enabled. */
   thd->semi_sync_slave = is_semi_sync_slave();
-  if (repl_semisync_master.dump_start(thd, log_ident, pos))
+
+  DBUG_ASSERT(pos == linfo.pos);
+
+  if (repl_semisync_master.dump_start(thd, linfo.log_file_name, linfo.pos))
   {
     info->errmsg= "Failed to run hook 'transmit_start'";
     info->error= ER_UNKNOWN_ERROR;
@@ -3261,7 +3289,7 @@
   char fname[FN_REFLEN];
   int thread_mask= 0, error= 0;
   uint sql_errno=ER_UNKNOWN_ERROR;
-  const char* errmsg= "Unknown error occurred while reseting slave";
+  const char* errmsg= "Unknown error occurred while resetting slave";
   char master_info_file_tmp[FN_REFLEN];
   char relay_log_info_file_tmp[FN_REFLEN];
   DBUG_ENTER("reset_slave");
@@ -3847,7 +3875,7 @@
   }
 
   bool ret= 0;
-  /* Temporarily disable master semisync before reseting master. */
+  /* Temporarily disable master semisync before resetting master. */
   repl_semisync_master.before_reset_master();
   ret= mysql_bin_log.reset_logs(thd, 1, init_state, init_state_len,
                                 next_log_number);
@@ -3871,6 +3899,11 @@
   List field_list;
   const char *errmsg = 0;
   bool ret = TRUE;
+  /*
+     Using checksum validate the correctness of event pos specified in show
+     binlog events command.
+  */
+  bool verify_checksum_once= false;
   IO_CACHE log;
   File file = -1;
   MYSQL_BIN_LOG *binary_log= NULL;
@@ -3926,6 +3959,10 @@
       mi= 0;
     }
 
+    /* Validate user given position using checksum */
+    if (lex_mi->pos == pos && !opt_master_verify_checksum)
+      verify_checksum_once= true;
+
     unit->set_limit(thd->lex->current_select);
     limit_start= unit->offset_limit_cnt;
     limit_end= unit->select_limit_cnt;
@@ -4005,15 +4042,16 @@
     for (event_count = 0;
          (ev = Log_event::read_log_event(&log,
                                          description_event,
-                                         opt_master_verify_checksum)); )
+                                         (opt_master_verify_checksum ||
+                                          verify_checksum_once))); )
     {
       if (event_count >= limit_start &&
-	  ev->net_send(protocol, linfo.log_file_name, pos))
+          ev->net_send(protocol, linfo.log_file_name, pos))
       {
-	errmsg = "Net error";
-	delete ev;
+        errmsg = "Net error";
+        delete ev;
         mysql_mutex_unlock(log_lock);
-	goto err;
+        goto err;
       }
 
       if (ev->get_type_code() == FORMAT_DESCRIPTION_EVENT)
@@ -4039,10 +4077,11 @@
         delete ev;
       }
 
+      verify_checksum_once= false;
       pos = my_b_tell(&log);
 
       if (++event_count >= limit_end)
-	break;
+        break;
     }
 
     if (unlikely(event_count < limit_end && log.error))
diff -Nru mariadb-10.3-10.3.18/sql/sql_select.cc mariadb-10.3-10.3.22/sql/sql_select.cc
--- mariadb-10.3-10.3.18/sql/sql_select.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_select.cc	2020-01-26 18:37:29.000000000 +0000
@@ -100,10 +100,6 @@
 static bool are_tables_local(JOIN_TAB *jtab, table_map used_tables);
 static bool create_ref_for_key(JOIN *join, JOIN_TAB *j, KEYUSE *org_keyuse,
 			       bool allow_full_scan, table_map used_tables);
-void best_access_path(JOIN *join, JOIN_TAB *s, 
-                             table_map remaining_tables, uint idx, 
-                             bool disable_jbuf, double record_count,
-                             POSITION *pos, POSITION *loose_scan_pos);
 static void optimize_straight_join(JOIN *join, table_map join_tables);
 static bool greedy_search(JOIN *join, table_map remaining_tables,
                           uint depth, uint prune_level,
@@ -681,6 +677,7 @@
 {
   vers_asof_timestamp_t &in= thd->variables.vers_asof_timestamp;
   type= (vers_system_time_t) in.type;
+  delete_history= false;
   start.unit= VERS_TIMESTAMP;
   if (type != SYSTEM_TIME_UNSPECIFIED && type != SYSTEM_TIME_ALL)
   {
@@ -713,6 +710,7 @@
     end.print(str, query_type, STRING_WITH_LEN(" AND "));
     break;
   case SYSTEM_TIME_BEFORE:
+  case SYSTEM_TIME_HISTORY:
     DBUG_ASSERT(0);
     break;
   case SYSTEM_TIME_ALL:
@@ -721,23 +719,22 @@
   }
 }
 
+static
+bool skip_setup_conds(THD *thd)
+{
+  return (!thd->stmt_arena->is_conventional()
+          && !thd->stmt_arena->is_stmt_prepare_or_first_sp_execute())
+         || thd->lex->is_view_context_analysis();
+}
+
 int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
 {
   DBUG_ENTER("SELECT_LEX::vers_setup_cond");
 #define newx new (thd->mem_root)
 
+  const bool update_conds= !skip_setup_conds(thd);
   TABLE_LIST *table;
 
-  if (!thd->stmt_arena->is_conventional() &&
-      !thd->stmt_arena->is_stmt_prepare_or_first_sp_execute())
-  {
-    // statement is already prepared
-    DBUG_RETURN(0);
-  }
-
-  if (thd->lex->is_view_context_analysis())
-    DBUG_RETURN(0);
-
   if (!versioned_tables)
   {
     for (table= tables; table; table= table->next_local)
@@ -780,9 +777,22 @@
     }
   }
 
+  bool is_select= false;
+  switch (thd->lex->sql_command)
+  {
+  case SQLCOM_SELECT:
+  case SQLCOM_INSERT_SELECT:
+  case SQLCOM_REPLACE_SELECT:
+  case SQLCOM_DELETE_MULTI:
+  case SQLCOM_UPDATE_MULTI:
+    is_select= true;
+  default:
+    break;
+  }
+
   for (table= tables; table; table= table->next_local)
   {
-    if (!table->table || !table->table->versioned())
+    if (!table->table || table->is_view() || !table->table->versioned())
       continue;
 
     vers_select_conds_t &vers_conditions= table->vers_conditions;
@@ -794,13 +804,15 @@
       */
       if (table->partition_names && table->table->part_info->vers_info)
       {
-        if (vers_conditions.is_set())
+        /* If the history is stored in partitions, then partitions
+            themselves are not versioned. */
+        if (vers_conditions.was_set())
         {
           my_error(ER_VERS_QUERY_IN_PARTITION, MYF(0), table->alias.str);
           DBUG_RETURN(-1);
         }
-        else
-          vers_conditions.init(SYSTEM_TIME_ALL);
+        else if (!vers_conditions.is_set())
+          vers_conditions.type= SYSTEM_TIME_ALL;
       }
 #endif
 
@@ -812,7 +824,7 @@
     }
 
     // propagate system_time from sysvar
-    if (!vers_conditions.is_set())
+    if (!vers_conditions.is_set() && is_select)
     {
       if (vers_conditions.init_from_sysvar(thd))
         DBUG_RETURN(-1);
@@ -838,7 +850,7 @@
 
     bool timestamps_only= table->table->versioned(VERS_TIMESTAMP);
 
-    if (vers_conditions.is_set())
+    if (vers_conditions.is_set() && vers_conditions.type != SYSTEM_TIME_HISTORY)
     {
       thd->where= "FOR SYSTEM_TIME";
       /* TODO: do resolve fix_length_and_dec(), fix_fields(). This requires
@@ -855,6 +867,9 @@
       }
     }
 
+    if (!update_conds)
+      continue;
+
     Item *cond1= NULL, *cond2= NULL, *cond3= NULL, *curr= NULL;
     Item *point_in_time1= vers_conditions.start.item;
     Item *point_in_time2= vers_conditions.end.item;
@@ -865,10 +880,14 @@
       switch (vers_conditions.type)
       {
       case SYSTEM_TIME_UNSPECIFIED:
+      case SYSTEM_TIME_HISTORY:
         thd->variables.time_zone->gmt_sec_to_TIME(&max_time, TIMESTAMP_MAX_VALUE);
         max_time.second_part= TIME_MAX_SECOND_PART;
         curr= newx Item_datetime_literal(thd, &max_time, TIME_SECOND_PART_DIGITS);
-        cond1= newx Item_func_eq(thd, row_end, curr);
+        if (vers_conditions.type == SYSTEM_TIME_UNSPECIFIED)
+          cond1= newx Item_func_eq(thd, row_end, curr);
+        else
+          cond1= newx Item_func_lt(thd, row_end, curr);
         break;
       case SYSTEM_TIME_AS_OF:
         cond1= newx Item_func_le(thd, row_start, point_in_time1);
@@ -900,8 +919,12 @@
       switch (vers_conditions.type)
       {
       case SYSTEM_TIME_UNSPECIFIED:
+      case SYSTEM_TIME_HISTORY:
         curr= newx Item_int(thd, ULONGLONG_MAX);
-        cond1= newx Item_func_eq(thd, row_end, curr);
+        if (vers_conditions.type == SYSTEM_TIME_UNSPECIFIED)
+          cond1= newx Item_func_eq(thd, row_end, curr);
+        else
+          cond1= newx Item_func_lt(thd, row_end, curr);
         break;
       case SYSTEM_TIME_AS_OF:
         trx_id0= vers_conditions.start.unit == VERS_TIMESTAMP
@@ -942,7 +965,19 @@
     {
       cond1= and_items(thd, cond2, cond1);
       cond1= and_items(thd, cond3, cond1);
-      table->on_expr= and_items(thd, table->on_expr, cond1);
+      if (is_select)
+        table->on_expr= and_items(thd, table->on_expr, cond1);
+      else
+      {
+        if (join)
+        {
+          where= and_items(thd, join->conds, cond1);
+          join->conds= where;
+        }
+        else
+          where= and_items(thd, where, cond1);
+        table->where= and_items(thd, table->where, cond1);
+      }
     }
 
     table->vers_conditions.type= SYSTEM_TIME_ALL;
@@ -1678,7 +1713,20 @@
     }
   }
   
-  conds= optimize_cond(this, conds, join_list, FALSE,
+  bool ignore_on_expr= false;
+  /*
+    PS/SP note: on_expr of versioned table can not be reallocated
+    (see build_equal_items() below) because it can be not rebuilt
+    at second invocation.
+  */
+  if (!thd->stmt_arena->is_conventional() && thd->mem_root != thd->stmt_arena->mem_root)
+    for (TABLE_LIST *tbl= tables_list; tbl; tbl= tbl->next_local)
+      if (tbl->table && tbl->on_expr && tbl->table->versioned())
+      {
+        ignore_on_expr= true;
+        break;
+      }
+  conds= optimize_cond(this, conds, join_list, ignore_on_expr,
                        &cond_value, &cond_equal, OPT_LINK_EQUAL_FIELDS);
   
   if (thd->is_error())
@@ -1764,6 +1812,7 @@
         zero_result_cause= "Zero limit";
       }
       table_count= top_join_tab_count= 0;
+      handle_implicit_grouping_with_window_funcs();
       error= 0;
       subq_exit_fl= true;
       goto setup_subq_exit;
@@ -1811,6 +1860,7 @@
         table_count= top_join_tab_count= 0;
 	error=0;
         subq_exit_fl= true;
+        handle_implicit_grouping_with_window_funcs();
         goto setup_subq_exit;
       }
       if (res > 1)
@@ -1826,6 +1876,7 @@
       tables_list= 0;				// All tables resolved
       select_lex->min_max_opt_list.empty();
       const_tables= top_join_tab_count= table_count;
+      handle_implicit_grouping_with_window_funcs();
       /*
         Extract all table-independent conditions and replace the WHERE
         clause with them. All other conditions were computed by opt_sum_query
@@ -1971,6 +2022,7 @@
     zero_result_cause= "no matching row in const table";
     DBUG_PRINT("error",("Error: %s", zero_result_cause));
     error= 0;
+    handle_implicit_grouping_with_window_funcs();
     goto setup_subq_exit;
   }
   if (!(thd->variables.option_bits & OPTION_BIG_SELECTS) &&
@@ -2002,6 +2054,7 @@
     zero_result_cause=
       "Impossible WHERE noticed after reading const tables";
     select_lex->mark_const_derived(zero_result_cause);
+    handle_implicit_grouping_with_window_funcs();
     goto setup_subq_exit;
   }
 
@@ -2147,6 +2200,7 @@
     zero_result_cause=
       "Impossible WHERE noticed after reading const tables";
     select_lex->mark_const_derived(zero_result_cause);
+    handle_implicit_grouping_with_window_funcs();
     goto setup_subq_exit;
   }
 
@@ -2799,7 +2853,7 @@
     distinct in the engine, so we do this for all queries, not only
     GROUP BY queries.
   */
-  if (tables_list && !procedure)
+  if (tables_list && top_join_tab_count && !procedure)
   {
     /*
       At the moment we only support push down for queries where
@@ -5088,6 +5142,13 @@
     {
       if (choose_plan(join, all_table_map & ~join->const_table_map))
         goto error;
+
+#ifdef HAVE_valgrind
+      // JOIN::positions holds the current query plan. We've already
+      // made the plan choice, so we should only use JOIN::best_positions
+      for (uint k=join->const_tables; k < join->table_count; k++)
+        MEM_UNDEFINED(&join->positions[k], sizeof(join->positions[k]));
+#endif
     }
     else
     {
@@ -6785,6 +6846,7 @@
 best_access_path(JOIN      *join,
                  JOIN_TAB  *s,
                  table_map remaining_tables,
+                 const POSITION *join_positions,
                  uint      idx,
                  bool      disable_jbuf,
                  double    record_count,
@@ -6897,7 +6959,7 @@
             if (!keyuse->val->maybe_null || keyuse->null_rejecting)
               notnull_part|=keyuse->keypart_map;
 
-            double tmp2= prev_record_reads(join->positions, idx,
+            double tmp2= prev_record_reads(join_positions, idx,
                                            (found_ref | keyuse->used_tables));
             if (tmp2 < best_prev_record_reads)
             {
@@ -6938,7 +7000,7 @@
           Really, there should be records=0.0 (yes!)
           but 1.0 would be probably safer
         */
-        tmp= prev_record_reads(join->positions, idx, found_ref);
+        tmp= prev_record_reads(join_positions, idx, found_ref);
         records= 1.0;
       }
       else
@@ -6961,7 +7023,7 @@
               (!(key_flags & HA_NULL_PART_KEY) ||            //  (2)
                all_key_parts == notnull_part))               //  (3)
           {
-            tmp = prev_record_reads(join->positions, idx, found_ref);
+            tmp = prev_record_reads(join_positions, idx, found_ref);
             records=1.0;
           }
           else
@@ -7205,7 +7267,8 @@
         }
 
         tmp= COST_ADD(tmp, s->startup_cost);
-        loose_scan_opt.check_ref_access_part2(key, start_key, records, tmp);
+        loose_scan_opt.check_ref_access_part2(key, start_key, records, tmp,
+                                              found_ref);
       } /* not ft_key */
 
       if (tmp + 0.0001 < best_time - records/(double) TIME_FOR_COMPARE)
@@ -7890,7 +7953,8 @@
   for (JOIN_TAB **pos= join->best_ref + idx ; (s= *pos) ; pos++)
   {
     /* Find the best access method from 's' to the current partial plan */
-    best_access_path(join, s, join_tables, idx, disable_jbuf, record_count,
+    best_access_path(join, s, join_tables, join->positions, idx,
+                     disable_jbuf, record_count,
                      join->positions + idx, &loose_scan_pos);
 
     /* compute the cost of the new plan extended with 's' */
@@ -8510,7 +8574,18 @@
           }
           keyparts++;
         }
+        /*
+          Here we discount selectivity of the constant range CR. To calculate
+          this selectivity we use elements from the quick_rows[] array.
+          If we have indexes i1,...,ik with the same prefix compatible
+          with CR any of the estimate quick_rows[i1], ... quick_rows[ik] could
+          be used for this calculation but here we don't know which one was
+          actually used. So sel could be greater than 1 and we have to cap it.
+          However if sel becomes greater than 2 then with high probability
+          something went wrong.
+	*/
         sel /= (double)table->quick_rows[key] / (double) table->stat_records();
+        set_if_smaller(sel, 1.0);
         used_range_selectivity= true;
       }
     }
@@ -8809,8 +8884,8 @@
 
       /* Find the best access method from 's' to the current partial plan */
       POSITION loose_scan_pos;
-      best_access_path(join, s, remaining_tables, idx, disable_jbuf,
-                       record_count, position, &loose_scan_pos);
+      best_access_path(join, s, remaining_tables, join->positions, idx,
+                       disable_jbuf, record_count, position, &loose_scan_pos);
 
       /* Compute the cost of extending the plan with 's' */
       current_record_count= COST_MULT(record_count, position->records_read);
@@ -9196,11 +9271,11 @@
 */
 
 double
-prev_record_reads(POSITION *positions, uint idx, table_map found_ref)
+prev_record_reads(const POSITION *positions, uint idx, table_map found_ref)
 {
   double found=1.0;
-  POSITION *pos_end= positions - 1;
-  for (POSITION *pos= positions + idx - 1; pos != pos_end; pos--)
+  const POSITION *pos_end= positions - 1;
+  for (const POSITION *pos= positions + idx - 1; pos != pos_end; pos--)
   {
     if (pos->table->table->map & found_ref)
     {
@@ -9222,7 +9297,10 @@
           #max_nested_outer_joins=64-1) will not make it any more precise.
       */
       if (pos->records_read)
+      {
         found= COST_MULT(found, pos->records_read);
+        found*= pos->cond_selectivity;
+      }
      }
   }
   return found;
@@ -10465,6 +10543,74 @@
 }
 
 
+/*
+  @brief
+    Build a temporary join prefix condition for JOIN_TABs up to the last tab
+
+  @param  ret  OUT  the condition is returned here
+
+  @return
+     false  OK
+     true   Out of memory
+
+  @detail
+    Walk through the join prefix (from the first table to the last_tab) and
+    build a condition:
+
+    join_tab_1_cond AND join_tab_2_cond AND ... AND last_tab_conds
+
+    The condition is only intended to be used by the range optimizer, so:
+    - it is not normalized (can have Item_cond_and inside another
+      Item_cond_and)
+    - it does not include join->exec_const_cond and other similar conditions.
+*/
+
+bool build_tmp_join_prefix_cond(JOIN *join, JOIN_TAB *last_tab, Item **ret)
+{
+  THD *const thd= join->thd;
+  Item_cond_and *all_conds= NULL;
+
+  Item *res= NULL;
+
+  // Pick the ON-expression. Use the same logic as in get_sargable_cond():
+  if (last_tab->on_expr_ref)
+    res= *last_tab->on_expr_ref;
+  else if (last_tab->table->pos_in_table_list &&
+           last_tab->table->pos_in_table_list->embedding &&
+           !last_tab->table->pos_in_table_list->embedding->sj_on_expr)
+  {
+    res= last_tab->table->pos_in_table_list->embedding->on_expr;
+  }
+
+  for (JOIN_TAB *tab= first_depth_first_tab(join);
+       tab;
+       tab= next_depth_first_tab(join, tab))
+  {
+    if (tab->select_cond)
+    {
+      if (!res)
+        res= tab->select_cond;
+      else
+      {
+        if (!all_conds)
+        {
+          if (!(all_conds= new (thd->mem_root)Item_cond_and(thd, res,
+                                                            tab->select_cond)))
+            return true;
+          res= all_conds;
+        }
+        else
+          all_conds->add(tab->select_cond, thd->mem_root);
+      }
+    }
+    if (tab == last_tab)
+      break;
+  }
+  *ret= all_conds? all_conds: res;
+  return false;
+}
+
+
 static bool
 make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
 {
@@ -10812,7 +10958,9 @@
 	  {
 	    /* Join with outer join condition */
 	    COND *orig_cond=sel->cond;
-	    sel->cond= and_conds(thd, sel->cond, *tab->on_expr_ref);
+
+            if (build_tmp_join_prefix_cond(join, tab, &sel->cond))
+              return true;
 
 	    /*
               We can't call sel->cond->fix_fields,
@@ -10888,6 +11036,13 @@
 	  if (i != join->const_tables && tab->use_quick != 2 &&
               !tab->first_inner)
 	  {					/* Read with cache */
+            /*
+              TODO: the execution also gets here when we will not be using
+              join buffer. Review these cases and perhaps, remove this call.
+              (The final decision whether to use join buffer is made in
+              check_join_cache_usage, so we should only call make_scan_filter()
+              there, too).
+            */
             if (tab->make_scan_filter())
               DBUG_RETURN(1);
           }
@@ -11850,6 +12005,9 @@
     if ((tab->cache= new (root) JOIN_CACHE_BNL(join, tab, prev_cache)))
     {
       tab->icp_other_tables_ok= FALSE;
+      /* If make_join_select() hasn't called make_scan_filter(), do it now */
+      if (!tab->cache_select && tab->make_scan_filter())
+        goto no_join_cache;
       return (2 - MY_TEST(!prev_cache));
     }
     goto no_join_cache;
@@ -14455,12 +14613,15 @@
 {
   int cmp= 0;
   bool outer_ref= 0;
-  Item_field *f1= (Item_field *) (field1->real_item());
-  Item_field *f2= (Item_field *) (field2->real_item());
-  if (field1->const_item() || f1->const_item())
+  Item *field1_real= field1->real_item();
+  Item *field2_real= field2->real_item();
+
+  if (field1->const_item() || field1_real->const_item())
     return -1;
-  if (field2->const_item() || f2->const_item())
+  if (field2->const_item() || field2_real->const_item())
     return 1;
+  Item_field *f1= (Item_field *) field1_real;
+  Item_field *f2= (Item_field *) field2_real;
   if (f1->used_tables() & OUTER_REF_TABLE_BIT)
   {
     outer_ref= 1;
@@ -14952,7 +15113,7 @@
     }	 
   }
   else if (cond->type() == Item::FUNC_ITEM && 
-           ((Item_cond*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
+           ((Item_func*) cond)->functype() == Item_func::MULT_EQUAL_FUNC)
   {
     item_equal= (Item_equal *) cond;
     item_equal->sort(&compare_fields_by_table_order, table_join_idx);
@@ -15963,7 +16124,8 @@
     if ((i == first_tab && first_alt) || join->positions[i].use_join_buffer)
     {
       /* Find the best access method that would not use join buffering */
-      best_access_path(join, rs, reopt_remaining_tables, i, 
+      best_access_path(join, rs, reopt_remaining_tables,
+                       join->positions, i,
                        TRUE, rec_count,
                        &pos, &loose_scan_pos);
     }
@@ -17758,7 +17920,7 @@
 
     /*
       Test if there is a default field value. The test for ->ptr is to skip
-      'offset' fields generated by initalize_tables
+      'offset' fields generated by initialize_tables
     */
     if (default_field[i] && default_field[i]->ptr)
     {
@@ -18873,7 +19035,8 @@
     }
   }
   else if (join->sort_and_group && !tmp_tbl->precomputed_group_by &&
-           !join->sort_and_group_aggr_tab && join->tables_list)
+           !join->sort_and_group_aggr_tab && join->tables_list &&
+           join->top_join_tab_count)
   {
     DBUG_PRINT("info",("Using end_write_group"));
     aggr->set_write_func(end_write_group);
@@ -20526,7 +20689,7 @@
 {
   TABLE *table=tab->table;
   int error= 0;
-  DBUG_ENTER("join_read_first");
+  DBUG_ENTER("join_read_last");
 
   DBUG_ASSERT(table->no_keyread ||
               !table->covering_keys.is_set(tab->index) ||
@@ -24286,7 +24449,8 @@
   for (uint i= 0; (item= it++); i++)
   {
     Field *field;
-    if (item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM)
+    if ((item->with_sum_func && item->type() != Item::SUM_FUNC_ITEM) ||
+       item->with_window_func)
       item_field= item;
     else if (item->type() == Item::FIELD_ITEM)
     {
@@ -27678,6 +27842,28 @@
   return cond;
 }
 
+/*
+  There are 5 cases in which we shortcut the join optimization process as we
+  conclude that the join would be a degenerate one
+    1) IMPOSSIBLE WHERE
+    2) MIN/MAX optimization (@see opt_sum_query)
+    3) EMPTY CONST TABLE
+  If a window function is present in any of the above cases then to get the
+  result of the window function, we need to execute it. So we need to
+  create a temporary table for its execution. Here we need to take in mind
+  that aggregate functions and non-aggregate function need not be executed.
+
+*/
+
+
+void JOIN::handle_implicit_grouping_with_window_funcs()
+{
+  if (select_lex->have_window_funcs() && send_row_on_empty_set())
+  {
+    const_tables= top_join_tab_count= table_count= 0;
+  }
+}
+
 /**
   @} (end of group Query_Optimizer)
 */
diff -Nru mariadb-10.3-10.3.18/sql/sql_select.h mariadb-10.3-10.3.22/sql/sql_select.h
--- mariadb-10.3-10.3.18/sql/sql_select.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_select.h	2020-01-26 18:37:29.000000000 +0000
@@ -838,6 +838,7 @@
   friend void best_access_path(JOIN      *join,
                                JOIN_TAB  *s,
                                table_map remaining_tables,
+                               const struct st_position *join_positions,
                                uint      idx,
                                bool      disable_jbuf,
                                double    record_count,
@@ -1102,6 +1103,7 @@
                                Join_plan_state *save_to);
   /* Choose a subquery plan for a table-less subquery. */
   bool choose_tableless_subquery_plan();
+  void handle_implicit_grouping_with_window_funcs();
 
 public:
   void save_query_plan(Join_plan_state *save_to);
@@ -2043,6 +2045,11 @@
   }
 };
 
+void best_access_path(JOIN *join, JOIN_TAB *s,
+                      table_map remaining_tables,
+                      const POSITION *join_positions, uint idx,
+                      bool disable_jbuf, double record_count,
+                      POSITION *pos, POSITION *loose_scan_pos);
 bool cp_buffer_from_ref(THD *thd, TABLE *table, TABLE_REF *ref);
 bool error_if_full_join(JOIN *join);
 int report_error(TABLE *table, int error);
@@ -2413,7 +2420,7 @@
                            ulonglong options);
 bool open_tmp_table(TABLE *table);
 void setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps);
-double prev_record_reads(POSITION *positions, uint idx, table_map found_ref);
+double prev_record_reads(const POSITION *positions, uint idx, table_map found_ref);
 void fix_list_after_tbl_changes(SELECT_LEX *new_parent, List *tlist);
 double get_tmp_table_lookup_cost(THD *thd, double row_count, uint row_size);
 double get_tmp_table_write_cost(THD *thd, double row_count, uint row_size);
diff -Nru mariadb-10.3-10.3.18/sql/sql_sequence.cc mariadb-10.3-10.3.22/sql/sql_sequence.cc
--- mariadb-10.3-10.3.18/sql/sql_sequence.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_sequence.cc	2020-01-26 18:37:29.000000000 +0000
@@ -487,9 +487,12 @@
       Doing mysql_lock_tables() may have started a read only transaction.
       If that happend, it's better that we commit it now, as a lot of
       code assumes that there is no active stmt transaction directly after
-      open_tables()
+      open_tables().
+      But we also don't want to commit the stmt transaction while in a
+      substatement, see MDEV-15977.
     */
-    if (!has_active_transaction && !thd->transaction.stmt.is_empty())
+    if (!has_active_transaction && !thd->transaction.stmt.is_empty() &&
+        !thd->in_sub_stmt)
       trans_commit_stmt(thd);
   }
   write_unlock(table);
diff -Nru mariadb-10.3-10.3.18/sql/sql_servers.cc mariadb-10.3-10.3.22/sql/sql_servers.cc
--- mariadb-10.3-10.3.18/sql/sql_servers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_servers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -431,7 +431,7 @@
   int error=0;
   DBUG_ENTER("insert_server_record_into_cache");
   /*
-    We succeded in insertion of the server to the table, now insert
+    We succeeded in insertion of the server to the table, now insert
     the server to the cache
   */
   DBUG_PRINT("info", ("inserting server %s at %p, length %zd",
@@ -686,7 +686,7 @@
     goto end;
   }
   /*
-    We succeded in deletion of the server to the table, now delete
+    We succeeded in deletion of the server to the table, now delete
     the server from the cache
   */
   DBUG_PRINT("info",("deleting server %s length %zd",
diff -Nru mariadb-10.3-10.3.18/sql/sql_show.cc mariadb-10.3-10.3.22/sql/sql_show.cc
--- mariadb-10.3-10.3.18/sql/sql_show.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_show.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1316,7 +1316,8 @@
     goto exit;
   }
   else if (lex->table_type == TABLE_TYPE_SEQUENCE &&
-           table_list->table->s->table_type != TABLE_TYPE_SEQUENCE)
+           (!table_list->table ||
+            table_list->table->s->table_type != TABLE_TYPE_SEQUENCE))
   {
     my_error(ER_NOT_SEQUENCE, MYF(0),
              table_list->db.str, table_list->table_name.str);
@@ -2946,8 +2947,12 @@
     else
       protocol->store_null();
     protocol->store(thd_info->state_info, system_charset_info);
-    protocol->store(thd_info->query_string.str(),
-                    thd_info->query_string.charset());
+    if (thd_info->query_string.length())
+      protocol->store(thd_info->query_string.str(),
+                      thd_info->query_string.length(),
+                      thd_info->query_string.charset());
+    else
+      protocol->store_null();
     if (!thd->variables.old_mode &&
         !(thd->variables.old_behavior & OLD_MODE_NO_PROGRESS_INFO))
       protocol->store(thd_info->progress, 3, &store_buffer);
@@ -4614,10 +4619,7 @@
   }
 
   DBUG_ASSERT(thd->lex == lex);
-  thd->force_read_stats= get_schema_table_idx(schema_table) == SCH_STATISTICS;
   result= open_tables_only_view_structure(thd, table_list, can_deadlock);
-  (void) read_statistics_for_tables_if_needed(thd, table_list);
-  thd->force_read_stats= false;
 
   DEBUG_SYNC(thd, "after_open_table_ignore_flush");
 
@@ -6329,7 +6331,7 @@
       {
         free_table_share(&share);
         if (free_sp_head)
-          delete sp;
+          sp_head::destroy(sp);
         DBUG_RETURN(1);
       }
     }
@@ -6376,7 +6378,7 @@
       }
     }
     if (free_sp_head)
-      delete sp;
+      sp_head::destroy(sp);
   }
   free_table_share(&share);
   DBUG_RETURN(error);
@@ -6455,7 +6457,7 @@
           store_column_type(table, field, cs, 5);
           free_table_share(&share);
           if (free_sp_head)
-            delete sp;
+            sp_head::destroy(sp);
         }
       }
 
@@ -6607,6 +6609,7 @@
     KEY *key_info=show_table->s->key_info;
     if (show_table->file)
     {
+      (void) read_statistics_for_tables(thd, tables);
       show_table->file->info(HA_STATUS_VARIABLE |
                              HA_STATUS_NO_LOCK |
                              HA_STATUS_TIME);
@@ -6862,23 +6865,35 @@
     thd->clear_error();
     DBUG_RETURN(0);
   }
-  else if (!tables->view)
+  if (!tables->view)
   {
-    if (tables->table->s->table_check_constraints)
+    StringBuffer str(system_charset_info);
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+    TABLE_LIST table_acl_check;
+    bzero((char*) &table_acl_check, sizeof(table_acl_check));
+#endif
+    for (uint i= 0; i < tables->table->s->table_check_constraints; i++)
     {
-      for (uint i= 0; i < tables->table->s->table_check_constraints; i++)
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+      if (!(thd->col_access & TABLE_ACLS))
       {
-        StringBuffer str(system_charset_info);
-        Virtual_column_info *check= tables->table->check_constraints[i];
-        restore_record(table, s->default_values);
-        table->field[0]->store(STRING_WITH_LEN("def"), system_charset_info);
-        table->field[1]->store(db_name->str, db_name->length, system_charset_info);
-        table->field[2]->store(check->name.str, check->name.length, system_charset_info);
-        table->field[3]->store(table_name->str, table_name->length, system_charset_info);
-        check->print(&str);
-        table->field[4]->store(str.ptr(), str.length(), system_charset_info);
-        schema_table_store_record(thd, table);
+        table_acl_check.db= *db_name;
+        table_acl_check.table_name= *table_name;
+        table_acl_check.grant.privilege= thd->col_access;
+        if (check_grant(thd, TABLE_ACLS, &table_acl_check, FALSE, 1, TRUE))
+          continue;
       }
+#endif
+      Virtual_column_info *check= tables->table->check_constraints[i];
+      table->field[0]->store(STRING_WITH_LEN("def"), system_charset_info);
+      table->field[3]->store(check->name.str, check->name.length,
+                             system_charset_info);
+      /* Make sure the string is empty between each print. */
+      str.length(0);
+      check->print(&str);
+      table->field[4]->store(str.ptr(), str.length(), system_charset_info);
+      if (schema_table_store_record(thd, table))
+        DBUG_RETURN(1);
     }
   }
   DBUG_RETURN(res);
@@ -8275,8 +8290,7 @@
     item->maybe_null= (fields_info->field_flags & MY_I_S_MAYBE_NULL);
     field_count++;
   }
-  TMP_TABLE_PARAM *tmp_table_param =
-    (TMP_TABLE_PARAM*) (thd->alloc(sizeof(TMP_TABLE_PARAM)));
+  TMP_TABLE_PARAM *tmp_table_param = new (thd->mem_root) TMP_TABLE_PARAM;
   tmp_table_param->init();
   tmp_table_param->table_charset= cs;
   tmp_table_param->field_count= field_count;
@@ -8855,6 +8869,7 @@
         cond= tab->cache_select->cond;
       }
 
+      Switch_to_definer_security_ctx backup_ctx(thd, table_list);
       if (table_list->schema_table->fill_table(thd, table_list, cond))
       {
         result= 1;
@@ -9803,9 +9818,9 @@
   {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
   {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0,
    OPEN_FULL_TABLE},
+  {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
   {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0,
    OPEN_FULL_TABLE},
-  {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
   {"CHECK_CLAUSE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0,
    OPEN_FULL_TABLE},
   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
@@ -9825,8 +9840,8 @@
    fill_schema_applicable_roles, 0, 0, -1, -1, 0, 0},
   {"CHARACTER_SETS", charsets_fields_info, 0,
    fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0, 0},
-  {"CHECK_CONSTRAINTS", check_constraints_fields_info, 0,
-   get_all_tables, 0, get_check_constraints_record, 1, 2, 0, OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
+  {"CHECK_CONSTRAINTS", check_constraints_fields_info, 0, get_all_tables, 0,
+   get_check_constraints_record, 1, 2, 0, OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
   {"COLLATIONS", collation_fields_info, 0,
    fill_schema_collation, make_old_format, 0, -1, -1, 0, 0},
   {"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
diff -Nru mariadb-10.3-10.3.18/sql/sql_statistics.cc mariadb-10.3-10.3.22/sql/sql_statistics.cc
--- mariadb-10.3-10.3.18/sql/sql_statistics.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_statistics.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,4 +1,5 @@
 /* Copyright (C) 2009 MySQL AB
+   Copyright (c) 2019, 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
@@ -253,10 +254,8 @@
   Open all statistical tables and lock them
 */
 
-static
-inline int open_stat_tables(THD *thd, TABLE_LIST *tables,
-                            Open_tables_backup *backup,
-                            bool for_write)
+static int open_stat_tables(THD *thd, TABLE_LIST *tables,
+                            Open_tables_backup *backup, bool for_write)
 {
   int rc;
 
@@ -264,12 +263,14 @@
   thd->push_internal_handler(&deh);
   init_table_list_for_stat_tables(tables, for_write);
   init_mdl_requests(tables);
+  thd->in_sub_stmt|= SUB_STMT_STAT_TABLES;
   rc= open_system_tables_for_read(thd, tables, backup);
+  thd->in_sub_stmt&= ~SUB_STMT_STAT_TABLES;
   thd->pop_internal_handler();
 
 
   /* If the number of tables changes, we should revise the check below. */
-  DBUG_ASSERT(STATISTICS_TABLES == 3);
+  compile_time_assert(STATISTICS_TABLES == 3);
 
   if (!rc &&
       (stat_table_intact.check(tables[TABLE_STAT].table, &table_stat_def) ||
@@ -1042,7 +1043,9 @@
   {
     char buff[MAX_FIELD_WIDTH];
     String val(buff, sizeof(buff), &my_charset_bin);
+    my_bitmap_map *old_map;
 
+    old_map= dbug_tmp_use_all_columns(stat_table, stat_table->read_set);
     for (uint i= COLUMN_STAT_MIN_VALUE; i <= COLUMN_STAT_HISTOGRAM; i++)
     {  
       Field *stat_field= stat_table->field[i];
@@ -1100,6 +1103,7 @@
         }
       }
     }
+    dbug_tmp_restore_column_map(stat_table->read_set, old_map);
   }
 
 
@@ -1973,7 +1977,7 @@
         my_ptrdiff_t diff= record-table->record[0];
         if (!bitmap_is_set(table->read_set, table_field->field_index))
           continue; 
-        if (!(fld= table_field->clone(&table->mem_root, table, diff, TRUE)))
+        if (!(fld= table_field->clone(&table->mem_root, table, diff)))
           continue;
         if (i == 0)
           table_field->collected_stats->min_value= fld;
@@ -2040,7 +2044,7 @@
         Field *fld;
         Field *table_field= *field_ptr;
         my_ptrdiff_t diff= record - table_share->default_values;
-        if (!(fld= table_field->clone(&stats_cb->mem_root, diff)))
+        if (!(fld= table_field->clone(&stats_cb->mem_root, NULL, diff)))
           continue;
         if (i == 0)
           table_field->read_stats->min_value= fld;
@@ -2166,54 +2170,6 @@
 
 
 /**
-  @brief
-  Check whether any persistent statistics for the processed command is needed
-
-  @param
-  thd         The thread handle
-
-  @details
-  The function checks whether any persitent statistics for the processed
-  command is needed to be read.
-
-  @retval
-  TRUE        statistics is needed to be read 
-  @retval
-  FALSE       Otherwise
-*/
-
-static
-inline bool statistics_for_command_is_needed(THD *thd)
-{
-  if (thd->bootstrap || thd->variables.use_stat_tables == NEVER)
-    return FALSE;
-
-  if (thd->force_read_stats)
-    return TRUE;
-
-  switch(thd->lex->sql_command) {
-  case SQLCOM_SELECT:
-  case SQLCOM_INSERT:
-  case SQLCOM_INSERT_SELECT:
-  case SQLCOM_UPDATE:
-  case SQLCOM_UPDATE_MULTI:
-  case SQLCOM_DELETE:
-  case SQLCOM_DELETE_MULTI:
-  case SQLCOM_REPLACE:
-  case SQLCOM_REPLACE_SELECT:
-  case SQLCOM_CREATE_TABLE:
-  case SQLCOM_SET_OPTION:
-  case SQLCOM_DO:
-    break;
-  default: 
-    return FALSE;
-  }
-
-  return TRUE;
-} 
-
-
-/**
   @brief 
   Allocate memory for the statistical data used by a table share
 
@@ -2221,8 +2177,6 @@
   thd         Thread handler
   @param
   table_share Table share for which the memory for statistical data is allocated
-  @param
-  is_safe     TRUE <-> at any time only one thread can perform the function
 
   @note
   The function allocates the memory for the statistical data on a table in the
@@ -2231,8 +2185,6 @@
   mysql.index_stats. The memory is allocated for the statistics on the table,
   on the tables's columns, and on the table's indexes. The memory is allocated
   in the table_share's mem_root.
-  If the parameter is_safe is TRUE then it is guaranteed that at any given time
-  only one thread is executed the code of the function.
 
   @retval
   0     If the memory for all statistical data has been successfully allocated  
@@ -2251,16 +2203,10 @@
   Here the second and the third threads try to allocate the memory for
   statistical data at the same time. The precautions are taken to
   guarantee the correctness of the allocation.
-
-  @note
-  Currently the function always is called with the parameter is_safe set
-  to FALSE. 
 */      
 
-int alloc_statistics_for_table_share(THD* thd, TABLE_SHARE *table_share, 
-                                     bool is_safe)
+static int alloc_statistics_for_table_share(THD* thd, TABLE_SHARE *table_share)
 {
-  
   Field **field_ptr;
   KEY *key_info, *end;
   TABLE_STATISTICS_CB *stats_cb= &table_share->stats_cb;
@@ -2270,16 +2216,11 @@
   DEBUG_SYNC(thd, "statistics_mem_alloc_start1");
   DEBUG_SYNC(thd, "statistics_mem_alloc_start2");
 
-  if (!statistics_for_command_is_needed(thd))
-    DBUG_RETURN(1);
-
-  if (!is_safe)
-    mysql_mutex_lock(&table_share->LOCK_share);
+  mysql_mutex_lock(&table_share->LOCK_share);
 
   if (stats_cb->stats_can_be_read)
   {
-    if (!is_safe)
-      mysql_mutex_unlock(&table_share->LOCK_share);
+    mysql_mutex_unlock(&table_share->LOCK_share);
     DBUG_RETURN(0);
   }
 
@@ -2290,8 +2231,7 @@
                                                   sizeof(Table_statistics));
     if (!table_stats)
     {
-      if (!is_safe)
-        mysql_mutex_unlock(&table_share->LOCK_share);
+      mysql_mutex_unlock(&table_share->LOCK_share);
       DBUG_RETURN(1);
     }
     memset(table_stats, 0, sizeof(Table_statistics));
@@ -2363,8 +2303,7 @@
   if (column_stats && index_stats && idx_avg_frequency)
     stats_cb->stats_can_be_read= TRUE;
 
-  if (!is_safe)
-    mysql_mutex_unlock(&table_share->LOCK_share);
+  mysql_mutex_unlock(&table_share->LOCK_share);
 
   DBUG_RETURN(0);
 }
@@ -2984,9 +2923,13 @@
   KEY *key_info, *key_info_end;
   TABLE_SHARE *table_share= table->s;
   Table_statistics *read_stats= table_share->stats_cb.table_stats;
+  enum_check_fields old_check_level= thd->count_cuted_fields;
 
   DBUG_ENTER("read_statistics_for_table");
 
+  /* Don't write warnings for internal field conversions */
+  thd->count_cuted_fields= CHECK_FIELD_IGNORE;
+
   /* Read statistics from the statistical table table_stats */
   stat_table= stat_tables[TABLE_STAT].table;
   Table_stat table_stat(stat_table, table);
@@ -3067,6 +3010,7 @@
   }
 
   table->stats_is_read= TRUE;
+  thd->count_cuted_fields= old_check_level;
 
   DBUG_RETURN(0);
 }
@@ -3129,9 +3073,6 @@
 {
   if (!tables)
     return FALSE;
-  
-  if (!statistics_for_command_is_needed(thd))
-    return FALSE;
 
   /* 
     Do not read statistics for any query that explicity involves
@@ -3264,10 +3205,64 @@
 
 int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables)
 {
+  switch (thd->lex->sql_command) {
+  case SQLCOM_SELECT:
+  case SQLCOM_INSERT:
+  case SQLCOM_INSERT_SELECT:
+  case SQLCOM_UPDATE:
+  case SQLCOM_UPDATE_MULTI:
+  case SQLCOM_DELETE:
+  case SQLCOM_DELETE_MULTI:
+  case SQLCOM_REPLACE:
+  case SQLCOM_REPLACE_SELECT:
+  case SQLCOM_CREATE_TABLE:
+  case SQLCOM_SET_OPTION:
+  case SQLCOM_DO:
+    return read_statistics_for_tables(thd, tables);
+  default:
+    return 0;
+  }
+}
+
+
+int read_statistics_for_tables(THD *thd, TABLE_LIST *tables)
+{
   TABLE_LIST stat_tables[STATISTICS_TABLES];
   Open_tables_backup open_tables_backup;
 
-  DBUG_ENTER("read_statistics_for_tables_if_needed");
+  DBUG_ENTER("read_statistics_for_tables");
+
+  if (thd->bootstrap || thd->variables.use_stat_tables == NEVER)
+    DBUG_RETURN(0);
+
+  for (TABLE_LIST *tl= tables; tl; tl= tl->next_global)
+  {
+    if (tl->table)
+    {
+      TABLE_SHARE *table_share= tl->table->s;
+      if (table_share && table_share->table_category == TABLE_CATEGORY_USER &&
+          table_share->tmp_table == NO_TMP_TABLE)
+      {
+        if (table_share->stats_cb.stats_can_be_read ||
+            !alloc_statistics_for_table_share(thd, table_share))
+        {
+          if (table_share->stats_cb.stats_can_be_read)
+          {
+            KEY *key_info= table_share->key_info;
+            KEY *key_info_end= key_info + table_share->keys;
+            KEY *table_key_info= tl->table->key_info;
+            for ( ; key_info < key_info_end; key_info++, table_key_info++)
+              table_key_info->read_stats= key_info->read_stats;
+            Field **field_ptr= table_share->field;
+            Field **table_field_ptr= tl->table->field;
+            for ( ; *field_ptr; field_ptr++, table_field_ptr++)
+              (*table_field_ptr)->read_stats= (*field_ptr)->read_stats;
+            tl->table->stats_is_read= table_share->stats_cb.stats_is_read;
+          }
+        }
+      }
+    }
+  }
 
   DEBUG_SYNC(thd, "statistics_read_start");
 
@@ -3275,10 +3270,7 @@
     DBUG_RETURN(0);
 
   if (open_stat_tables(thd, stat_tables, &open_tables_backup, FALSE))
-  {
-    thd->clear_error();
     DBUG_RETURN(1);
-  }
 
   for (TABLE_LIST *tl= tables; tl; tl= tl->next_global)
   {
diff -Nru mariadb-10.3-10.3.18/sql/sql_statistics.h mariadb-10.3-10.3.22/sql/sql_statistics.h
--- mariadb-10.3-10.3.18/sql/sql_statistics.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_statistics.h	2020-01-26 18:37:29.000000000 +0000
@@ -89,9 +89,8 @@
 }
 
 int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables);
+int read_statistics_for_tables(THD *thd, TABLE_LIST *tables);
 int collect_statistics_for_table(THD *thd, TABLE *table);
-int alloc_statistics_for_table_share(THD* thd, TABLE_SHARE *share,
-                                     bool is_safe);
 void delete_stat_values_for_table_share(TABLE_SHARE *table_share);
 int alloc_statistics_for_table(THD *thd, TABLE *table);
 int update_statistics_for_table(THD *thd, TABLE *table);
diff -Nru mariadb-10.3-10.3.18/sql/sql_table.cc mariadb-10.3-10.3.22/sql/sql_table.cc
--- mariadb-10.3-10.3.18/sql/sql_table.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_table.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1993,7 +1993,7 @@
       errcode= query_error_code(thd, TRUE);
     error= thd->binlog_query(THD::STMT_QUERY_TYPE,
                              query, query_length, is_trans, FALSE, FALSE,
-                             errcode);
+                             errcode) > 0;
     thd_proc_info(thd, 0);
   }
   return error;
@@ -2435,6 +2435,13 @@
         push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
                             err, ER_THD(thd, err),
                             tbl_name.c_ptr_safe());
+
+        /*
+          Our job is done here. This statement was added to avoid executing
+          unnecessary code farther below which in some strange corner cases
+          caused the server to crash (see MDEV-17896).
+        */
+        goto log_query;
       }
       else
       {
@@ -2550,6 +2557,7 @@
       mysql_audit_drop_table(thd, table);
     }
 
+log_query:
     if (!dont_log_query && !drop_temporary)
     {
       non_tmp_table_deleted= (if_exists ? TRUE : non_tmp_table_deleted);
@@ -2616,12 +2624,12 @@
 #ifdef WITH_WSREP
           thd->wsrep_skip_wsrep_GTID = true;
 #endif /* WITH_WSREP */
-          error |= thd->binlog_query(THD::STMT_QUERY_TYPE,
-                                     built_non_trans_tmp_query.ptr(),
-                                     built_non_trans_tmp_query.length(),
-                                     FALSE, FALSE,
-                                     is_drop_tmp_if_exists_added,
-                                     0);
+          error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
+                                      built_non_trans_tmp_query.ptr(),
+                                      built_non_trans_tmp_query.length(),
+                                      FALSE, FALSE,
+                                      is_drop_tmp_if_exists_added,
+                                      0) > 0);
       }
       if (trans_tmp_table_deleted)
       {
@@ -2631,12 +2639,12 @@
 #ifdef WITH_WSREP
           thd->wsrep_skip_wsrep_GTID = true;
 #endif /* WITH_WSREP */
-          error |= thd->binlog_query(THD::STMT_QUERY_TYPE,
-                                     built_trans_tmp_query.ptr(),
-                                     built_trans_tmp_query.length(),
-                                     TRUE, FALSE,
-                                     is_drop_tmp_if_exists_added,
-                                     0);
+          error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
+                                      built_trans_tmp_query.ptr(),
+                                      built_trans_tmp_query.length(),
+                                      TRUE, FALSE,
+                                      is_drop_tmp_if_exists_added,
+                                      0) > 0);
       }
       if (non_tmp_table_deleted)
       {
@@ -2648,11 +2656,11 @@
 #ifdef WITH_WSREP
           thd->wsrep_skip_wsrep_GTID = false;
 #endif /* WITH_WSREP */
-          error |= thd->binlog_query(THD::STMT_QUERY_TYPE,
-                                     built_query.ptr(),
-                                     built_query.length(),
-                                     TRUE, FALSE, FALSE,
-                                     error_code);
+          error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
+                                      built_query.ptr(),
+                                      built_query.length(),
+                                      TRUE, FALSE, FALSE,
+                                      error_code) > 0);
       }
     }
   }
@@ -2738,7 +2746,7 @@
                                "failed CREATE OR REPLACE */"));
   error= thd->binlog_query(THD::STMT_QUERY_TYPE,
                            query.ptr(), query.length(),
-                           FALSE, FALSE, temporary_table, 0);
+                           FALSE, FALSE, temporary_table, 0) > 0;
   DBUG_RETURN(error);
 }
 
@@ -4067,16 +4075,16 @@
       /* Use packed keys for long strings on the first column */
       if (!((*db_options) & HA_OPTION_NO_PACK_KEYS) &&
           !((create_info->table_options & HA_OPTION_NO_PACK_KEYS)) &&
-	  (key_part_length >= KEY_DEFAULT_PACK_LENGTH &&
-	   (sql_field->real_field_type() == MYSQL_TYPE_STRING ||
-	    sql_field->real_field_type() == MYSQL_TYPE_VARCHAR ||
-	    sql_field->pack_flag & FIELDFLAG_BLOB)))
+          (key_part_length >= KEY_DEFAULT_PACK_LENGTH &&
+           (sql_field->real_field_type() == MYSQL_TYPE_STRING ||
+            sql_field->real_field_type() == MYSQL_TYPE_VARCHAR ||
+            f_is_blob(sql_field->pack_flag))))
       {
-	if ((column_nr == 0 && (sql_field->pack_flag & FIELDFLAG_BLOB)) ||
+        if ((column_nr == 0 && f_is_blob(sql_field->pack_flag)) ||
             sql_field->real_field_type() == MYSQL_TYPE_VARCHAR)
-	  key_info->flags|= HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY;
-	else
-	  key_info->flags|= HA_PACK_KEY;
+          key_info->flags|= HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY;
+        else
+          key_info->flags|= HA_PACK_KEY;
       }
       /* Check if the key segment is partial, set the key flag accordingly */
       if (key_part_length != sql_field->key_length)
@@ -4230,10 +4238,10 @@
         continue;
 
       {
-        /* Check that there's no repeating constraint names. */
+        /* Check that there's no repeating table CHECK constraint names. */
         List_iterator_fast
           dup_it(alter_info->check_constraint_list);
-        Virtual_column_info *dup_check;
+        const Virtual_column_info *dup_check;
         while ((dup_check= dup_it++) && dup_check != check)
         {
           if (!lex_string_cmp(system_charset_info,
@@ -4245,6 +4253,27 @@
         }
       }
 
+      /* Check that there's no repeating key constraint names. */
+      List_iterator_fast key_it(alter_info->key_list);
+      while (const Key *key= key_it++)
+      {
+        /*
+          Not all keys considered to be the CONSTRAINT
+          Noly Primary Key UNIQUE and Foreign keys.
+        */
+        if (key->type != Key::PRIMARY && key->type != Key::UNIQUE &&
+            key->type != Key::FOREIGN_KEY)
+          continue;
+
+        if (check->name.length == key->name.length &&
+            my_strcasecmp(system_charset_info,
+              check->name.str, key->name.str) == 0)
+        {
+          my_error(ER_DUP_CONSTRAINT_NAME, MYF(0), "CHECK", check->name.str);
+          DBUG_RETURN(TRUE);
+        }
+      }
+
       if (check_string_char_length(&check->name, 0, NAME_CHAR_LEN,
                                    system_charset_info, 1))
       {
@@ -5215,9 +5244,13 @@
   }
 
 err:
-  /* In RBR we don't need to log CREATE TEMPORARY TABLE */
-  if (!result && thd->is_current_stmt_binlog_format_row() && create_info->tmp_table())
+  /* In RBR or readonly server we don't need to log CREATE TEMPORARY TABLE */
+  if (!result && create_info->tmp_table() &&
+      (thd->is_current_stmt_binlog_format_row() || (opt_readonly && !thd->slave_thread)))
+  {
+    /* Note that table->s->table_creation_was_logged is not set! */
     DBUG_RETURN(result);
+  }
 
   if (create_info->tmp_table())
     thd->transaction.stmt.mark_created_temp_table();
@@ -5234,11 +5267,13 @@
       */
       thd->locked_tables_list.unlock_locked_table(thd, mdl_ticket);
     }
-    else if (likely(!result) && create_info->tmp_table() && create_info->table)
+    else if (likely(!result) && create_info->table)
     {
       /*
-        Remember that tmp table creation was logged so that we know if
+        Remember that table creation was logged so that we know if
         we should log a delete of it.
+        If create_info->table was not set, it's a normal table and
+        table_creation_was_logged will be set when the share is created.
       */
       create_info->table->s->table_creation_was_logged= 1;
     }
@@ -6727,7 +6762,7 @@
           }
 
           if (field->vcol_info->is_in_partitioning_expr() ||
-              field->flags & PART_KEY_FLAG)
+              field->flags & PART_KEY_FLAG || field->stored_in_db())
           {
             if (value_changes)
               ha_alter_info->handler_flags|= ALTER_COLUMN_VCOL;
@@ -8159,12 +8194,6 @@
         alter_ctx->datetime_field= def;
         alter_ctx->error_if_not_empty= TRUE;
     }
-    if (def->flags & VERS_SYSTEM_FIELD &&
-        !(alter_info->flags & ALTER_ADD_SYSTEM_VERSIONING))
-    {
-      my_error(ER_VERS_NOT_VERSIONED, MYF(0), table->s->table_name.str);
-      goto err;
-    }
     if (!def->after.str)
       new_create_list.push_back(def, thd->mem_root);
     else
@@ -8489,6 +8518,35 @@
       }
     }
   }
+
+  if (!alter_info->check_constraint_list.is_empty())
+  {
+    /* Check the table FOREIGN KEYs for name duplications. */
+    List  fk_child_key_list;
+    FOREIGN_KEY_INFO *f_key;
+    table->file->get_foreign_key_list(thd, &fk_child_key_list);
+    List_iterator fk_key_it(fk_child_key_list);
+    while ((f_key= fk_key_it++))
+    {
+      List_iterator_fast
+        c_it(alter_info->check_constraint_list);
+      Virtual_column_info *check;
+      while ((check= c_it++))
+      {
+        if (!check->name.length || check->automatic_name)
+          continue;
+
+        if (check->name.length == f_key->foreign_id->length &&
+            my_strcasecmp(system_charset_info, f_key->foreign_id->str,
+                          check->name.str) == 0)
+        {
+          my_error(ER_DUP_CONSTRAINT_NAME, MYF(0), "CHECK", check->name.str);
+          goto err;
+        }
+      }
+    }
+  }
+
   /* Add new constraints */
   new_constraint_list.append(&alter_info->check_constraint_list);
 
@@ -8511,13 +8569,6 @@
     }
   }
 
-  if (table->versioned() && !(alter_info->flags & ALTER_DROP_SYSTEM_VERSIONING) &&
-      new_create_list.elements == VERSIONING_FIELDS)
-  {
-    my_error(ER_VERS_TABLE_MUST_HAVE_COLUMNS, MYF(0), table->s->table_name.str);
-    goto err;
-  }
-
   if (!create_info->comment.str)
   {
     create_info->comment.str= table->s->comment.str;
@@ -9553,6 +9604,12 @@
     DBUG_RETURN(true);
   }
 
+  if (create_info->vers_check_system_fields(thd, alter_info,
+                                            table->s->table_name, table->s->db))
+  {
+    DBUG_RETURN(true);
+  }
+
   set_table_default_charset(thd, create_info, &alter_ctx.db);
 
   if (!opt_explicit_defaults_for_timestamp)
@@ -10908,7 +10965,8 @@
   LEX *lex= thd->lex;
   SELECT_LEX *select_lex= &lex->select_lex;
   TABLE_LIST *first_table= select_lex->table_list.first;
-  DBUG_ASSERT(first_table == lex->query_tables && first_table != 0);
+  DBUG_ASSERT(first_table == lex->query_tables);
+  DBUG_ASSERT(first_table != 0);
   bool link_to_local;
   TABLE_LIST *create_table= first_table;
   TABLE_LIST *select_tables= lex->create_last_non_select_table->next_global;
@@ -11170,7 +11228,9 @@
     else
     {
       if (create_info.vers_fix_system_fields(thd, &alter_info, *create_table) ||
-	  create_info.vers_check_system_fields(thd, &alter_info, *create_table))
+          create_info.vers_check_system_fields(thd, &alter_info,
+                                               create_table->table_name,
+                                               create_table->db))
 	goto end_with_restore_list;
 
       /*
diff -Nru mariadb-10.3-10.3.18/sql/sql_trigger.cc mariadb-10.3-10.3.22/sql/sql_trigger.cc
--- mariadb-10.3-10.3.18/sql/sql_trigger.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_trigger.cc	2020-01-26 18:37:29.000000000 +0000
@@ -338,7 +338,7 @@
 
 Trigger::~Trigger()
 {
-  delete body;
+  sp_head::destroy(body);
 }
 
 
diff -Nru mariadb-10.3-10.3.18/sql/sql_tvc.cc mariadb-10.3-10.3.22/sql/sql_tvc.cc
--- mariadb-10.3-10.3.18/sql/sql_tvc.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_tvc.cc	2020-01-26 18:37:29.000000000 +0000
@@ -796,6 +796,38 @@
 }
 
 
+/*
+  @brief
+   Check whether the items are of comparable type or not
+
+  @details
+    This check are done because materialization is not performed
+    if the left expr and right expr are of the same types.
+    @see subquery_types_allow_materialization()
+
+  @retval
+   0 comparable
+   1 not comparable
+*/
+
+static bool cmp_row_types(Item* item1, Item* item2)
+{
+  uint n= item1->cols();
+  if (item2->check_cols(n))
+    return true;
+
+  for (uint i=0; i < n; i++)
+  {
+    Item *inner= item1->element_index(i);
+    Item *outer= item2->element_index(i);
+    if (!inner->type_handler()->subquery_type_allows_materialization(inner,
+                                                                     outer))
+      return true;
+  }
+  return false;
+}
+
+
 /**
   @brief
     Transform IN predicate into IN subquery
@@ -840,10 +872,22 @@
   /* SELECT_LEX object where the transformation is performed */
   SELECT_LEX *parent_select= lex->current_select;
   uint8 save_derived_tables= lex->derived_tables;
+
+  /*
+    Make sure that create_tmp_table will not fail due to too long keys.
+    Here the strategy would mainly use materialization, so we need to make
+    sure that the materialized table can be created.
+
+    The checks here are the same as in subquery_type_allows_materialization()
+  */
+  uint32 length= max_length_of_left_expr();
+  if (!length  || length > tmp_table_max_key_length() ||
+      args[0]->cols() > tmp_table_max_key_parts())
+    return this;
   
   for (uint i=1; i < arg_count; i++)
   {
-    if (!args[i]->const_item())
+    if (!args[i]->const_item() || cmp_row_types(args[0], args[i]))
       return this;
   }
 
@@ -948,6 +992,16 @@
 }
 
 
+uint32 Item_func_in::max_length_of_left_expr()
+{
+  uint n= args[0]->cols();
+  uint32 length= 0;
+  for (uint i=0; i < n; i++)
+    length+= args[0]->element_index(i)->max_length;
+  return length;
+}
+
+
 /**
   @brief
     Check if this IN-predicate can be transformed in IN-subquery
diff -Nru mariadb-10.3-10.3.18/sql/sql_type.h mariadb-10.3-10.3.22/sql/sql_type.h
--- mariadb-10.3-10.3.18/sql/sql_type.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_type.h	2020-01-26 18:37:29.000000000 +0000
@@ -292,6 +292,15 @@
 {
 protected:
   void make_from_item(THD *thd, Item *item, sql_mode_t flags);
+
+  ulong daynr() const
+  {
+    return (ulong) ::calc_daynr((uint) year, (uint) month, (uint) day);
+  }
+  int weekday(bool sunday_first_day_of_week) const
+  {
+    return ::calc_weekday(daynr(), sunday_first_day_of_week);
+  }
   Temporal_with_date(THD *thd, Item *item, sql_mode_t flags)
   {
     make_from_item(thd, item, flags);
@@ -389,6 +398,11 @@
     DBUG_ASSERT(is_valid_datetime_slow());
     return hour == 0 && minute == 0 && second == 0 && second_part == 0;
   }
+  int weekday(bool sunday_first_day_of_week) const
+  {
+    DBUG_ASSERT(is_valid_datetime_slow());
+    return Temporal_with_date::weekday(sunday_first_day_of_week);
+  }
   const MYSQL_TIME *get_mysql_time() const
   {
     DBUG_ASSERT(is_valid_datetime_slow());
diff -Nru mariadb-10.3-10.3.18/sql/sql_union.cc mariadb-10.3-10.3.22/sql/sql_union.cc
--- mariadb-10.3-10.3.18/sql/sql_union.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_union.cc	2020-01-26 18:37:29.000000000 +0000
@@ -976,9 +976,21 @@
       if (sl->tvc->prepare(thd, sl, tmp_result, this))
 	goto err;
     }
-    else if (prepare_join(thd, first_sl, tmp_result, additional_options,
+    else
+    {
+      if (prepare_join(thd, first_sl, tmp_result, additional_options,
                      is_union_select))
-      goto err;
+        goto err;
+
+      if (derived_arg && derived_arg->table &&
+          derived_arg->derived_type == VIEW_ALGORITHM_MERGE &&
+          derived_arg->table->versioned())
+      {
+        /* Got versioning conditions (see vers_setup_conds()), need to update
+           derived_arg. */
+        derived_arg->where= first_sl->where;
+      }
+    }
     types= first_sl->item_list;
     goto cont;
   }
@@ -1858,6 +1870,7 @@
       DBUG_RETURN(FALSE);
     }
   }
+  columns_are_renamed= false;
   cleaned= 1;
 
   for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select())
diff -Nru mariadb-10.3-10.3.18/sql/sql_update.cc mariadb-10.3-10.3.22/sql/sql_update.cc
--- mariadb-10.3-10.3.18/sql/sql_update.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_update.cc	2020-01-26 18:37:29.000000000 +0000
@@ -184,10 +184,10 @@
   return FALSE;
 }
 
-static bool check_has_vers_fields(TABLE *table, List &items)
+bool TABLE::vers_check_update(List &items)
 {
   List_iterator it(items);
-  if (!table->versioned())
+  if (!versioned_write())
     return false;
 
   while (Item *item= it++)
@@ -195,8 +195,11 @@
     if (Item_field *item_field= item->field_for_view_update())
     {
       Field *field= item_field->field;
-      if (field->table == table && !field->vers_update_unversioned())
+      if (field->table == this && !field->vers_update_unversioned())
+      {
+        no_cache= true;
         return true;
+      }
     }
   }
   return false;
@@ -415,7 +418,7 @@
   {
     DBUG_RETURN(1);
   }
-  bool has_vers_fields= check_has_vers_fields(table, fields);
+  bool has_vers_fields= table->vers_check_update(fields);
   if (check_key_in_view(thd, table_list))
   {
     my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias.str, "UPDATE");
@@ -878,11 +881,6 @@
   THD_STAGE_INFO(thd, stage_updating);
   while (!(error=info.read_record()) && !thd->killed)
   {
-    if (table->versioned() && !table->vers_end_field()->is_max())
-    {
-      continue;
-    }
-
     explain->tracker.on_record_read();
     thd->inc_examined_row_count(1);
     if (!select || select->skip_record(thd) > 0)
@@ -1156,7 +1154,7 @@
 
       if (thd->binlog_query(THD::ROW_QUERY_TYPE,
                             thd->query(), thd->query_length(),
-                            transactional_table, FALSE, FALSE, errcode))
+                            transactional_table, FALSE, FALSE, errcode) > 0)
       {
         error=1;				// Rollback update
       }
@@ -1266,6 +1264,15 @@
 
   thd->lex->allow_sum_func.clear_all();
 
+  DBUG_ASSERT(table_list->table);
+  // conds could be cached from previous SP call
+  DBUG_ASSERT(!table_list->vers_conditions.need_setup() ||
+              !*conds || thd->stmt_arena->is_stmt_execute());
+  if (select_lex->vers_setup_conds(thd, table_list))
+    DBUG_RETURN(TRUE);
+
+  *conds= select_lex->where;
+
   /*
     We do not call DT_MERGE_FOR_INSERT because it has no sense for simple
     (not multi-) update
@@ -1786,6 +1793,9 @@
   thd->abort_on_warning= !ignore && thd->is_strict_mode();
   List total_list;
 
+  if (select_lex->vers_setup_conds(thd, table_list))
+    DBUG_RETURN(1);
+
   res= mysql_select(thd,
                     table_list, select_lex->with_wild, total_list, conds,
                     select_lex->order_list.elements,
@@ -2126,7 +2136,7 @@
       if (safe_update_on_fly(thd, join->join_tab, table_ref, all_tables))
       {
 	table_to_update= table;			// Update table on the fly
-        has_vers_fields= check_has_vers_fields(table, *fields);
+        has_vers_fields= table->vers_check_update(*fields);
 	continue;
       }
     }
@@ -2345,11 +2355,6 @@
     if (table->status & (STATUS_NULL_ROW | STATUS_UPDATED))
       continue;
 
-    if (table->versioned() && !table->vers_end_field()->is_max())
-    {
-      continue;
-    }
-
     if (table == table_to_update)
     {
       /*
@@ -2607,7 +2612,7 @@
     if (table->vfield)
       empty_record(table);
 
-    has_vers_fields= check_has_vers_fields(table, *fields);
+    has_vers_fields= table->vers_check_update(*fields);
 
     check_opt_it.rewind();
     while(TABLE *tbl= check_opt_it++)
@@ -2885,7 +2890,7 @@
 
       if (thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query(),
                             thd->query_length(), transactional_tables, FALSE,
-                            FALSE, errcode))
+                            FALSE, errcode) > 0)
 	local_error= 1;				// Rollback update
       thd->set_current_stmt_binlog_format(save_binlog_format);
     }
diff -Nru mariadb-10.3-10.3.18/sql/sql_view.cc mariadb-10.3-10.3.22/sql/sql_view.cc
--- mariadb-10.3-10.3.18/sql/sql_view.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_view.cc	2020-01-26 18:37:29.000000000 +0000
@@ -698,7 +698,7 @@
     thd->reset_unsafe_warnings();
     if (thd->binlog_query(THD::STMT_QUERY_TYPE,
                           buff.ptr(), buff.length(), FALSE, FALSE, FALSE,
-                          errcode))
+                          errcode) > 0)
       res= TRUE;
   }
 
@@ -1490,6 +1490,7 @@
         privileges of top_view
       */
       tbl->grant.want_privilege= SELECT_ACL;
+
       /*
         After unfolding the view we lose the list of tables referenced in it
         (we will have only a list of underlying tables in case of MERGE
@@ -1540,6 +1541,18 @@
         views with subqueries in select list.
       */
       view_main_select_tables= lex->select_lex.table_list.first;
+      /*
+        Mergeable view can be used for inserting, so we move the flag down
+      */
+      if (table->for_insert_data)
+      {
+        for (TABLE_LIST *t= view_main_select_tables;
+             t;
+             t= t->next_local)
+        {
+          t->for_insert_data= TRUE;
+        }
+      }
 
       /*
         Let us set proper lock type for tables of the view's main
diff -Nru mariadb-10.3-10.3.18/sql/sql_window.cc mariadb-10.3-10.3.22/sql/sql_window.cc
--- mariadb-10.3-10.3.18/sql/sql_window.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_window.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1779,11 +1779,7 @@
     List_iterator_fast it(sum_functions);
     Item_sum* item;
     while ((item= it++))
-    {
-      Item_sum_window_with_row_count* item_with_row_count =
-        static_cast(item);
-      item_with_row_count->set_row_count(num_rows_in_partition);
-    }
+      item->set_partition_row_count(num_rows_in_partition);
   }
 };
 
diff -Nru mariadb-10.3-10.3.18/sql/sql_yacc.cc mariadb-10.3-10.3.22/sql/sql_yacc.cc
--- mariadb-10.3-10.3.18/sql/sql_yacc.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_yacc.cc	2020-01-26 18:37:30.000000000 +0000
@@ -2118,10 +2118,10 @@
     2678,  2682,  2696,  2695,  2726,  2725,  2781,  2778,  2791,  2789,
     2802,  2800,  2812,  2811,  2826,  2824,  2836,  2834,  2843,  2842,
     2847,  2846,  2851,  2850,  2855,  2854,  2861,  2860,  2867,  2866,
-    2871,  2870,  2876,  2883,  2890,  2894,  2898,  2898,  2904,  2914,
-    2924,  2925,  2929,  2931,  2934,  2935,  2939,  2940,  2944,  2949,
-    2955,  2961,  2969,  2975,  2981,  2989,  2997,  3005,  3013,  3021,
-    3029,  3041,  3058,  3057,  3069,  3070,  3074,  3079,  3086,  3091,
+    2871,  2870,  2876,  2883,  2890,  2894,  2898,  2898,  2904,  2915,
+    2926,  2927,  2931,  2933,  2936,  2937,  2941,  2942,  2946,  2951,
+    2957,  2963,  2971,  2977,  2983,  2991,  2999,  3007,  3015,  3023,
+    3031,  3043,  3060,  3059,  3071,  3072,  3076,  3081,  3086,  3091,
     3096,  3101,  3106,  3114,  3113,  3146,  3145,  3152,  3159,  3160,
     3166,  3172,  3182,  3188,  3194,  3196,  3203,  3204,  3208,  3218,
     3219,  3227,  3227,  3272,  3286,  3291,  3299,  3300,  3304,  3305,
@@ -2137,315 +2137,315 @@
     3766,  3772,  3778,  3788,  3793,  3801,  3809,  3824,  3830,  3831,
     3837,  3840,  3844,  3852,  3869,  3871,  3889,  3895,  3897,  3899,
     3901,  3903,  3905,  3907,  3909,  3911,  3913,  3915,  3917,  3922,
-    3930,  3946,  3947,  3952,  3958,  3967,  3974,  3983,  3991,  3996,
-    4005,  4007,  4009,  4018,  4023,  4030,  4039,  4047,  4049,  4051,
-    4053,  4055,  4057,  4059,  4061,  4063,  4065,  4067,  4069,  4071,
-    4076,  4077,  4085,  4097,  4112,  4113,  4126,  4127,  4128,  4129,
-    4130,  4134,  4135,  4136,  4137,  4138,  4139,  4140,  4141,  4142,
-    4143,  4147,  4148,  4149,  4150,  4155,  4154,  4165,  4165,  4218,
-    4219,  4224,  4223,  4234,  4245,  4245,  4249,  4254,  4259,  4265,
-    4274,  4279,  4284,  4290,  4300,  4308,  4316,  4324,  4334,  4333,
-    4352,  4351,  4367,  4373,  4381,  4382,  4386,  4394,  4399,  4404,
-    4412,  4413,  4428,  4446,  4460,  4477,  4479,  4495,  4477,  4514,
-    4516,  4517,  4522,  4521,  4591,  4593,  4591,  4601,  4606,  4607,
-    4611,  4612,  4617,  4621,  4616,  4641,  4645,  4640,  4663,  4673,
-    4677,  4681,  4682,  4686,  4697,  4695,  4712,  4711,  4726,  4725,
-    4742,  4743,  4747,  4755,  4760,  4767,  4776,  4791,  4790,  4807,
-    4806,  4826,  4835,  4834,  4842,  4841,  4850,  4855,  4864,  4849,
-    4874,  4873,  4884,  4883,  4893,  4892,  4903,  4910,  4902,  4927,
-    4926,  4938,  4940,  4945,  4947,  4949,  4966,  4971,  4977,  4984,
-    4985,  4993,  4999,  5008,  5014,  5020,  5021,  5025,  5025,  5030,
-    5031,  5032,  5036,  5037,  5038,  5042,  5046,  5047,  5048,  5052,
-    5053,  5054,  5055,  5056,  5057,  5058,  5059,  5063,  5067,  5068,
-    5069,  5073,  5074,  5075,  5076,  5077,  5081,  5085,  5086,  5087,
-    5091,  5092,  5093,  5094,  5095,  5096,  5097,  5101,  5105,  5106,
-    5107,  5111,  5112,  5113,  5118,  5126,  5134,  5142,  5155,  5168,
-    5173,  5178,  5186,  5194,  5202,  5210,  5218,  5226,  5234,  5244,
-    5254,  5264,  5266,  5270,  5275,  5285,  5286,  5299,  5298,  5301,
-    5307,  5309,  5308,  5311,  5310,  5312,  5326,  5327,  5331,  5332,
-    5338,  5336,  5343,  5348,  5350,  5349,  5352,  5351,  5356,  5393,
-    5394,  5399,  5398,  5414,  5429,  5428,  5446,  5445,  5451,  5459,
-    5458,  5461,  5463,  5466,  5465,  5474,  5477,  5476,  5485,  5486,
-    5492,  5493,  5510,  5511,  5515,  5516,  5520,  5534,  5544,  5555,
-    5564,  5565,  5578,  5580,  5579,  5584,  5582,  5593,  5594,  5598,
-    5612,  5624,  5625,  5638,  5647,  5669,  5670,  5675,  5674,  5698,
-    5710,  5726,  5725,  5740,  5739,  5753,  5758,  5763,  5783,  5801,
-    5805,  5832,  5844,  5845,  5850,  5859,  5849,  5884,  5885,  5889,
-    5900,  5919,  5932,  5958,  5959,  5964,  5963,  6000,  6009,  6010,
-    6014,  6015,  6019,  6021,  6027,  6033,  6035,  6037,  6039,  6041,
-    6043,  6048,  6049,  6055,  6071,  6074,  6091,  6099,  6099,  6120,
-    6121,  6125,  6126,  6130,  6141,  6142,  6146,  6147,  6151,  6152,
-    6156,  6157,  6162,  6165,  6173,  6176,  6183,  6187,  6193,  6195,
-    6199,  6200,  6204,  6205,  6206,  6210,  6225,  6230,  6235,  6240,
-    6245,  6250,  6255,  6270,  6276,  6291,  6296,  6311,  6317,  6335,
-    6340,  6345,  6350,  6355,  6360,  6366,  6365,  6391,  6392,  6393,
-    6398,  6403,  6408,  6410,  6412,  6414,  6420,  6425,  6430,  6439,
-    6448,  6454,  6460,  6465,  6468,  6470,  6474,  6493,  6501,  6516,
-    6526,  6537,  6538,  6539,  6540,  6541,  6542,  6543,  6547,  6548,
-    6549,  6553,  6554,  6555,  6556,  6561,  6568,  6569,  6573,  6574,
-    6575,  6576,  6580,  6582,  6588,  6587,  6595,  6594,  6602,  6601,
-    6609,  6608,  6618,  6615,  6626,  6624,  6633,  6632,  6671,  6679,
-    6687,  6688,  6692,  6702,  6703,  6707,  6708,  6712,  6717,  6716,
-    6752,  6752,  6755,  6754,  6764,  6765,  6769,  6770,  6774,  6775,
-    6779,  6780,  6784,  6785,  6786,  6787,  6789,  6788,  6794,  6799,
-    6807,  6808,  6813,  6816,  6820,  6824,  6831,  6832,  6836,  6837,
-    6841,  6847,  6853,  6854,  6862,  6861,  6880,  6886,  6887,  6897,
-    6907,  6907,  6910,  6911,  6919,  6920,  6921,  6922,  6923,  6927,
-    6928,  6929,  6945,  6949,  6953,  6957,  6959,  6966,  6968,  6973,
-    6975,  6976,  6977,  6981,  6985,  6990,  6995,  6999,  7003,  7008,
-    7013,  7021,  7039,  7040,  7047,  7068,  7079,  7084,  7089,  7094,
-    7099,  7110,  7115,  7120,  7125,  7127,  7129,  7131,  7133,  7135,
-    7137,  7139,  7147,  7149,  7154,  7155,  7156,  7157,  7158,  7159,
-    7160,  7161,  7165,  7169,  7170,  7174,  7175,  7179,  7180,  7181,
-    7182,  7183,  7187,  7188,  7189,  7190,  7191,  7195,  7201,  7202,
-    7207,  7209,  7216,  7217,  7218,  7222,  7226,  7227,  7228,  7229,
-    7230,  7231,  7235,  7236,  7237,  7238,  7241,  7242,  7245,  7246,
-    7249,  7250,  7255,  7256,  7260,  7261,  7262,  7269,  7270,  7276,
-    7283,  7287,  7288,  7292,  7293,  7297,  7305,  7313,  7322,  7326,
-    7332,  7336,  7337,  7346,  7355,  7361,  7367,  7380,  7386,  7396,
-    7410,  7411,  7415,  7420,  7424,  7425,  7429,  7430,  7434,  7441,
-    7445,  7446,  7450,  7458,  7459,  7463,  7464,  7468,  7469,  7473,
-    7474,  7475,  7483,  7484,  7488,  7489,  7490,  7491,  7495,  7496,
-    7501,  7500,  7513,  7514,  7518,  7521,  7522,  7523,  7524,  7528,
-    7536,  7543,  7544,  7548,  7558,  7559,  7563,  7564,  7567,  7569,
-    7573,  7585,  7586,  7590,  7597,  7610,  7611,  7613,  7615,  7621,
-    7626,  7632,  7638,  7645,  7655,  7656,  7657,  7658,  7659,  7663,
-    7664,  7668,  7669,  7673,  7674,  7678,  7679,  7680,  7684,  7685,
-    7689,  7693,  7705,  7706,  7710,  7711,  7715,  7716,  7720,  7721,
-    7725,  7726,  7730,  7731,  7735,  7736,  7740,  7741,  7742,  7745,
-    7747,  7752,  7757,  7759,  7767,  7775,  7781,  7790,  7791,  7795,
-    7799,  7800,  7810,  7811,  7812,  7816,  7820,  7827,  7833,  7845,
-    7846,  7850,  7852,  7861,  7875,  7860,  7895,  7894,  7908,  7917,
-    7916,  7932,  7931,  7947,  7946,  7959,  7953,  7966,  7965,  8000,
-    8005,  8010,  8015,  8021,  8020,  8027,  8034,  8044,  8033,  8064,
-    8065,  8066,  8067,  8071,  8072,  8084,  8085,  8089,  8090,  8093,
-    8095,  8103,  8111,  8113,  8115,  8116,  8124,  8125,  8131,  8140,
-    8138,  8151,  8164,  8163,  8176,  8174,  8187,  8194,  8204,  8205,
-    8229,  8236,  8240,  8246,  8244,  8261,  8263,  8268,  8276,  8275,
-    8289,  8293,  8292,  8304,  8305,  8309,  8322,  8323,  8327,  8331,
-    8338,  8343,  8347,  8354,  8358,  8363,  8371,  8379,  8389,  8400,
-    8410,  8421,  8431,  8437,  8443,  8448,  8454,  8468,  8482,  8487,
-    8491,  8496,  8497,  8498,  8503,  8508,  8514,  8516,  8517,  8518,
-    8519,  8522,  8527,  8535,  8540,  8548,  8549,  8553,  8554,  8558,
-    8558,  8561,  8563,  8567,  8568,  8572,  8573,  8581,  8582,  8583,
-    8587,  8588,  8593,  8602,  8603,  8604,  8605,  8610,  8609,  8619,
-    8618,  8626,  8633,  8643,  8660,  8663,  8670,  8674,  8681,  8685,
-    8689,  8696,  8696,  8702,  8703,  8707,  8708,  8709,  8713,  8714,
-    8723,  8730,  8731,  8736,  8735,  8747,  8748,  8749,  8753,  8755,
-    8754,  8761,  8760,  8781,  8782,  8786,  8787,  8791,  8792,  8793,
-    8797,  8798,  8803,  8802,  8823,  8824,  8828,  8833,  8834,  8841,
-    8843,  8847,  8849,  8848,  8860,  8862,  8861,  8874,  8875,  8880,
-    8889,  8890,  8891,  8895,  8902,  8912,  8920,  8929,  8931,  8930,
-    8936,  8935,  8958,  8959,  8963,  8964,  8968,  8969,  8970,  8971,
-    8972,  8973,  8977,  8978,  8983,  8982,  9003,  9004,  9005,  9010,
-    9009,  9015,  9022,  9028,  9037,  9038,  9042,  9058,  9057,  9070,
-    9071,  9075,  9076,  9080,  9091,  9102,  9103,  9108,  9107,  9118,
-    9119,  9123,  9124,  9128,  9139,  9151,  9150,  9158,  9158,  9167,
-    9168,  9173,  9174,  9183,  9192,  9193,  9194,  9195,  9196,  9197,
-    9198,  9202,  9203,  9204,  9205,  9206,  9207,  9208,  9212,  9212,
-    9220,  9220,  9232,  9236,  9238,  9242,  9242,  9253,  9257,  9259,
-    9263,  9263,  9274,  9279,  9279,  9288,  9288,  9300,  9306,  9304,
-    9311,  9323,  9321,  9328,  9338,  9343,  9342,  9347,  9351,  9362,
-    9363,  9367,  9368,  9372,  9373,  9374,  9378,  9379,  9380,  9384,
-    9385,  9386,  9387,  9388,  9392,  9392,  9410,  9417,  9419,  9423,
-    9427,  9433,  9440,  9442,  9451,  9455,  9459,  9466,  9474,  9478,
-    9486,  9489,  9496,  9500,  9504,  9508,  9515,  9516,  9520,  9521,
-    9538,  9557,  9559,  9566,  9577,  9578,  9579,  9593,  9598,  9620,
-    9626,  9632,  9638,  9644,  9645,  9646,  9647,  9648,  9652,  9653,
-    9654,  9658,  9659,  9660,  9664,  9665,  9670,  9721,  9728,  9771,
-    9777,  9783,  9789,  9795,  9801,  9807,  9813,  9817,  9823,  9829,
-    9835,  9841,  9847,  9851,  9857,  9866,  9872,  9880,  9886,  9895,
-    9901,  9909,  9919,  9926,  9934,  9940,  9949,  9953,  9959,  9965,
-    9971,  9977,  9984,  9990,  9996, 10002, 10008, 10015, 10021, 10027,
-   10033, 10039, 10045, 10051, 10057, 10063, 10067, 10068, 10072, 10073,
-   10077, 10078, 10082, 10083, 10087, 10088, 10089, 10090, 10091, 10092,
-   10096, 10097, 10102, 10106, 10110, 10111, 10112, 10116, 10117, 10118,
-   10119, 10120, 10121, 10125, 10126, 10127, 10132, 10131, 10137, 10145,
-   10167, 10174, 10183, 10184, 10185, 10186, 10190, 10199, 10200, 10201,
-   10202, 10203, 10204, 10205, 10206, 10238, 10239, 10240, 10241, 10242,
-   10243, 10244, 10245, 10246, 10247, 10248, 10249, 10256, 10262, 10267,
-   10277, 10282, 10287, 10293, 10298, 10304, 10315, 10322, 10327, 10332,
-   10337, 10342, 10347, 10352, 10360, 10361, 10362, 10366, 10367, 10375,
-   10376, 10382, 10386, 10392, 10398, 10407, 10408, 10417, 10424, 10438,
-   10444, 10450, 10459, 10468, 10474, 10480, 10486, 10492, 10507, 10518,
-   10524, 10530, 10536, 10542, 10548, 10556, 10563, 10567, 10572, 10580,
-   10601, 10608, 10614, 10621, 10628, 10634, 10640, 10646, 10652, 10658,
-   10664, 10670, 10676, 10683, 10689, 10696, 10702, 10707, 10712, 10717,
-   10722, 10740, 10746, 10752, 10757, 10764, 10771, 10779, 10786, 10793,
-   10800, 10807, 10824, 10830, 10836, 10842, 10848, 10855, 10861, 10867,
-   10876, 10887, 10894, 10900, 10906, 10913, 10921, 10927, 10933, 10938,
-   10944, 10952, 10958, 10964, 10970, 10976, 10984, 10996, 11003, 11018,
-   11024, 11031, 11038, 11045, 11052, 11059, 11063, 11070, 11088, 11087,
-   11155, 11163, 11165, 11170, 11171, 11175, 11176, 11180, 11181, 11185,
-   11192, 11200, 11227, 11233, 11239, 11245, 11251, 11257, 11266, 11273,
-   11275, 11272, 11282, 11293, 11299, 11305, 11311, 11317, 11323, 11329,
-   11335, 11341, 11348, 11347, 11372, 11381, 11399, 11401, 11408, 11415,
-   11422, 11429, 11436, 11443, 11450, 11457, 11464, 11471, 11482, 11489,
-   11500, 11511, 11531, 11530, 11536, 11553, 11559, 11568, 11577, 11587,
-   11586, 11598, 11608, 11616, 11621, 11629, 11630, 11635, 11640, 11643,
-   11645, 11649, 11654, 11662, 11663, 11667, 11671, 11678, 11685, 11692,
-   11705, 11704, 11721, 11724, 11723, 11728, 11727, 11732, 11731, 11735,
-   11740, 11741, 11745, 11746, 11747, 11748, 11749, 11750, 11751, 11752,
-   11756, 11757, 11758, 11762, 11763, 11767, 11774, 11782, 11783, 11787,
-   11794, 11802, 11811, 11821, 11822, 11831, 11840, 11852, 11853, 11865,
-   11876, 11877, 11883, 11884, 11902, 11911, 11909, 11927, 11925, 11936,
-   11946, 11944, 11962, 11961, 11971, 11982, 11980, 11999, 11998, 12009,
-   12021, 12022, 12023, 12027, 12028, 12036, 12037, 12041, 12056, 12057,
-   12061, 12061, 12102, 12168, 12211, 12212, 12221, 12220, 12229, 12230,
-   12231, 12235, 12236, 12237, 12237, 12241, 12247, 12255, 12255, 12270,
-   12287, 12288, 12296, 12306, 12305, 12319, 12336, 12319, 12343, 12347,
-   12356, 12367, 12368, 12373, 12376, 12377, 12378, 12382, 12383, 12388,
-   12387, 12393, 12392, 12400, 12401, 12404, 12406, 12406, 12410, 12410,
-   12415, 12416, 12420, 12422, 12427, 12428, 12432, 12443, 12457, 12458,
-   12459, 12460, 12461, 12462, 12463, 12464, 12465, 12466, 12467, 12468,
-   12472, 12473, 12474, 12475, 12476, 12477, 12478, 12479, 12480, 12484,
-   12485, 12486, 12487, 12490, 12492, 12493, 12497, 12498, 12506, 12508,
-   12512, 12514, 12513, 12527, 12530, 12529, 12544, 12549, 12564, 12566,
-   12570, 12575, 12583, 12584, 12601, 12624, 12625, 12631, 12632, 12636,
-   12649, 12648, 12656, 12657, 12665, 12666, 12670, 12671, 12675, 12676,
-   12690, 12691, 12695, 12705, 12714, 12721, 12728, 12738, 12739, 12746,
-   12756, 12757, 12759, 12761, 12763, 12765, 12774, 12778, 12779, 12783,
-   12795, 12797, 12802, 12801, 12851, 12856, 12864, 12865, 12866, 12870,
-   12871, 12875, 12888, 12895, 12900, 12907, 12914, 12921, 12931, 12936,
-   12941, 12945, 12951, 12957, 12966, 12974, 12978, 12985, 12986, 12989,
-   12991, 12995, 12996, 12999, 13000, 13001, 13002, 13003, 13004, 13008,
-   13009, 13010, 13011, 13012, 13016, 13017, 13018, 13019, 13023, 13024,
-   13025, 13026, 13027, 13031, 13032, 13033, 13034, 13035, 13039, 13044,
-   13045, 13049, 13050, 13054, 13055, 13056, 13061, 13060, 13094, 13095,
-   13099, 13100, 13104, 13114, 13114, 13126, 13127, 13130, 13150, 13154,
-   13159, 13167, 13172, 13183, 13171, 13185, 13200, 13212, 13211, 13229,
-   13228, 13237, 13254, 13260, 13274, 13289, 13297, 13301, 13306, 13305,
-   13314, 13319, 13325, 13330, 13335, 13342, 13340, 13354, 13355, 13359,
-   13370, 13383, 13384, 13388, 13402, 13406, 13415, 13418, 13425, 13426,
-   13434, 13442, 13433, 13452, 13459, 13451, 13469, 13477, 13478, 13485,
-   13489, 13490, 13499, 13500, 13504, 13513, 13514, 13515, 13517, 13516,
-   13528, 13530, 13534, 13535, 13536, 13540, 13541, 13545, 13546, 13550,
-   13560, 13561, 13565, 13566, 13570, 13571, 13575, 13576, 13581, 13580,
-   13596, 13595, 13610, 13611, 13615, 13616, 13620, 13625, 13633, 13641,
-   13652, 13653, 13659, 13667, 13669, 13671, 13669, 13684, 13692, 13683,
-   13714, 13715, 13719, 13728, 13729, 13733, 13743, 13744, 13751, 13750,
-   13766, 13769, 13776, 13777, 13784, 13799, 13805, 13804, 13816, 13815,
-   13828, 13830, 13834, 13835, 13839, 13854, 13872, 13873, 13877, 13878,
-   13882, 13883, 13884, 13889, 13888, 13909, 13911, 13914, 13916, 13919,
-   13920, 13923, 13927, 13931, 13935, 13939, 13943, 13947, 13951, 13955,
-   13963, 13966, 13976, 13975, 13991, 13998, 14006, 14014, 14022, 14030,
-   14038, 14045, 14052, 14058, 14060, 14062, 14071, 14075, 14080, 14079,
-   14086, 14085, 14090, 14099, 14106, 14111, 14116, 14121, 14126, 14131,
-   14133, 14135, 14137, 14144, 14152, 14154, 14162, 14169, 14176, 14184,
-   14190, 14195, 14203, 14211, 14219, 14223, 14228, 14235, 14240, 14247,
-   14254, 14260, 14266, 14272, 14280, 14285, 14292, 14299, 14306, 14313,
-   14318, 14323, 14328, 14333, 14340, 14362, 14364, 14366, 14371, 14372,
-   14375, 14377, 14381, 14382, 14386, 14387, 14391, 14392, 14396, 14397,
-   14401, 14402, 14406, 14407, 14415, 14427, 14426, 14442, 14441, 14451,
-   14452, 14453, 14454, 14455, 14459, 14460, 14464, 14471, 14472, 14473,
-   14477, 14478, 14491, 14492, 14493, 14508, 14507, 14520, 14519, 14531,
-   14535, 14536, 14551, 14554, 14553, 14566, 14567, 14572, 14574, 14576,
-   14578, 14580, 14582, 14590, 14592, 14594, 14596, 14601, 14603, 14611,
-   14613, 14615, 14617, 14634, 14635, 14639, 14640, 14643, 14645, 14646,
-   14650, 14666, 14667, 14671, 14670, 14680, 14681, 14685, 14685, 14689,
-   14688, 14694, 14698, 14699, 14703, 14704, 14712, 14711, 14722, 14726,
-   14730, 14743, 14742, 14757, 14758, 14759, 14762, 14763, 14764, 14765,
-   14773, 14777, 14786, 14792, 14804, 14816, 14827, 14840, 14803, 14848,
-   14849, 14853, 14854, 14858, 14859, 14867, 14871, 14872, 14873, 14876,
-   14878, 14882, 14883, 14887, 14892, 14899, 14904, 14911, 14913, 14917,
-   14918, 14922, 14927, 14935, 14936, 14939, 14941, 14949, 14950, 14954,
-   14955, 14956, 14960, 14962, 14967, 14968, 14977, 14978, 14982, 14983,
-   14987, 15000, 15005, 15010, 15015, 15023, 15031, 15036, 15049, 15058,
-   15074, 15081, 15087, 15097, 15098, 15106, 15107, 15108, 15109, 15123,
-   15129, 15135, 15141, 15147, 15153, 15172, 15182, 15192, 15198, 15205,
-   15215, 15223, 15231, 15243, 15244, 15253, 15252, 15271, 15272, 15277,
-   15278, 15285, 15283, 15310, 15311, 15317, 15322, 15331, 15346, 15347,
-   15351, 15356, 15364, 15369, 15377, 15382, 15387, 15392, 15398, 15403,
-   15411, 15416, 15421, 15426, 15432, 15440, 15441, 15452, 15460, 15464,
-   15470, 15476, 15486, 15492, 15501, 15511, 15512, 15516, 15517, 15518,
-   15522, 15530, 15538, 15546, 15554, 15555, 15563, 15564, 15572, 15573,
-   15578, 15587, 15588, 15596, 15597, 15605, 15606, 15607, 15611, 15624,
-   15654, 15664, 15664, 15666, 15676, 15677, 15678, 15679, 15680, 15681,
-   15682, 15683, 15688, 15689, 15690, 15691, 15692, 15693, 15694, 15695,
-   15696, 15704, 15705, 15706, 15707, 15711, 15712, 15713, 15714, 15715,
-   15716, 15717, 15718, 15722, 15723, 15724, 15725, 15726, 15727, 15728,
-   15729, 15730, 15734, 15735, 15736, 15737, 15738, 15739, 15740, 15741,
-   15754, 15755, 15756, 15757, 15758, 15759, 15760, 15761, 15762, 15763,
-   15764, 15765, 15766, 15767, 15768, 15769, 15770, 15771, 15772, 15773,
-   15774, 15775, 15776, 15777, 15778, 15779, 15780, 15781, 15782, 15783,
-   15784, 15785, 15786, 15787, 15788, 15789, 15790, 15791, 15792, 15793,
-   15794, 15795, 15796, 15797, 15798, 15799, 15800, 15801, 15802, 15803,
-   15804, 15805, 15806, 15807, 15808, 15849, 15850, 15851, 15852, 15853,
-   15854, 15865, 15866, 15867, 15868, 15869, 15870, 15871, 15872, 15873,
-   15874, 15878, 15879, 15880, 15887, 15888, 15889, 15893, 15894, 15895,
-   15904, 15905, 15906, 15907, 15908, 15909, 15910, 15911, 15912, 15913,
-   15914, 15915, 15916, 15917, 15918, 15919, 15920, 15921, 15922, 15923,
-   15924, 15925, 15926, 15927, 15928, 15929, 15930, 15931, 15932, 15933,
-   15934, 15935, 15936, 15937, 15945, 15946, 15947, 15948, 15949, 15950,
-   15951, 15952, 15953, 15954, 15955, 15956, 15957, 15958, 15959, 15960,
-   15961, 15962, 15963, 15964, 15965, 15966, 15967, 15968, 15969, 15970,
-   15971, 15972, 15973, 15974, 15975, 15976, 15977, 15978, 15979, 15980,
-   15981, 15982, 15983, 15984, 15985, 15986, 15987, 15988, 15989, 15990,
-   15995, 15996, 15997, 15998, 15999, 16000, 16001, 16002, 16003, 16004,
-   16005, 16006, 16007, 16008, 16009, 16010, 16011, 16012, 16013, 16014,
-   16015, 16016, 16017, 16018, 16019, 16020, 16021, 16022, 16023, 16024,
-   16025, 16026, 16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034,
-   16035, 16036, 16037, 16038, 16039, 16040, 16041, 16042, 16043, 16044,
-   16045, 16046, 16047, 16048, 16049, 16050, 16051, 16052, 16053, 16054,
-   16055, 16056, 16057, 16058, 16059, 16060, 16061, 16062, 16063, 16064,
-   16065, 16066, 16067, 16068, 16069, 16070, 16071, 16072, 16073, 16074,
-   16075, 16076, 16077, 16078, 16079, 16080, 16081, 16082, 16083, 16084,
-   16085, 16086, 16087, 16088, 16089, 16090, 16091, 16092, 16093, 16094,
-   16095, 16096, 16097, 16098, 16099, 16100, 16101, 16102, 16103, 16104,
-   16105, 16106, 16107, 16108, 16109, 16110, 16111, 16112, 16113, 16114,
-   16115, 16116, 16117, 16118, 16119, 16120, 16121, 16122, 16123, 16124,
-   16125, 16126, 16127, 16128, 16129, 16130, 16131, 16132, 16133, 16134,
-   16135, 16136, 16137, 16138, 16139, 16140, 16141, 16142, 16143, 16144,
-   16145, 16146, 16147, 16148, 16149, 16150, 16151, 16152, 16153, 16154,
-   16155, 16156, 16157, 16158, 16159, 16160, 16161, 16162, 16163, 16164,
-   16165, 16166, 16167, 16168, 16169, 16170, 16171, 16172, 16173, 16174,
-   16175, 16176, 16177, 16178, 16179, 16180, 16181, 16182, 16183, 16184,
-   16185, 16186, 16187, 16188, 16189, 16190, 16191, 16192, 16193, 16194,
-   16195, 16196, 16197, 16198, 16199, 16200, 16201, 16202, 16203, 16204,
-   16205, 16206, 16207, 16208, 16209, 16210, 16211, 16212, 16213, 16214,
-   16215, 16216, 16217, 16218, 16219, 16220, 16221, 16222, 16223, 16224,
-   16225, 16226, 16227, 16228, 16229, 16230, 16231, 16232, 16233, 16234,
-   16235, 16236, 16237, 16238, 16239, 16240, 16241, 16242, 16243, 16244,
-   16245, 16246, 16247, 16248, 16249, 16250, 16251, 16252, 16253, 16254,
-   16255, 16256, 16257, 16258, 16259, 16260, 16261, 16273, 16272, 16282,
-   16286, 16281, 16303, 16304, 16310, 16309, 16316, 16315, 16325, 16324,
-   16335, 16334, 16340, 16348, 16350, 16355, 16355, 16364, 16363, 16377,
-   16376, 16381, 16385, 16386, 16387, 16391, 16392, 16393, 16394, 16398,
-   16399, 16400, 16401, 16406, 16411, 16416, 16425, 16430, 16435, 16440,
-   16445, 16450, 16455, 16460, 16474, 16485, 16504, 16522, 16534, 16542,
-   16547, 16563, 16564, 16565, 16566, 16570, 16589, 16607, 16608, 16612,
-   16613, 16614, 16615, 16619, 16634, 16638, 16639, 16640, 16650, 16651,
-   16652, 16658, 16664, 16676, 16675, 16689, 16690, 16696, 16705, 16706,
-   16710, 16711, 16715, 16734, 16735, 16736, 16741, 16742, 16747, 16746,
-   16763, 16773, 16784, 16783, 16815, 16816, 16820, 16821, 16825, 16826,
-   16827, 16828, 16830, 16829, 16842, 16843, 16844, 16845, 16846, 16852,
-   16857, 16863, 16869, 16875, 16882, 16889, 16893, 16900, 16909, 16911,
-   16916, 16921, 16928, 16935, 16942, 16949, 16956, 16963, 16975, 16976,
-   16979, 16980, 16983, 16988, 16996, 17006, 17025, 17028, 17030, 17034,
-   17035, 17042, 17044, 17048, 17049, 17054, 17053, 17057, 17056, 17060,
-   17059, 17063, 17062, 17065, 17066, 17067, 17068, 17069, 17070, 17071,
-   17072, 17073, 17074, 17075, 17076, 17077, 17078, 17079, 17080, 17081,
-   17082, 17083, 17084, 17085, 17086, 17087, 17088, 17089, 17090, 17091,
-   17095, 17096, 17100, 17101, 17105, 17112, 17119, 17129, 17139, 17148,
-   17157, 17170, 17175, 17183, 17188, 17196, 17201, 17208, 17208, 17209,
-   17209, 17212, 17219, 17224, 17230, 17236, 17242, 17246, 17250, 17251,
-   17255, 17283, 17285, 17289, 17293, 17297, 17304, 17310, 17316, 17322,
-   17328, 17337, 17338, 17342, 17343, 17348, 17349, 17353, 17354, 17358,
-   17359, 17363, 17364, 17369, 17368, 17378, 17387, 17388, 17392, 17393,
-   17398, 17399, 17400, 17405, 17406, 17407, 17411, 17423, 17432, 17438,
-   17447, 17456, 17469, 17471, 17473, 17478, 17479, 17484, 17483, 17500,
-   17499, 17511, 17511, 17532, 17533, 17540, 17548, 17549, 17550, 17554,
-   17555, 17560, 17559, 17581, 17588, 17589, 17593, 17594, 17598, 17599,
-   17600, 17605, 17613, 17634, 17661, 17663, 17667, 17668, 17672, 17673,
-   17681, 17682, 17683, 17684, 17690, 17696, 17706, 17707, 17712, 17725,
-   17741, 17742, 17743, 17747, 17748, 17752, 17753, 17758, 17759, 17763,
-   17769, 17778, 17778, 17803, 17804, 17805, 17806, 17807, 17808, 17809,
-   17813, 17814, 17815, 17816, 17826, 17828, 17834, 17840, 17850, 17859,
-   17865, 17870, 17874, 17848, 17926, 17944, 17943, 17961, 17970, 17959,
-   17986, 17994, 17985, 18008, 18012, 18016, 18020, 18024, 18028, 18036,
-   18037, 18053, 18060, 18067, 18077, 18078, 18079, 18083, 18084, 18085,
-   18089, 18090, 18095, 18097, 18096, 18102, 18103, 18107, 18114, 18124,
-   18130, 18141
+    3930,  3946,  3947,  3952,  3958,  3967,  3974,  3983,  3992,  3997,
+    4006,  4008,  4010,  4019,  4024,  4031,  4040,  4049,  4051,  4053,
+    4055,  4057,  4059,  4061,  4063,  4065,  4067,  4069,  4071,  4073,
+    4078,  4079,  4087,  4099,  4114,  4115,  4128,  4129,  4130,  4131,
+    4132,  4136,  4137,  4138,  4139,  4140,  4141,  4142,  4143,  4144,
+    4145,  4149,  4150,  4151,  4152,  4157,  4156,  4167,  4167,  4220,
+    4221,  4226,  4225,  4236,  4247,  4247,  4251,  4256,  4261,  4267,
+    4276,  4281,  4286,  4292,  4302,  4310,  4318,  4326,  4336,  4335,
+    4354,  4353,  4369,  4375,  4383,  4384,  4388,  4396,  4401,  4406,
+    4414,  4415,  4430,  4448,  4462,  4479,  4481,  4497,  4479,  4516,
+    4518,  4519,  4524,  4523,  4593,  4595,  4593,  4603,  4608,  4609,
+    4613,  4614,  4619,  4623,  4618,  4643,  4647,  4642,  4665,  4675,
+    4679,  4683,  4684,  4688,  4699,  4697,  4714,  4713,  4728,  4727,
+    4744,  4745,  4749,  4757,  4762,  4769,  4778,  4793,  4792,  4809,
+    4808,  4828,  4837,  4836,  4844,  4843,  4852,  4857,  4866,  4851,
+    4876,  4875,  4886,  4885,  4895,  4894,  4905,  4912,  4904,  4929,
+    4928,  4940,  4942,  4947,  4949,  4951,  4968,  4973,  4979,  4986,
+    4987,  4995,  5001,  5010,  5016,  5022,  5023,  5027,  5027,  5032,
+    5033,  5034,  5038,  5039,  5040,  5044,  5048,  5049,  5050,  5054,
+    5055,  5056,  5057,  5058,  5059,  5060,  5061,  5065,  5069,  5070,
+    5071,  5075,  5076,  5077,  5078,  5079,  5083,  5087,  5088,  5089,
+    5093,  5094,  5095,  5096,  5097,  5098,  5099,  5103,  5107,  5108,
+    5109,  5113,  5114,  5115,  5120,  5128,  5136,  5144,  5157,  5170,
+    5175,  5180,  5188,  5196,  5204,  5212,  5220,  5228,  5236,  5246,
+    5256,  5266,  5268,  5272,  5277,  5287,  5288,  5301,  5300,  5303,
+    5309,  5311,  5310,  5313,  5312,  5314,  5328,  5329,  5333,  5334,
+    5340,  5338,  5345,  5350,  5352,  5351,  5354,  5353,  5358,  5395,
+    5396,  5401,  5400,  5416,  5431,  5430,  5448,  5447,  5453,  5461,
+    5460,  5463,  5465,  5468,  5467,  5476,  5479,  5478,  5487,  5488,
+    5494,  5495,  5512,  5513,  5517,  5518,  5522,  5536,  5546,  5557,
+    5566,  5567,  5580,  5582,  5581,  5586,  5584,  5595,  5596,  5600,
+    5614,  5626,  5627,  5640,  5649,  5671,  5672,  5677,  5676,  5700,
+    5712,  5728,  5727,  5742,  5741,  5755,  5760,  5765,  5785,  5803,
+    5807,  5834,  5846,  5847,  5852,  5861,  5851,  5886,  5887,  5891,
+    5902,  5921,  5934,  5960,  5961,  5966,  5965,  6002,  6011,  6012,
+    6016,  6017,  6021,  6023,  6029,  6035,  6037,  6039,  6041,  6043,
+    6045,  6050,  6051,  6057,  6073,  6076,  6093,  6101,  6101,  6122,
+    6123,  6127,  6128,  6132,  6143,  6144,  6148,  6149,  6153,  6154,
+    6158,  6159,  6164,  6167,  6175,  6178,  6185,  6189,  6195,  6197,
+    6201,  6202,  6206,  6207,  6208,  6212,  6227,  6232,  6237,  6242,
+    6247,  6252,  6257,  6272,  6278,  6293,  6298,  6313,  6319,  6337,
+    6342,  6347,  6352,  6357,  6362,  6368,  6367,  6393,  6394,  6395,
+    6400,  6405,  6410,  6412,  6414,  6416,  6422,  6427,  6432,  6441,
+    6450,  6456,  6462,  6467,  6470,  6472,  6476,  6495,  6503,  6518,
+    6528,  6539,  6540,  6541,  6542,  6543,  6544,  6545,  6549,  6550,
+    6551,  6555,  6556,  6557,  6558,  6563,  6570,  6571,  6575,  6576,
+    6577,  6578,  6582,  6584,  6590,  6589,  6597,  6596,  6604,  6603,
+    6611,  6610,  6620,  6617,  6628,  6626,  6635,  6634,  6673,  6681,
+    6689,  6690,  6694,  6704,  6705,  6709,  6710,  6714,  6719,  6718,
+    6754,  6754,  6757,  6756,  6766,  6767,  6771,  6772,  6776,  6777,
+    6781,  6782,  6786,  6787,  6788,  6789,  6791,  6790,  6796,  6801,
+    6809,  6810,  6815,  6818,  6822,  6826,  6833,  6834,  6838,  6839,
+    6843,  6849,  6855,  6856,  6864,  6863,  6882,  6888,  6889,  6899,
+    6909,  6909,  6912,  6913,  6921,  6922,  6923,  6924,  6925,  6929,
+    6930,  6931,  6947,  6951,  6955,  6959,  6961,  6968,  6970,  6975,
+    6977,  6978,  6979,  6983,  6987,  6992,  6997,  7001,  7005,  7010,
+    7015,  7023,  7041,  7042,  7049,  7070,  7081,  7086,  7091,  7096,
+    7101,  7112,  7117,  7122,  7127,  7129,  7131,  7133,  7135,  7137,
+    7139,  7141,  7149,  7151,  7156,  7157,  7158,  7159,  7160,  7161,
+    7162,  7163,  7167,  7171,  7172,  7176,  7177,  7181,  7182,  7183,
+    7184,  7185,  7189,  7190,  7191,  7192,  7193,  7197,  7203,  7204,
+    7209,  7211,  7218,  7219,  7220,  7224,  7228,  7229,  7230,  7231,
+    7232,  7233,  7237,  7238,  7239,  7240,  7244,  7245,  7249,  7250,
+    7254,  7255,  7260,  7261,  7265,  7266,  7267,  7274,  7275,  7281,
+    7288,  7292,  7293,  7297,  7298,  7302,  7310,  7318,  7327,  7331,
+    7337,  7341,  7342,  7351,  7360,  7366,  7372,  7385,  7391,  7401,
+    7415,  7416,  7420,  7425,  7429,  7430,  7434,  7435,  7439,  7446,
+    7450,  7451,  7455,  7463,  7464,  7468,  7469,  7473,  7474,  7478,
+    7479,  7480,  7488,  7489,  7493,  7494,  7495,  7496,  7500,  7501,
+    7506,  7505,  7518,  7519,  7523,  7526,  7527,  7528,  7529,  7533,
+    7541,  7548,  7549,  7553,  7563,  7564,  7568,  7569,  7572,  7574,
+    7578,  7590,  7591,  7595,  7602,  7615,  7616,  7618,  7620,  7626,
+    7631,  7637,  7643,  7650,  7660,  7661,  7662,  7663,  7664,  7668,
+    7669,  7673,  7674,  7678,  7679,  7683,  7684,  7685,  7689,  7690,
+    7694,  7698,  7710,  7711,  7715,  7716,  7720,  7721,  7725,  7726,
+    7730,  7731,  7735,  7736,  7740,  7741,  7746,  7747,  7748,  7752,
+    7754,  7759,  7764,  7766,  7774,  7782,  7788,  7797,  7798,  7802,
+    7806,  7807,  7817,  7818,  7819,  7823,  7827,  7834,  7840,  7852,
+    7853,  7857,  7859,  7869,  7883,  7868,  7904,  7903,  7917,  7926,
+    7925,  7941,  7940,  7956,  7955,  7968,  7962,  7975,  7974,  8009,
+    8014,  8019,  8024,  8030,  8029,  8036,  8043,  8053,  8042,  8073,
+    8074,  8075,  8076,  8080,  8081,  8093,  8094,  8098,  8099,  8102,
+    8104,  8112,  8120,  8122,  8124,  8125,  8133,  8134,  8140,  8149,
+    8147,  8160,  8173,  8172,  8185,  8183,  8196,  8203,  8213,  8214,
+    8238,  8245,  8249,  8255,  8253,  8270,  8272,  8277,  8285,  8284,
+    8298,  8302,  8301,  8313,  8314,  8318,  8331,  8332,  8336,  8340,
+    8347,  8352,  8356,  8363,  8367,  8372,  8380,  8388,  8398,  8409,
+    8419,  8430,  8440,  8446,  8452,  8457,  8463,  8477,  8491,  8496,
+    8500,  8505,  8506,  8507,  8512,  8517,  8523,  8525,  8526,  8527,
+    8528,  8532,  8537,  8545,  8550,  8558,  8559,  8563,  8564,  8568,
+    8568,  8571,  8573,  8577,  8578,  8582,  8583,  8592,  8593,  8594,
+    8598,  8599,  8604,  8613,  8614,  8615,  8616,  8621,  8620,  8630,
+    8629,  8637,  8644,  8654,  8671,  8674,  8681,  8685,  8692,  8696,
+    8700,  8707,  8707,  8713,  8714,  8718,  8719,  8720,  8724,  8725,
+    8734,  8741,  8742,  8747,  8746,  8758,  8759,  8760,  8764,  8766,
+    8765,  8772,  8771,  8792,  8793,  8797,  8798,  8802,  8803,  8804,
+    8808,  8809,  8814,  8813,  8834,  8835,  8839,  8844,  8845,  8852,
+    8854,  8859,  8861,  8860,  8872,  8874,  8873,  8886,  8887,  8892,
+    8901,  8902,  8903,  8907,  8914,  8924,  8932,  8941,  8943,  8942,
+    8948,  8947,  8970,  8971,  8975,  8976,  8980,  8981,  8982,  8983,
+    8984,  8985,  8989,  8990,  8995,  8994,  9015,  9016,  9017,  9022,
+    9021,  9027,  9034,  9040,  9049,  9050,  9054,  9070,  9069,  9082,
+    9083,  9087,  9088,  9092,  9103,  9114,  9115,  9120,  9119,  9130,
+    9131,  9135,  9136,  9140,  9151,  9163,  9162,  9170,  9170,  9179,
+    9180,  9185,  9186,  9195,  9204,  9205,  9206,  9207,  9208,  9209,
+    9210,  9214,  9215,  9216,  9217,  9218,  9219,  9220,  9224,  9224,
+    9232,  9232,  9244,  9248,  9250,  9254,  9254,  9265,  9269,  9271,
+    9275,  9275,  9286,  9291,  9291,  9300,  9300,  9312,  9318,  9316,
+    9323,  9335,  9333,  9340,  9350,  9355,  9354,  9359,  9363,  9374,
+    9375,  9379,  9380,  9384,  9385,  9386,  9390,  9391,  9392,  9396,
+    9397,  9398,  9399,  9400,  9404,  9404,  9422,  9429,  9431,  9435,
+    9439,  9445,  9452,  9454,  9463,  9467,  9471,  9478,  9486,  9490,
+    9498,  9501,  9508,  9512,  9516,  9520,  9527,  9528,  9532,  9533,
+    9550,  9569,  9571,  9578,  9589,  9590,  9591,  9605,  9610,  9632,
+    9638,  9644,  9650,  9656,  9657,  9658,  9659,  9660,  9664,  9665,
+    9666,  9670,  9671,  9672,  9676,  9677,  9682,  9733,  9740,  9783,
+    9789,  9795,  9801,  9807,  9813,  9819,  9825,  9829,  9835,  9841,
+    9847,  9853,  9859,  9863,  9869,  9878,  9884,  9892,  9898,  9907,
+    9913,  9921,  9931,  9938,  9946,  9952,  9961,  9965,  9971,  9977,
+    9983,  9989,  9996, 10002, 10008, 10014, 10020, 10027, 10033, 10039,
+   10045, 10051, 10057, 10063, 10069, 10075, 10079, 10080, 10084, 10085,
+   10089, 10090, 10094, 10095, 10099, 10100, 10101, 10102, 10103, 10104,
+   10108, 10109, 10114, 10118, 10122, 10123, 10124, 10128, 10129, 10130,
+   10131, 10132, 10133, 10137, 10138, 10139, 10144, 10143, 10149, 10157,
+   10180, 10187, 10196, 10197, 10198, 10199, 10203, 10212, 10213, 10214,
+   10215, 10216, 10217, 10218, 10219, 10251, 10252, 10253, 10254, 10255,
+   10256, 10257, 10258, 10259, 10260, 10261, 10262, 10269, 10275, 10280,
+   10290, 10295, 10300, 10306, 10311, 10317, 10328, 10335, 10340, 10345,
+   10350, 10355, 10360, 10365, 10373, 10374, 10375, 10379, 10380, 10388,
+   10389, 10395, 10399, 10405, 10411, 10420, 10421, 10430, 10437, 10451,
+   10457, 10463, 10472, 10481, 10487, 10493, 10499, 10505, 10520, 10531,
+   10537, 10543, 10549, 10555, 10561, 10569, 10576, 10580, 10585, 10593,
+   10614, 10621, 10627, 10634, 10641, 10647, 10653, 10659, 10665, 10671,
+   10677, 10683, 10689, 10696, 10702, 10709, 10715, 10720, 10725, 10730,
+   10735, 10753, 10759, 10765, 10770, 10777, 10784, 10792, 10799, 10806,
+   10813, 10820, 10837, 10843, 10849, 10855, 10861, 10868, 10874, 10880,
+   10889, 10900, 10907, 10913, 10919, 10926, 10934, 10940, 10946, 10951,
+   10957, 10965, 10971, 10977, 10983, 10989, 10997, 11009, 11016, 11031,
+   11037, 11044, 11051, 11058, 11065, 11072, 11076, 11083, 11101, 11100,
+   11168, 11176, 11178, 11183, 11184, 11188, 11189, 11193, 11194, 11198,
+   11205, 11213, 11240, 11246, 11252, 11258, 11264, 11270, 11279, 11286,
+   11288, 11285, 11295, 11306, 11312, 11318, 11324, 11330, 11336, 11342,
+   11348, 11354, 11361, 11360, 11385, 11394, 11412, 11414, 11421, 11428,
+   11435, 11442, 11449, 11456, 11463, 11470, 11477, 11484, 11495, 11502,
+   11513, 11524, 11544, 11543, 11549, 11566, 11572, 11581, 11590, 11600,
+   11599, 11611, 11621, 11629, 11634, 11642, 11643, 11648, 11653, 11656,
+   11658, 11662, 11667, 11675, 11676, 11680, 11684, 11691, 11698, 11705,
+   11718, 11717, 11734, 11737, 11736, 11741, 11740, 11745, 11744, 11748,
+   11753, 11754, 11758, 11759, 11760, 11761, 11762, 11763, 11764, 11765,
+   11769, 11770, 11771, 11775, 11776, 11780, 11787, 11795, 11796, 11800,
+   11807, 11815, 11824, 11834, 11835, 11844, 11853, 11865, 11866, 11878,
+   11889, 11890, 11896, 11897, 11915, 11924, 11922, 11940, 11938, 11949,
+   11959, 11957, 11975, 11974, 11984, 11995, 11993, 12012, 12011, 12022,
+   12034, 12035, 12036, 12040, 12041, 12049, 12050, 12054, 12069, 12070,
+   12074, 12074, 12115, 12181, 12224, 12225, 12234, 12233, 12242, 12243,
+   12244, 12248, 12249, 12250, 12250, 12254, 12260, 12268, 12268, 12283,
+   12300, 12301, 12309, 12319, 12318, 12332, 12349, 12332, 12356, 12360,
+   12369, 12380, 12381, 12386, 12389, 12390, 12391, 12395, 12396, 12401,
+   12400, 12406, 12405, 12413, 12414, 12417, 12419, 12419, 12423, 12423,
+   12428, 12429, 12433, 12435, 12440, 12441, 12445, 12456, 12470, 12471,
+   12472, 12473, 12474, 12475, 12476, 12477, 12478, 12479, 12480, 12481,
+   12485, 12486, 12487, 12488, 12489, 12490, 12491, 12492, 12493, 12497,
+   12498, 12499, 12500, 12503, 12505, 12506, 12510, 12511, 12519, 12521,
+   12525, 12527, 12526, 12540, 12543, 12542, 12557, 12562, 12577, 12579,
+   12583, 12588, 12596, 12597, 12614, 12637, 12638, 12644, 12645, 12649,
+   12662, 12661, 12669, 12670, 12679, 12680, 12684, 12685, 12689, 12690,
+   12704, 12705, 12709, 12719, 12728, 12735, 12742, 12752, 12753, 12760,
+   12770, 12771, 12773, 12775, 12777, 12779, 12788, 12792, 12793, 12797,
+   12809, 12811, 12816, 12815, 12865, 12870, 12878, 12879, 12880, 12884,
+   12885, 12889, 12902, 12909, 12914, 12921, 12928, 12935, 12945, 12950,
+   12955, 12959, 12965, 12971, 12980, 12989, 12993, 13000, 13001, 13004,
+   13006, 13010, 13011, 13015, 13016, 13017, 13018, 13019, 13020, 13024,
+   13025, 13026, 13027, 13028, 13032, 13033, 13034, 13035, 13039, 13040,
+   13041, 13042, 13043, 13047, 13048, 13049, 13050, 13051, 13055, 13060,
+   13061, 13065, 13066, 13070, 13071, 13072, 13077, 13076, 13110, 13111,
+   13115, 13116, 13120, 13130, 13130, 13142, 13143, 13146, 13166, 13170,
+   13175, 13183, 13188, 13199, 13187, 13201, 13216, 13228, 13227, 13245,
+   13244, 13253, 13270, 13276, 13290, 13305, 13313, 13317, 13322, 13321,
+   13330, 13335, 13341, 13346, 13351, 13358, 13356, 13370, 13371, 13375,
+   13386, 13399, 13400, 13404, 13418, 13422, 13431, 13434, 13441, 13442,
+   13450, 13458, 13449, 13470, 13477, 13469, 13489, 13497, 13498, 13505,
+   13509, 13510, 13519, 13520, 13524, 13534, 13535, 13536, 13538, 13537,
+   13549, 13551, 13555, 13556, 13557, 13561, 13562, 13566, 13567, 13571,
+   13581, 13582, 13586, 13587, 13591, 13592, 13596, 13597, 13602, 13601,
+   13617, 13616, 13631, 13632, 13636, 13637, 13641, 13646, 13654, 13662,
+   13673, 13674, 13680, 13688, 13690, 13692, 13690, 13705, 13713, 13704,
+   13735, 13736, 13740, 13749, 13750, 13754, 13764, 13765, 13772, 13771,
+   13787, 13790, 13797, 13798, 13805, 13820, 13826, 13825, 13837, 13836,
+   13849, 13851, 13855, 13856, 13860, 13875, 13893, 13894, 13898, 13899,
+   13903, 13904, 13905, 13910, 13909, 13930, 13932, 13935, 13937, 13940,
+   13941, 13944, 13948, 13952, 13956, 13960, 13964, 13968, 13972, 13976,
+   13984, 13987, 13997, 13996, 14012, 14019, 14027, 14035, 14043, 14051,
+   14059, 14066, 14073, 14079, 14081, 14083, 14092, 14096, 14101, 14100,
+   14107, 14106, 14111, 14120, 14127, 14132, 14137, 14142, 14147, 14152,
+   14154, 14156, 14158, 14165, 14173, 14175, 14183, 14190, 14197, 14205,
+   14211, 14216, 14224, 14232, 14240, 14244, 14249, 14256, 14261, 14268,
+   14275, 14281, 14287, 14293, 14301, 14306, 14313, 14320, 14327, 14334,
+   14339, 14344, 14349, 14354, 14361, 14383, 14385, 14387, 14392, 14393,
+   14396, 14398, 14402, 14403, 14407, 14408, 14412, 14413, 14417, 14418,
+   14422, 14423, 14427, 14428, 14436, 14448, 14447, 14463, 14462, 14472,
+   14473, 14474, 14475, 14476, 14480, 14481, 14485, 14492, 14493, 14494,
+   14498, 14499, 14512, 14513, 14514, 14529, 14528, 14541, 14540, 14552,
+   14556, 14557, 14572, 14575, 14574, 14587, 14588, 14593, 14595, 14597,
+   14599, 14601, 14603, 14611, 14613, 14615, 14617, 14622, 14624, 14632,
+   14634, 14636, 14638, 14655, 14656, 14660, 14661, 14664, 14666, 14667,
+   14671, 14687, 14688, 14693, 14692, 14702, 14703, 14707, 14707, 14711,
+   14710, 14716, 14720, 14721, 14725, 14726, 14734, 14733, 14744, 14748,
+   14752, 14765, 14764, 14779, 14780, 14781, 14785, 14786, 14787, 14788,
+   14796, 14800, 14809, 14815, 14827, 14839, 14850, 14863, 14826, 14873,
+   14874, 14878, 14879, 14883, 14884, 14892, 14896, 14897, 14898, 14901,
+   14903, 14907, 14908, 14912, 14917, 14924, 14929, 14936, 14938, 14942,
+   14943, 14947, 14952, 14960, 14961, 14965, 14967, 14975, 14976, 14980,
+   14981, 14982, 14986, 14988, 14993, 14994, 15003, 15004, 15008, 15009,
+   15013, 15026, 15031, 15036, 15041, 15049, 15057, 15062, 15075, 15084,
+   15100, 15107, 15113, 15123, 15124, 15132, 15133, 15134, 15135, 15149,
+   15155, 15161, 15167, 15173, 15179, 15198, 15208, 15218, 15224, 15231,
+   15241, 15249, 15257, 15269, 15270, 15279, 15278, 15297, 15298, 15303,
+   15304, 15311, 15309, 15336, 15337, 15343, 15348, 15357, 15372, 15373,
+   15377, 15382, 15390, 15395, 15403, 15408, 15413, 15418, 15424, 15429,
+   15437, 15442, 15447, 15452, 15458, 15466, 15467, 15478, 15486, 15490,
+   15496, 15502, 15512, 15518, 15527, 15537, 15538, 15542, 15543, 15544,
+   15548, 15556, 15564, 15572, 15580, 15581, 15589, 15590, 15598, 15599,
+   15604, 15613, 15614, 15622, 15623, 15631, 15632, 15633, 15637, 15650,
+   15680, 15690, 15690, 15692, 15702, 15703, 15704, 15705, 15706, 15707,
+   15708, 15709, 15714, 15715, 15716, 15717, 15718, 15719, 15720, 15721,
+   15722, 15730, 15731, 15732, 15733, 15737, 15738, 15739, 15740, 15741,
+   15742, 15743, 15744, 15748, 15749, 15750, 15751, 15752, 15753, 15754,
+   15755, 15756, 15760, 15761, 15762, 15763, 15764, 15765, 15766, 15767,
+   15780, 15781, 15782, 15783, 15784, 15785, 15786, 15787, 15788, 15789,
+   15790, 15791, 15792, 15793, 15794, 15795, 15796, 15797, 15798, 15799,
+   15800, 15801, 15802, 15803, 15804, 15805, 15806, 15807, 15808, 15809,
+   15810, 15811, 15812, 15813, 15814, 15815, 15816, 15817, 15818, 15819,
+   15820, 15821, 15822, 15823, 15824, 15825, 15826, 15827, 15828, 15829,
+   15830, 15831, 15832, 15833, 15834, 15875, 15876, 15877, 15878, 15879,
+   15880, 15891, 15892, 15893, 15894, 15895, 15896, 15897, 15898, 15899,
+   15900, 15904, 15905, 15906, 15913, 15914, 15915, 15919, 15920, 15921,
+   15930, 15931, 15932, 15933, 15934, 15935, 15936, 15937, 15938, 15939,
+   15940, 15941, 15942, 15943, 15944, 15945, 15946, 15947, 15948, 15949,
+   15950, 15951, 15952, 15953, 15954, 15955, 15956, 15957, 15958, 15959,
+   15960, 15961, 15962, 15963, 15971, 15972, 15973, 15974, 15975, 15976,
+   15977, 15978, 15979, 15980, 15981, 15982, 15983, 15984, 15985, 15986,
+   15987, 15988, 15989, 15990, 15991, 15992, 15993, 15994, 15995, 15996,
+   15997, 15998, 15999, 16000, 16001, 16002, 16003, 16004, 16005, 16006,
+   16007, 16008, 16009, 16010, 16011, 16012, 16013, 16014, 16015, 16016,
+   16021, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16030,
+   16031, 16032, 16033, 16034, 16035, 16036, 16037, 16038, 16039, 16040,
+   16041, 16042, 16043, 16044, 16045, 16046, 16047, 16048, 16049, 16050,
+   16051, 16052, 16053, 16054, 16055, 16056, 16057, 16058, 16059, 16060,
+   16061, 16062, 16063, 16064, 16065, 16066, 16067, 16068, 16069, 16070,
+   16071, 16072, 16073, 16074, 16075, 16076, 16077, 16078, 16079, 16080,
+   16081, 16082, 16083, 16084, 16085, 16086, 16087, 16088, 16089, 16090,
+   16091, 16092, 16093, 16094, 16095, 16096, 16097, 16098, 16099, 16100,
+   16101, 16102, 16103, 16104, 16105, 16106, 16107, 16108, 16109, 16110,
+   16111, 16112, 16113, 16114, 16115, 16116, 16117, 16118, 16119, 16120,
+   16121, 16122, 16123, 16124, 16125, 16126, 16127, 16128, 16129, 16130,
+   16131, 16132, 16133, 16134, 16135, 16136, 16137, 16138, 16139, 16140,
+   16141, 16142, 16143, 16144, 16145, 16146, 16147, 16148, 16149, 16150,
+   16151, 16152, 16153, 16154, 16155, 16156, 16157, 16158, 16159, 16160,
+   16161, 16162, 16163, 16164, 16165, 16166, 16167, 16168, 16169, 16170,
+   16171, 16172, 16173, 16174, 16175, 16176, 16177, 16178, 16179, 16180,
+   16181, 16182, 16183, 16184, 16185, 16186, 16187, 16188, 16189, 16190,
+   16191, 16192, 16193, 16194, 16195, 16196, 16197, 16198, 16199, 16200,
+   16201, 16202, 16203, 16204, 16205, 16206, 16207, 16208, 16209, 16210,
+   16211, 16212, 16213, 16214, 16215, 16216, 16217, 16218, 16219, 16220,
+   16221, 16222, 16223, 16224, 16225, 16226, 16227, 16228, 16229, 16230,
+   16231, 16232, 16233, 16234, 16235, 16236, 16237, 16238, 16239, 16240,
+   16241, 16242, 16243, 16244, 16245, 16246, 16247, 16248, 16249, 16250,
+   16251, 16252, 16253, 16254, 16255, 16256, 16257, 16258, 16259, 16260,
+   16261, 16262, 16263, 16264, 16265, 16266, 16267, 16268, 16269, 16270,
+   16271, 16272, 16273, 16274, 16275, 16276, 16277, 16278, 16279, 16280,
+   16281, 16282, 16283, 16284, 16285, 16286, 16287, 16299, 16298, 16308,
+   16312, 16307, 16329, 16330, 16336, 16335, 16342, 16341, 16351, 16350,
+   16361, 16360, 16366, 16374, 16376, 16381, 16381, 16390, 16389, 16403,
+   16402, 16407, 16411, 16412, 16413, 16417, 16418, 16419, 16420, 16424,
+   16425, 16426, 16427, 16432, 16437, 16442, 16451, 16456, 16461, 16466,
+   16471, 16476, 16481, 16486, 16500, 16511, 16530, 16548, 16560, 16568,
+   16573, 16589, 16590, 16591, 16592, 16596, 16615, 16633, 16634, 16638,
+   16639, 16640, 16641, 16645, 16660, 16664, 16665, 16666, 16676, 16677,
+   16678, 16684, 16690, 16702, 16701, 16715, 16716, 16722, 16731, 16732,
+   16736, 16737, 16741, 16760, 16761, 16762, 16767, 16768, 16773, 16772,
+   16789, 16799, 16810, 16809, 16841, 16842, 16846, 16847, 16851, 16852,
+   16853, 16854, 16856, 16855, 16868, 16869, 16870, 16871, 16872, 16878,
+   16883, 16889, 16895, 16901, 16908, 16915, 16919, 16926, 16935, 16937,
+   16942, 16947, 16954, 16961, 16968, 16975, 16982, 16989, 17001, 17002,
+   17006, 17007, 17011, 17016, 17024, 17034, 17053, 17056, 17058, 17062,
+   17063, 17070, 17072, 17076, 17077, 17082, 17081, 17085, 17084, 17088,
+   17087, 17091, 17090, 17093, 17094, 17095, 17096, 17097, 17098, 17099,
+   17100, 17101, 17102, 17103, 17104, 17105, 17106, 17107, 17108, 17109,
+   17110, 17111, 17112, 17113, 17114, 17115, 17116, 17117, 17118, 17119,
+   17123, 17124, 17128, 17129, 17133, 17140, 17147, 17157, 17167, 17176,
+   17185, 17198, 17203, 17211, 17216, 17224, 17229, 17236, 17236, 17237,
+   17237, 17240, 17247, 17252, 17258, 17264, 17270, 17274, 17278, 17279,
+   17283, 17311, 17313, 17317, 17321, 17325, 17332, 17338, 17344, 17350,
+   17356, 17365, 17366, 17370, 17371, 17376, 17377, 17381, 17382, 17386,
+   17387, 17391, 17392, 17397, 17396, 17406, 17415, 17416, 17420, 17421,
+   17426, 17427, 17428, 17433, 17434, 17435, 17439, 17451, 17460, 17466,
+   17475, 17484, 17497, 17499, 17501, 17506, 17507, 17512, 17511, 17528,
+   17527, 17539, 17539, 17560, 17561, 17568, 17576, 17577, 17578, 17582,
+   17583, 17588, 17587, 17609, 17616, 17617, 17621, 17622, 17626, 17627,
+   17628, 17633, 17641, 17662, 17689, 17691, 17695, 17696, 17700, 17701,
+   17709, 17710, 17711, 17712, 17718, 17724, 17734, 17735, 17740, 17753,
+   17769, 17770, 17771, 17775, 17776, 17780, 17781, 17786, 17787, 17791,
+   17797, 17806, 17806, 17831, 17832, 17833, 17834, 17835, 17836, 17837,
+   17841, 17842, 17843, 17844, 17854, 17856, 17862, 17868, 17878, 17887,
+   17893, 17898, 17902, 17876, 17954, 17972, 17971, 17989, 17998, 17987,
+   18014, 18022, 18013, 18036, 18040, 18044, 18048, 18052, 18056, 18064,
+   18065, 18081, 18088, 18095, 18105, 18106, 18107, 18111, 18112, 18113,
+   18117, 18118, 18123, 18125, 18124, 18130, 18131, 18135, 18142, 18152,
+   18158, 18169
 };
 #endif
 
@@ -26402,59 +26402,59 @@
   case 168:
 #line 2905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
-          if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
-          {
-            my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
+            if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
+            {
+              my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
+            }
+            Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
           }
-          Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
-        }
 #line 26412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 169:
-#line 2915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
-          if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
-          {
-            my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
+            if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
+            {
+              my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
+            }
+            Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
           }
-          Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
-        }
 #line 26424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 170:
-#line 2924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
 #line 26430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 171:
-#line 2925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->udf.type= UDFTYPE_FUNCTION; }
 #line 26436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 172:
-#line 2930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
 #line 26442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 173:
-#line 2931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->udf.type= UDFTYPE_AGGREGATE; }
 #line 26448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 174:
-#line 2934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
 #line 26454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 178:
-#line 2945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->create_info.seq_create_info->min_value= (yyvsp[0].longlong_number);
             Lex->create_info.seq_create_info->used_fields|= seq_field_used_min_value;
@@ -26463,7 +26463,7 @@
     break;
 
   case 179:
-#line 2950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_min_value))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MINVALUE"));
@@ -26473,7 +26473,7 @@
     break;
 
   case 180:
-#line 2956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_min_value))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MINVALUE"));
@@ -26483,7 +26483,7 @@
     break;
 
   case 181:
-#line 2962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            if (unlikely(Lex->create_info.seq_create_info->used_fields &
                seq_field_used_max_value))
@@ -26495,7 +26495,7 @@
     break;
 
   case 182:
-#line 2970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_max_value))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
@@ -26505,7 +26505,7 @@
     break;
 
   case 183:
-#line 2976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields & seq_field_used_max_value))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "MAXVALUE"));
@@ -26515,7 +26515,7 @@
     break;
 
   case 184:
-#line 2982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields &
                          seq_field_used_start))
@@ -26527,7 +26527,7 @@
     break;
 
   case 185:
-#line 2990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 2992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              if (unlikely(Lex->create_info.seq_create_info->used_fields &
                 seq_field_used_increment))
@@ -26539,7 +26539,7 @@
     break;
 
   case 186:
-#line 2998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields &
                 seq_field_used_cache))
@@ -26551,7 +26551,7 @@
     break;
 
   case 187:
-#line 3006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields &
                 seq_field_used_cache))
@@ -26563,7 +26563,7 @@
     break;
 
   case 188:
-#line 3014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields &
                 seq_field_used_cycle))
@@ -26575,7 +26575,7 @@
     break;
 
   case 189:
-#line 3022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.seq_create_info->used_fields &
                 seq_field_used_cycle))
@@ -26587,7 +26587,7 @@
     break;
 
   case 190:
-#line 3030 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
             {
@@ -26603,7 +26603,7 @@
     break;
 
   case 191:
-#line 3042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sql_command != SQLCOM_ALTER_SEQUENCE))
             {
@@ -26620,7 +26620,7 @@
     break;
 
   case 192:
-#line 3058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_create_options_with_check((yyvsp[-1].object_ddl_options))))
               MYSQL_YYABORT;
@@ -26630,13 +26630,13 @@
     break;
 
   case 193:
-#line 3065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->server_options.scheme= (yyvsp[-4].lex_str); }
 #line 26636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 196:
-#line 3075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.username.str == 0);
             Lex->server_options.username= (yyvsp[0].lex_str);
@@ -26645,14 +26645,12 @@
     break;
 
   case 197:
-#line 3080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
             Lex->server_options.host= (yyvsp[0].lex_str);
-            my_casedn_str(system_charset_info,
-		         (char*) Lex->server_options.host.str);
           }
-#line 26656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26654 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 198:
@@ -26661,7 +26659,7 @@
             MYSQL_YYABORT_UNLESS(Lex->server_options.db.str == 0);
             Lex->server_options.db= (yyvsp[0].lex_str);
           }
-#line 26665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 199:
@@ -26670,7 +26668,7 @@
             MYSQL_YYABORT_UNLESS(Lex->server_options.owner.str == 0);
             Lex->server_options.owner= (yyvsp[0].lex_str);
           }
-#line 26674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26672 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 200:
@@ -26679,7 +26677,7 @@
             MYSQL_YYABORT_UNLESS(Lex->server_options.password.str == 0);
             Lex->server_options.password= (yyvsp[0].lex_str);
           }
-#line 26683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 201:
@@ -26688,7 +26686,7 @@
             MYSQL_YYABORT_UNLESS(Lex->server_options.socket.str == 0);
             Lex->server_options.socket= (yyvsp[0].lex_str);
           }
-#line 26692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 202:
@@ -26696,7 +26694,7 @@
     {
             Lex->server_options.port= (yyvsp[0].ulong_num);
           }
-#line 26700 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 203:
@@ -26717,7 +26715,7 @@
             lex->sql_command= SQLCOM_CREATE_EVENT;
             /* We need that for disallowing subqueries */
           }
-#line 26721 "/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 204:
@@ -26729,7 +26727,7 @@
             */
             Lex->sql_command= SQLCOM_CREATE_EVENT;
           }
-#line 26733 "/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 205:
@@ -26738,7 +26736,7 @@
             Lex->event_parse_data->item_expression= (yyvsp[-1].item);
             Lex->event_parse_data->interval= (yyvsp[0].interval);
           }
-#line 26742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 207:
@@ -26746,13 +26744,13 @@
     {
             Lex->event_parse_data->item_execute_at= (yyvsp[0].item);
           }
-#line 26750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26748 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 208:
 #line 3159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 26756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26754 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 209:
@@ -26762,7 +26760,7 @@
             Lex->event_parse_data->status_changed= true;
             (yyval.num)= 1;
           }
-#line 26766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 210:
@@ -26772,7 +26770,7 @@
             Lex->event_parse_data->status_changed= true; 
             (yyval.num)= 1;
           }
-#line 26776 "/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 211:
@@ -26782,7 +26780,7 @@
             Lex->event_parse_data->status_changed= true;
             (yyval.num)= 1;
           }
-#line 26786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 212:
@@ -26793,7 +26791,7 @@
               MYSQL_YYABORT;
             Lex->event_parse_data->item_starts= item;
           }
-#line 26797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 213:
@@ -26801,7 +26799,7 @@
     {
             Lex->event_parse_data->item_starts= (yyvsp[0].item);
           }
-#line 26805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 215:
@@ -26809,13 +26807,13 @@
     {
             Lex->event_parse_data->item_ends= (yyvsp[0].item);
           }
-#line 26813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 216:
 #line 3203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 26819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 218:
@@ -26826,13 +26824,13 @@
                                     : Event_parse_data::ON_COMPLETION_PRESERVE;
             (yyval.num)= 1;
           }
-#line 26830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26828 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 219:
 #line 3218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 26836 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 220:
@@ -26841,7 +26839,7 @@
             Lex->comment= Lex->event_parse_data->comment= (yyvsp[0].lex_str);
             (yyval.num)= 1;
           }
-#line 26845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 221:
@@ -26877,7 +26875,7 @@
 
             lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
           }
-#line 26881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 222:
@@ -26891,7 +26889,7 @@
 
             lex->event_parse_data->body_changed= TRUE;
           }
-#line 26895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 223:
@@ -26907,7 +26905,7 @@
            lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
            bzero((char *)&(lex->mqh),sizeof(lex->mqh));
          }
-#line 26911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 224:
@@ -26916,7 +26914,7 @@
             if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 26920 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 225:
@@ -26925,85 +26923,85 @@
             if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 26929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 226:
 #line 3299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 26935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 227:
 #line 3300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 26941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 228:
 #line 3304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 26947 "/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 229:
 #line 3305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 26953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 230:
 #line 3311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
-#line 26959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 231:
 #line 3313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { /* Just parse it, we only have one language for now. */ }
-#line 26965 "/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 232:
 #line 3315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_NO_SQL; }
-#line 26971 "/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 233:
 #line 3317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_CONTAINS_SQL; }
-#line 26977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 234:
 #line 3319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_READS_SQL_DATA; }
-#line 26983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 235:
 #line 3321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_MODIFIES_SQL_DATA; }
-#line 26989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 236:
 #line 3323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 26995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 237:
 #line 3328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 27001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 26999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 238:
 #line 3329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.detistic= ! (yyvsp[-1].num); }
-#line 27007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 239:
@@ -27011,7 +27009,7 @@
     {
             Lex->sp_chistics.suid= SP_IS_SUID;
           }
-#line 27015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 240:
@@ -27019,7 +27017,7 @@
     {
             Lex->sp_chistics.suid= SP_IS_NOT_SUID;
           }
-#line 27023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 241:
@@ -27028,13 +27026,13 @@
             if (unlikely(Lex->call_statement_start(thd, (yyvsp[0].spname))))
               MYSQL_YYABORT;
           }
-#line 27032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 242:
 #line 3349 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 27038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 247:
@@ -27042,7 +27040,7 @@
     {
            Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
           }
-#line 27046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 248:
@@ -27050,7 +27048,7 @@
     {
             Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
           }
-#line 27054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 253:
@@ -27059,7 +27057,7 @@
             if (unlikely(!((yyval.spvar)= Lex->sp_param_init(&(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 27063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27061 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 254:
@@ -27068,7 +27066,7 @@
             if (unlikely(Lex->sp_param_fill_definition((yyval.spvar)= (yyvsp[-1].spvar))))
               MYSQL_YYABORT;
           }
-#line 27072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 255:
@@ -27079,7 +27077,7 @@
                                                                 (yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 256:
@@ -27089,7 +27087,7 @@
                                                                 (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 257:
@@ -27098,7 +27096,7 @@
             if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-4].spvar), (yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 258:
@@ -27107,7 +27105,7 @@
             if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-6].spvar), (yyvsp[-2].ident_sys), (yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 259:
@@ -27116,37 +27114,37 @@
             if (unlikely(Lex->sphead->spvar_fill_row(thd, (yyval.spvar)= (yyvsp[-2].spvar), (yyvsp[0].spvar_definition_list))))
               MYSQL_YYABORT;
           }
-#line 27120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 264:
 #line 3441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyvsp[0].spvar)->mode=(yyvsp[-1].spvar_mode); }
-#line 27126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 265:
 #line 3445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_IN; }
-#line 27132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 266:
 #line 3446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_IN; }
-#line 27138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 267:
 #line 3447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_OUT; }
-#line 27144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 268:
 #line 3448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
-#line 27150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 269:
@@ -27154,7 +27152,7 @@
     {
             Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
           }
-#line 27158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 270:
@@ -27162,7 +27160,7 @@
     {
             Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
           }
-#line 27166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 271:
@@ -27170,7 +27168,7 @@
     {
             Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
           }
-#line 27174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 272:
@@ -27178,19 +27176,19 @@
     {
             Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
           }
-#line 27182 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 273:
 #line 3476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 27188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 275:
 #line 3481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 27194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 277:
@@ -27198,7 +27196,7 @@
     {
             (yyval.spblock).init();
           }
-#line 27202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 278:
@@ -27211,13 +27209,13 @@
             if (unlikely(Lex->sp_declarations_join(&(yyval.spblock), (yyvsp[-2].spblock), (yyvsp[-1].spblock))))
               MYSQL_YYABORT;
           }
-#line 27215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 279:
 #line 3502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spblock)= (yyvsp[0].spblock); }
-#line 27221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 280:
@@ -27227,7 +27225,7 @@
                          Qualified_column_ident(&(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 27231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 281:
@@ -27237,7 +27235,7 @@
                            Qualified_column_ident(&(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 27241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 282:
@@ -27247,7 +27245,7 @@
                            Qualified_column_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 27251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 283:
@@ -27260,7 +27258,7 @@
               MYSQL_YYABORT;
             Lex->init_last_field((yyval.spvar_definition), &(yyvsp[0].ident_sys), thd->variables.collation_database);
           }
-#line 27264 "/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 285:
@@ -27270,7 +27268,7 @@
                 unlikely((yyval.spvar_definition_list)->push_back((yyvsp[0].spvar_definition), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 27274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 286:
@@ -27283,13 +27281,13 @@
             if (unlikely((yyval.spvar_definition_list)->push_back((yyvsp[0].spvar_definition), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 27287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 287:
 #line 3562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spvar_definition_list)= (yyvsp[-1].spvar_definition_list); }
-#line 27293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 288:
@@ -27297,7 +27295,7 @@
     {
             Lex->sp_variable_declarations_init(thd, (yyvsp[0].num));
           }
-#line 27301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 289:
@@ -27309,7 +27307,7 @@
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-2].num));
           }
-#line 27313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 290:
@@ -27319,7 +27317,7 @@
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-4].num));
           }
-#line 27323 "/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 291:
@@ -27329,7 +27327,7 @@
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-5].num));
           }
-#line 27333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 292:
@@ -27339,7 +27337,7 @@
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-3].num));
           }
-#line 27343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 294:
@@ -27350,7 +27348,7 @@
             (yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
             (yyval.spblock).conds= 1;
           }
-#line 27354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 296:
@@ -27358,7 +27356,7 @@
     {
             Lex->sp_block_init(thd);
           }
-#line 27362 "/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 297:
@@ -27372,7 +27370,7 @@
             (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).hndlrs= 0;
             (yyval.spblock).curs= 1;
           }
-#line 27376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 298:
@@ -27381,7 +27379,7 @@
             if (unlikely(Lex->sp_handler_declaration_init(thd, (yyvsp[-2].num))))
               MYSQL_YYABORT;
           }
-#line 27385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 299:
@@ -27392,7 +27390,7 @@
             (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).curs= 0;
             (yyval.spblock).hndlrs= 1;
           }
-#line 27396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 302:
@@ -27403,7 +27401,7 @@
                            sp_lex_cursor(thd, thd->lex))))
               MYSQL_YYABORT;
           }
-#line 27407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 303:
@@ -27412,7 +27410,7 @@
             DBUG_ASSERT(thd->free_list == NULL);
             Lex->sphead->reset_lex(thd, (yyvsp[0].sp_cursor_stmt));
           }
-#line 27416 "/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 304:
@@ -27424,43 +27422,43 @@
               MYSQL_YYABORT;
             (yyval.sp_cursor_stmt)= (yyvsp[-2].sp_cursor_stmt);
           }
-#line 27428 "/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 305:
 #line 3683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::EXIT; }
-#line 27434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 306:
 #line 3684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::CONTINUE; }
-#line 27440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 307:
 #line 3685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::EXIT; }
-#line 27446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 308:
 #line 3686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::CONTINUE; }
-#line 27452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 309:
 #line 3692 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 27458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 310:
 #line 3694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)+= 1; }
-#line 27464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 311:
@@ -27476,7 +27474,7 @@
             sp_instr_hpush_jump *i= (sp_instr_hpush_jump *)sp->last_instruction();
             i->add_condition((yyvsp[0].spcondvalue));
           }
-#line 27480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 312:
@@ -27488,7 +27486,7 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 27492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 314:
@@ -27509,19 +27507,19 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 27513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 315:
 #line 3745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 27519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 316:
 #line 3746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 27525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 317:
@@ -27529,7 +27527,7 @@
     {
             (yyval.spcondvalue)= (yyvsp[0].spcondvalue);
           }
-#line 27533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 318:
@@ -27539,7 +27537,7 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               my_yyabort_error((ER_SP_COND_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 27543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 319:
@@ -27549,7 +27547,7 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 27553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 320:
@@ -27559,7 +27557,7 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 27563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 321:
@@ -27569,7 +27567,7 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 27573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 322:
@@ -27579,7 +27577,7 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 27583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 323:
@@ -27588,7 +27586,7 @@
             if (unlikely(Lex->add_resignal_statement(thd, NULL)))
               MYSQL_YYABORT;
           }
-#line 27592 "/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 324:
@@ -27597,7 +27595,7 @@
             if (unlikely(Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue))))
               MYSQL_YYABORT;
           }
-#line 27601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 325:
@@ -27606,7 +27604,7 @@
             if (unlikely(Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue))))
               MYSQL_YYABORT;
           }
-#line 27610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 326:
@@ -27625,25 +27623,25 @@
               my_yyabort_error((ER_SIGNAL_BAD_CONDITION_TYPE, MYF(0)));
             (yyval.spcondvalue)= cond;
           }
-#line 27629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 327:
 #line 3825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
-#line 27635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 328:
 #line 3830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spcondvalue)= NULL; }
-#line 27641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 329:
 #line 3832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
-#line 27647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 330:
@@ -27651,7 +27649,7 @@
     {
             thd->m_parser_state->m_yacc.m_set_signal_info.clear();
           }
-#line 27655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 332:
@@ -27663,7 +27661,7 @@
             info->clear();
             info->m_item[index]= (yyvsp[0].item);
           }
-#line 27667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 333:
@@ -27677,13 +27675,13 @@
                                 Diag_condition_item_names[index].str));
             info->m_item[index]= (yyvsp[0].item);
           }
-#line 27681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27679 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 334:
 #line 3870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 27687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 335:
@@ -27705,85 +27703,85 @@
             }
             (yyval.item)= (yyvsp[0].item);
           }
-#line 27709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 336:
 #line 3890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 27715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 337:
 #line 3896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CLASS_ORIGIN; }
-#line 27721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 338:
 #line 3898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_SUBCLASS_ORIGIN; }
-#line 27727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 339:
 #line 3900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_CATALOG; }
-#line 27733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 340:
 #line 3902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_SCHEMA; }
-#line 27739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 341:
 #line 3904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_NAME; }
-#line 27745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 342:
 #line 3906 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CATALOG_NAME; }
-#line 27751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 343:
 #line 3908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_SCHEMA_NAME; }
-#line 27757 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 344:
 #line 3910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_TABLE_NAME; }
-#line 27763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 345:
 #line 3912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_COLUMN_NAME; }
-#line 27769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 346:
 #line 3914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CURSOR_NAME; }
-#line 27775 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 347:
 #line 3916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_MESSAGE_TEXT; }
-#line 27781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 348:
 #line 3918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_MYSQL_ERRNO; }
-#line 27787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 349:
@@ -27792,7 +27790,7 @@
             if (unlikely(Lex->add_resignal_statement(thd, (yyvsp[-1].spcondvalue))))
               MYSQL_YYABORT;
           }
-#line 27796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 350:
@@ -27808,19 +27806,19 @@
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 27812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 351:
 #line 3946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
-#line 27818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27816 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 352:
 #line 3948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
-#line 27824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 353:
@@ -27830,7 +27828,7 @@
             if (unlikely((yyval.diag_info) == NULL))
               MYSQL_YYABORT;
           }
-#line 27834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 354:
@@ -27840,7 +27838,7 @@
             if (unlikely((yyval.diag_info) == NULL))
               MYSQL_YYABORT;
           }
-#line 27844 "/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 355:
@@ -27851,7 +27849,7 @@
                 unlikely((yyval.stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 27855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 356:
@@ -27861,7 +27859,7 @@
               MYSQL_YYABORT;
             (yyval.stmt_info_list)= (yyvsp[-2].stmt_info_list);
           }
-#line 27865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 357:
@@ -27871,172 +27869,172 @@
             if (unlikely((yyval.stmt_info_item) == NULL))
               MYSQL_YYABORT;
           }
-#line 27875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 358:
-#line 3992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= thd->lex->create_item_for_sp_var(&(yyvsp[0].ident_cli), NULL))))
               MYSQL_YYABORT;
           }
-#line 27884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 359:
-#line 3997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 3998 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 27894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 360:
-#line 4006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
-#line 27900 "/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 361:
-#line 4008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
-#line 27906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 362:
-#line 4010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.stmt_info_item_name)= Statement_information_item::ROW_COUNT; }
-#line 27912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27910 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 363:
-#line 4019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 27918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 364:
-#line 4024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.cond_info_list)= new (thd->mem_root) List;
             if (unlikely((yyval.cond_info_list) == NULL) ||
                 unlikely((yyval.cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 27929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 365:
-#line 4031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-2].cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.cond_info_list)= (yyvsp[-2].cond_info_list);
           }
-#line 27939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 366:
-#line 4040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.cond_info_item)= new (thd->mem_root) Condition_information_item((yyvsp[0].cond_info_item_name), (yyvsp[-2].item));
             if (unlikely((yyval.cond_info_item) == NULL))
               MYSQL_YYABORT;
           }
-#line 27949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 367:
-#line 4048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CLASS_ORIGIN; }
-#line 27955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 368:
-#line 4050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::SUBCLASS_ORIGIN; }
-#line 27961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 369:
-#line 4052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_CATALOG; }
-#line 27967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 370:
-#line 4054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_SCHEMA; }
-#line 27973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 371:
-#line 4056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_NAME; }
-#line 27979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 372:
-#line 4058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CATALOG_NAME; }
-#line 27985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 373:
-#line 4060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::SCHEMA_NAME; }
-#line 27991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 374:
-#line 4062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::TABLE_NAME; }
-#line 27997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 27995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 375:
-#line 4064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::COLUMN_NAME; }
-#line 28003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 376:
-#line 4066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CURSOR_NAME; }
-#line 28009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 377:
-#line 4068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::MESSAGE_TEXT; }
-#line 28015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 378:
-#line 4070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::MYSQL_ERRNO; }
-#line 28021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28019 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 379:
-#line 4072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::RETURNED_SQLSTATE; }
-#line 28027 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 381:
-#line 4078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_ident_cli(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 28036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 382:
-#line 4086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* NOTE: field definition is filled in sp_decl section. */
 
@@ -28048,11 +28046,11 @@
             spc->add_variable(thd, &(yyvsp[0].ident_sys));
             (yyval.num)= 1;
           }
-#line 28052 "/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 383:
-#line 4098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* NOTE: field definition is filled in sp_decl section. */
 
@@ -28064,39 +28062,39 @@
             spc->add_variable(thd, &(yyvsp[0].ident_sys));
             (yyval.num)= (yyvsp[-2].num) + 1;
           }
-#line 28068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 384:
-#line 4112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item) = NULL; }
-#line 28074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 385:
-#line 4113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item); }
-#line 28080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 405:
-#line 4155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->maybe_start_compound_statement(thd)))
               MYSQL_YYABORT;
             Lex->sphead->new_cont_backpatch(NULL);
           }
-#line 28090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28088 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 406:
-#line 4161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sphead->do_cont_backpatch(); }
-#line 28096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 407:
-#line 4165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -28104,11 +28102,11 @@
             lex->sphead->reset_lex(thd);
             lex->sphead->m_tmp_query= lip->get_tok_start();
           }
-#line 28108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 408:
-#line 4173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -28150,17 +28148,17 @@
             if (unlikely(sp->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28154 "/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 411:
-#line 4224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 28160 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 412:
-#line 4226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28169,11 +28167,11 @@
                 unlikely(sp->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 413:
-#line 4235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28181,146 +28179,146 @@
                                                                lex->spcont)))
               MYSQL_YYABORT;
           }
-#line 28185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 414:
-#line 4245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 28191 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 415:
-#line 4245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 28197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 416:
-#line 4250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_exit_statement(thd, NULL)))
               MYSQL_YYABORT;
           }
-#line 28206 "/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 417:
-#line 4255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_exit_statement(thd, &(yyvsp[0].ident_sys), NULL)))
               MYSQL_YYABORT;
           }
-#line 28215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 418:
-#line 4260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_exit_statement(thd, (yyvsp[0].item))) ||
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 419:
-#line 4266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_exit_statement(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].item))) ||
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 420:
-#line 4275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_continue_statement(thd, NULL)))
               MYSQL_YYABORT;
           }
-#line 28244 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 421:
-#line 4280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_continue_statement(thd, &(yyvsp[0].ident_sys), NULL)))
               MYSQL_YYABORT;
           }
-#line 28253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 422:
-#line 4285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_continue_statement(thd, (yyvsp[0].item))) ||
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 423:
-#line 4291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_continue_statement(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].item))) ||
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 424:
-#line 4301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_leave_statement(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 28282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 425:
-#line 4309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_iterate_statement(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 28291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 426:
-#line 4317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_goto_statement(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 28300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28298 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 427:
-#line 4324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->sphead);
             if (unlikely(!((yyval.assignment_lex)= new (thd->mem_root)
                            sp_assignment_lex(thd, thd->lex))))
               MYSQL_YYABORT;
           }
-#line 28311 "/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 428:
-#line 4334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(thd->free_list == NULL);
             Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
           }
-#line 28320 "/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 429:
-#line 4339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT((yyvsp[-2].assignment_lex) == thd->lex);
             (yyval.assignment_lex)= (yyvsp[-2].assignment_lex);
@@ -28330,19 +28328,19 @@
             if (unlikely((yyval.assignment_lex)->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 430:
-#line 4352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
           }
-#line 28342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 431:
-#line 4356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT((yyvsp[-2].assignment_lex) == thd->lex);
             (yyval.assignment_lex)= (yyvsp[-2].assignment_lex);
@@ -28351,84 +28349,84 @@
             if (unlikely((yyval.assignment_lex)->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 432:
-#line 4368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.sp_assignment_lex_list)= new (thd->mem_root) List)))
               MYSQL_YYABORT;
             (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
           }
-#line 28365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 433:
-#line 4374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.sp_assignment_lex_list)= (yyvsp[-2].sp_assignment_lex_list);
             (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
           }
-#line 28374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 434:
-#line 4381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.sp_assignment_lex_list)= NULL; }
-#line 28380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 435:
-#line 4382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
-#line 28386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 436:
-#line 4387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_open_cursor(thd, &(yyvsp[-1].ident_sys), (yyvsp[0].sp_assignment_lex_list))))
               MYSQL_YYABORT;
           }
-#line 28395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 437:
-#line 4395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 28404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 438:
-#line 4400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 28413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 439:
-#line 4405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 28422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 440:
-#line 4412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 28428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 441:
-#line 4414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28440,11 +28438,11 @@
                 unlikely(sp->add_instr(i)))
               MYSQL_YYABORT;
          }
-#line 28444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 442:
-#line 4429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28459,11 +28457,11 @@
                 unlikely(sp->add_instr(i)))
               MYSQL_YYABORT;
           }
-#line 28463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 443:
-#line 4447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28477,11 +28475,11 @@
             sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
             i->add_to_varlist(spv);
           }
-#line 28481 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 444:
-#line 4461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28495,17 +28493,17 @@
             sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
             i->add_to_varlist(spv);
           }
-#line 28499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 445:
-#line 4477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 28505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 446:
-#line 4479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28521,11 +28519,11 @@
             if (unlikely(sp->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 447:
-#line 4495 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             sp_head *sp= Lex->sphead;
             sp_pcontext *ctx= Lex->spcont;
@@ -28537,21 +28535,21 @@
             sp->backpatch(ctx->pop_label());
             sp->push_backpatch(thd, i, ctx->push_label(thd, &empty_clex_str, 0));
           }
-#line 28541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 448:
-#line 4507 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
             lex->sphead->backpatch(lex->spcont->pop_label());
           }
-#line 28551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 452:
-#line 4522 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4524 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->maybe_start_compound_statement(thd)))
               MYSQL_YYABORT;
@@ -28601,11 +28599,11 @@
             */
             Lex->spcont->push_label(thd, &empty_clex_str, Lex->sphead->instructions());
           }
-#line 28605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 453:
-#line 4575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               BACKPATCH: Resolving forward jump from
@@ -28619,48 +28617,48 @@
 
             Lex->sphead->do_cont_backpatch();
           }
-#line 28623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 454:
-#line 4591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); /* For expr $2 */ }
-#line 28629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 455:
-#line 4593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->case_stmt_action_expr((yyvsp[0].item))))
               MYSQL_YYABORT;
             if (unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28638 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 456:
-#line 4600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 28646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 457:
-#line 4602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 28652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 462:
-#line 4617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4619 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sphead->reset_lex(thd); /* For expr $3 */
           }
-#line 28660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 463:
-#line 4621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Simple case:  =  */
 
@@ -28671,28 +28669,28 @@
             if (unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 464:
-#line 4633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->case_stmt_action_then()))
               MYSQL_YYABORT;
           }
-#line 28684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 465:
-#line 4641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sphead->reset_lex(thd); /* For expr $3 */
           }
-#line 28692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 466:
-#line 4645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->case_stmt_action_when((yyvsp[0].item), false)))
@@ -28701,20 +28699,20 @@
             if (unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 467:
-#line 4655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4657 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->case_stmt_action_then()))
               MYSQL_YYABORT;
           }
-#line 28714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28712 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 468:
-#line 4663 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -28725,142 +28723,142 @@
                 unlikely(sp->add_instr(i)))
               MYSQL_YYABORT;
           }
-#line 28729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 470:
-#line 4677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[-1].ident_sys); }
-#line 28735 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 471:
-#line 4681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 28741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 472:
-#line 4682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 28747 "/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 473:
-#line 4687 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->spcont->block_label_declare(&(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
             (yyval.lex_str)= (yyvsp[0].lex_str);
           }
-#line 28757 "/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 474:
-#line 4697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
           }
-#line 28765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 475:
-#line 4704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock), &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 476:
-#line 4712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sp_block_init(thd);
           }
-#line 28782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 477:
-#line 4718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
               MYSQL_YYABORT;
           }
-#line 28791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 478:
-#line 4726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->maybe_start_compound_statement(thd)))
               MYSQL_YYABORT;
             Lex->sp_block_init(thd);
           }
-#line 28801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 479:
-#line 4734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-2].spblock))))
               MYSQL_YYABORT;
           }
-#line 28810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 480:
-#line 4742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 28816 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 481:
-#line 4743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= -1; }
-#line 28822 "/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 482:
-#line 4748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_for_loop_declarations(thd, &(yyval.for_loop), &(yyvsp[-1].ident_sys), (yyvsp[0].for_loop_bounds))))
               MYSQL_YYABORT;
           }
-#line 28831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 483:
-#line 4757 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.for_loop_bounds)= Lex_for_loop_bounds_intrange((yyvsp[-3].num), (yyvsp[-2].assignment_lex), (yyvsp[0].assignment_lex));
           }
-#line 28839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 484:
-#line 4761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.for_loop_bounds).m_direction= (yyvsp[-1].num);
             (yyval.for_loop_bounds).m_index= (yyvsp[0].assignment_lex);
             (yyval.for_loop_bounds).m_target_bound= NULL;
             (yyval.for_loop_bounds).m_implicit_cursor= false;
           }
-#line 28850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 485:
-#line 4768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_for_loop_implicit_cursor_statement(thd, &(yyval.for_loop_bounds),
                                                                     (yyvsp[-1].sp_cursor_stmt))))
               MYSQL_YYABORT;
           }
-#line 28860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 486:
-#line 4777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4779 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             uint ip= lex->sphead->instructions();
@@ -28871,11 +28869,11 @@
                 unlikely(lex->sphead->add_instr(i)))
               MYSQL_YYABORT;
           }
-#line 28875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 487:
-#line 4791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sp_while_loop_expression(thd, (yyvsp[-1].item))))
@@ -28883,26 +28881,26 @@
             if (unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 488:
-#line 4799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_while_loop_finalize(thd)))
               MYSQL_YYABORT;
           }
-#line 28896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 489:
-#line 4807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 28902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28900 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 490:
-#line 4809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             uint ip= lex->sphead->instructions();
@@ -28917,161 +28915,161 @@
             /* We can shortcut the cont_backpatch here */
             i->m_cont_dest= ip+1;
           }
-#line 28921 "/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 491:
-#line 4827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 492:
-#line 4835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 493:
-#line 4840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 28945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 494:
-#line 4842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
               MYSQL_YYABORT;
             Lex->sphead->reset_lex(thd);
           }
-#line 28955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 495:
-#line 4848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 28961 "/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 496:
-#line 4850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             // See "The FOR LOOP statement" comments in sql_lex.cc
             Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
           }
-#line 28970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 497:
-#line 4855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-3].lex_str)))) // The inner WHILE block
               MYSQL_YYABORT;
             if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28981 "/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 498:
-#line 4864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-5].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 499:
-#line 4869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-7].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 28997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 500:
-#line 4874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
               MYSQL_YYABORT;
           }
-#line 29008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 501:
-#line 4879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 29014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 502:
-#line 4884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_empty_label(thd)))
               MYSQL_YYABORT;
           }
-#line 29023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 503:
-#line 4889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4891 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sp_pop_loop_empty_label(thd);
           }
-#line 29031 "/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 504:
-#line 4893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_empty_label(thd)))
               MYSQL_YYABORT;
             Lex->sphead->reset_lex(thd);
           }
-#line 29041 "/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 505:
-#line 4899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sp_pop_loop_empty_label(thd);
           }
-#line 29049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 506:
-#line 4903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             // See "The FOR LOOP statement" comments in sql_lex.cc
             if (unlikely(Lex->maybe_start_compound_statement(thd)))
               MYSQL_YYABORT;
             Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
           }
-#line 29060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 507:
-#line 4910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_empty_label(thd))) // The inner WHILE block
               MYSQL_YYABORT;
             if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
               MYSQL_YYABORT;
           }
-#line 29071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 508:
-#line 4919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-5].for_loop))))
               MYSQL_YYABORT;
@@ -29079,122 +29077,122 @@
             if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-5].for_loop))))
               MYSQL_YYABORT;
           }
-#line 29083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 509:
-#line 4927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_loop_empty_label(thd)))
               MYSQL_YYABORT;
           }
-#line 29092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 510:
-#line 4932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sp_pop_loop_empty_label(thd);
           }
-#line 29100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 511:
-#line 4939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
-#line 29106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 512:
-#line 4941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
-#line 29112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 513:
-#line 4946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.event= TRG_EVENT_INSERT; }
-#line 29118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 514:
-#line 4948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
-#line 29124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 515:
-#line 4950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.event= TRG_EVENT_DELETE; }
-#line 29130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 519:
-#line 4984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 520:
-#line 4986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->logfile_group_name= (yyvsp[0].ident_sys).str;
           }
-#line 29145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 521:
-#line 4996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 4998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             Lex->alter_tablespace_info->ts_alter_tablespace_type= ALTER_TABLESPACE_ADD_FILE; 
           }
-#line 29153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 522:
-#line 5002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             Lex->alter_tablespace_info->ts_alter_tablespace_type= ALTER_TABLESPACE_DROP_FILE; 
           }
-#line 29161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 527:
-#line 5025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 574:
-#line 5119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->data_file_name= (yyvsp[0].lex_str).str;
           }
-#line 29176 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 575:
-#line 5127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->undo_file_name= (yyvsp[0].lex_str).str;
           }
-#line 29185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 576:
-#line 5135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->redo_file_name= (yyvsp[0].lex_str).str;
           }
-#line 29194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 577:
-#line 5143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info= (new (thd->mem_root)
@@ -29204,11 +29202,11 @@
             lex->alter_tablespace_info->tablespace_name= (yyvsp[0].ident_sys).str;
             lex->sql_command= SQLCOM_ALTER_TABLESPACE;
           }
-#line 29208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 578:
-#line 5156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info= (new (thd->mem_root)
@@ -29218,114 +29216,114 @@
             lex->alter_tablespace_info->logfile_group_name= (yyvsp[0].ident_sys).str;
             lex->sql_command= SQLCOM_ALTER_TABLESPACE;
           }
-#line 29222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29220 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 579:
-#line 5169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_access_mode= TS_READ_ONLY;
           }
-#line 29231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 580:
-#line 5174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_access_mode= TS_READ_WRITE;
           }
-#line 29240 "/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 581:
-#line 5179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_access_mode= TS_NOT_ACCESSIBLE;
           }
-#line 29249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 582:
-#line 5187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->initial_size= (yyvsp[0].ulonglong_number);
           }
-#line 29258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 583:
-#line 5195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->autoextend_size= (yyvsp[0].ulonglong_number);
           }
-#line 29267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 584:
-#line 5203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->max_size= (yyvsp[0].ulonglong_number);
           }
-#line 29276 "/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 585:
-#line 5211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->extent_size= (yyvsp[0].ulonglong_number);
           }
-#line 29285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 586:
-#line 5219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->undo_buffer_size= (yyvsp[0].ulonglong_number);
           }
-#line 29294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 587:
-#line 5227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->redo_buffer_size= (yyvsp[0].ulonglong_number);
           }
-#line 29303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 588:
-#line 5235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->alter_tablespace_info->nodegroup_id != UNDEF_NODEGROUP))
               my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"NODEGROUP"));
             lex->alter_tablespace_info->nodegroup_id= (yyvsp[0].ulong_num);
           }
-#line 29314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 589:
-#line 5245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5247 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->alter_tablespace_info->ts_comment != NULL))
               my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"COMMENT"));
             lex->alter_tablespace_info->ts_comment= (yyvsp[0].lex_str).str;
           }
-#line 29325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 590:
-#line 5255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->alter_tablespace_info->storage_engine != NULL))
@@ -29333,88 +29331,88 @@
                                 "STORAGE ENGINE"));
             lex->alter_tablespace_info->storage_engine= (yyvsp[0].db_type);
           }
-#line 29337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 593:
-#line 5271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->wait_until_completed= TRUE;
           }
-#line 29346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 594:
-#line 5276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!(lex->alter_tablespace_info->wait_until_completed)))
               my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"NO_WAIT"));
             lex->alter_tablespace_info->wait_until_completed= FALSE;
           }
-#line 29357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 595:
-#line 5285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulonglong_number)= (yyvsp[0].ulonglong_number);}
-#line 29363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 596:
-#line 5287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if ((yyvsp[0].ident_sys).to_size_number(&(yyval.ulonglong_number)))
               MYSQL_YYABORT;
           }
-#line 29372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 597:
-#line 5299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->create_info.option_list= NULL; }
-#line 29378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 598:
-#line 5300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 599:
-#line 5301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 601:
-#line 5309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 29396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 602:
-#line 5309 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 603:
-#line 5311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 29408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 604:
-#line 5311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 605:
-#line 5313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 
             Lex->create_info.add(DDL_options_st::OPT_LIKE);
@@ -29425,70 +29423,70 @@
             /* CREATE TABLE ... LIKE is not allowed for views. */
             src_table->required_type= TABLE_TYPE_NORMAL;
           }
-#line 29429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 606:
-#line 5326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table)= (yyvsp[0].table); }
-#line 29435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 607:
-#line 5327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table)= (yyvsp[-1].table); }
-#line 29441 "/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 608:
-#line 5331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 610:
-#line 5338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             Select->set_braces(0);
             Select->set_with_clause((yyvsp[-4].with_clause));
           }
-#line 29456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 612:
-#line 5345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_with_clause((yyvsp[-4].with_clause));
           }
-#line 29464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 614:
-#line 5350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 29470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 615:
-#line 5350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 616:
-#line 5352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 29482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 617:
-#line 5352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29488 "/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 618:
-#line 5357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Remove all tables used in PARTITION clause from the global table
@@ -29498,17 +29496,17 @@
             last_non_sel_table->next_global= 0;
             Lex->query_tables_last= &last_non_sel_table->next_global;
           }
-#line 29502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 619:
-#line 5393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 621:
-#line 5399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info= new (thd->mem_root) partition_info();
@@ -29519,11 +29517,11 @@
               lex->alter_info.partition_flags|= ALTER_PARTITION_INFO;
             }
           }
-#line 29523 "/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 623:
-#line 5414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 #ifdef WITH_PARTITION_STORAGE_ENGINE
             LEX_CSTRING partition_name={STRING_WITH_LEN("partition")};
@@ -29535,11 +29533,11 @@
                               "--with-plugin-partition"));
 #endif
           }
-#line 29539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 624:
-#line 5429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Lex->part_info))
             {
@@ -29552,108 +29550,108 @@
               partition info string into part_info data structure.
             */
           }
-#line 29556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 625:
-#line 5441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 626:
-#line 5446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->safe_to_cache_query= 1; }
-#line 29568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 628:
-#line 5452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5454 "/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 29579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 629:
-#line 5459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= HASH_PARTITION; }
-#line 29585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 630:
-#line 5460 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 631:
-#line 5462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= RANGE_PARTITION; }
-#line 29597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 632:
-#line 5464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= RANGE_PARTITION; }
-#line 29603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 633:
-#line 5466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 	    Select->parsing_place= IN_PART_FUNC;
           }
-#line 29611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 634:
-#line 5470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
 	    Lex->part_info->part_type= LIST_PARTITION; 
 	    Select->parsing_place= NO_MATTER;
 	  }
-#line 29620 "/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 635:
-#line 5475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= LIST_PARTITION; }
-#line 29626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 636:
-#line 5477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              if (unlikely(Lex->part_info->vers_init_info(thd)))
                MYSQL_YYABORT;
           }
-#line 29635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 638:
-#line 5485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 639:
-#line 5487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->linear_hash_ind= TRUE;}
-#line 29647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 640:
-#line 5492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
-#line 29653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 641:
-#line 5494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             switch ((yyvsp[0].ulong_num)) {
             case 1:
@@ -29667,35 +29665,35 @@
               MYSQL_YYABORT;
             }
           }
-#line 29671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 642:
-#line 5510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 643:
-#line 5511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29683 "/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 644:
-#line 5515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 645:
-#line 5516 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 646:
-#line 5521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             part_info->num_columns++;
@@ -29706,21 +29704,21 @@
               my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
                                 "list of partition fields"));
           }
-#line 29710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 647:
-#line 5535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5537 "/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 29720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29718 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 648:
-#line 5545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (unlikely(part_info->set_part_expr(thd, (yyvsp[-1].item), FALSE)))
@@ -29728,26 +29726,26 @@
             part_info->num_columns= 1;
             part_info->column_list= FALSE;
           }
-#line 29732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29730 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 649:
-#line 5556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
               MYSQL_YYABORT;
           }
-#line 29741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 650:
-#line 5564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 651:
-#line 5566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5568 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             uint num_parts= (yyvsp[0].ulong_num);
             partition_info *part_info= Lex->part_info;
@@ -29757,57 +29755,57 @@
             part_info->num_parts= num_parts;
             part_info->use_default_num_partitions= FALSE;
           }
-#line 29761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 652:
-#line 5578 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 653:
-#line 5580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->subpart_type= HASH_PARTITION; }
-#line 29773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 654:
-#line 5581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 655:
-#line 5584 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5586 "/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 29789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 656:
-#line 5589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29795 "/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 657:
-#line 5593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 658:
-#line 5594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29805 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 659:
-#line 5599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (unlikely(part_info->subpart_field_list.push_back((yyvsp[0].ident_sys).str,
@@ -29818,11 +29816,11 @@
               my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
                                 "list of subpartition fields"));
           }
-#line 29822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 660:
-#line 5613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Lex->safe_to_cache_query))
             {
@@ -29831,17 +29829,17 @@
             }
             (yyval.item)=(yyvsp[0].item);
           }
-#line 29835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 661:
-#line 5624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 662:
-#line 5626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             uint num_parts= (yyvsp[0].ulong_num);
             LEX *lex= Lex;
@@ -29850,11 +29848,11 @@
             lex->part_info->num_subparts= num_parts;
             lex->part_info->use_default_num_subpartitions= FALSE;
           }
-#line 29854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 663:
-#line 5638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (unlikely(part_info->part_type == RANGE_PARTITION))
@@ -29864,11 +29862,11 @@
               my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
                                 "LIST"));
           }
-#line 29868 "/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 664:
-#line 5648 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5650 "/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;
@@ -29887,23 +29885,23 @@
             }
             part_info->count_curr_subparts= 0;
           }
-#line 29891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 665:
-#line 5669 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 666:
-#line 5670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 667:
-#line 5675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5677 "/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();
@@ -29919,17 +29917,17 @@
             part_info->use_default_partitions= FALSE;
             part_info->use_default_num_partitions= FALSE;
           }
-#line 29923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 668:
-#line 5694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 669:
-#line 5699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5701 "/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;
@@ -29937,11 +29935,11 @@
               MYSQL_YYABORT;
             p_elem->partition_name= (yyvsp[0].ident_sys).str;
           }
-#line 29941 "/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 670:
-#line 5710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -29957,11 +29955,11 @@
             else
               part_info->part_type= HASH_PARTITION;
           }
-#line 29961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 671:
-#line 5726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -29974,17 +29972,17 @@
             else
               part_info->part_type= RANGE_PARTITION;
           }
-#line 29978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 672:
-#line 5738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 29984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 673:
-#line 5740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -29997,35 +29995,35 @@
             else
               part_info->part_type= LIST_PARTITION;
           }
-#line 30001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 29999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 674:
-#line 5752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 675:
-#line 5754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Lex->part_values_current(thd))
               MYSQL_YYABORT;
           }
-#line 30016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 676:
-#line 5759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Lex->part_values_history(thd))
               MYSQL_YYABORT;
           }
-#line 30025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 677:
-#line 5764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -30042,11 +30040,11 @@
             if (unlikely(part_info->add_max_value(thd)))
               MYSQL_YYABORT;
          }
-#line 30046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 678:
-#line 5784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
 
@@ -30064,17 +30062,17 @@
             if (unlikely(part_info->add_max_value(thd)))
               MYSQL_YYABORT;
           }
-#line 30068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 679:
-#line 5801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 680:
-#line 5806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -30101,11 +30099,11 @@
                 MYSQL_YYABORT;
             }
           }
-#line 30105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 681:
-#line 5833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (unlikely(part_info->num_columns < 2U))
@@ -30114,23 +30112,23 @@
               MYSQL_YYABORT;
             }
           }
-#line 30118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 682:
-#line 5844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 683:
-#line 5845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 684:
-#line 5850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5852 "/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);
@@ -30140,17 +30138,17 @@
                            part_info->init_column_part(thd)))
               MYSQL_YYABORT;
           }
-#line 30144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 685:
-#line 5859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30150 "/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 686:
-#line 5861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5863 "/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);
@@ -30171,23 +30169,23 @@
             }
             part_info->curr_list_object= 0;
           }
-#line 30175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 687:
-#line 5884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 688:
-#line 5885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 689:
-#line 5890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (unlikely(part_info->part_type == LIST_PARTITION))
@@ -30198,11 +30196,11 @@
             if (unlikely(part_info->add_max_value(thd)))
               MYSQL_YYABORT;
           }
-#line 30202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 690:
-#line 5901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             partition_info *part_info= lex->part_info;
@@ -30216,11 +30214,11 @@
             if (unlikely(part_info->add_column_list_value(thd, part_expr)))
               MYSQL_YYABORT;
           }
-#line 30220 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 691:
-#line 5919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (unlikely(part_info->num_subparts != 0 &&
@@ -30234,11 +30232,11 @@
               MYSQL_YYABORT;
             }
           }
-#line 30238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 692:
-#line 5933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             if (part_info->num_subparts != 0)
@@ -30261,23 +30259,23 @@
             }
             part_info->count_curr_subparts= 0;
           }
-#line 30265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 693:
-#line 5958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 694:
-#line 5959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 695:
-#line 5964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5966 "/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;
@@ -30310,129 +30308,129 @@
             part_info->use_default_num_subpartitions= FALSE;
             part_info->count_curr_subparts++;
           }
-#line 30314 "/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 696:
-#line 5996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 5998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 697:
-#line 6001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(check_ident_length(&(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
             Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str;
           }
-#line 30330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 698:
-#line 6009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30336 "/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 699:
-#line 6010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 700:
-#line 6014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 701:
-#line 6015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30354 "/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 702:
-#line 6020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->tablespace_name= (yyvsp[0].lex_str).str; }
-#line 30360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 703:
-#line 6022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6024 "/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 30370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 704:
-#line 6028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6030 "/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 30380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 705:
-#line 6034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
-#line 30386 "/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 706:
-#line 6036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6038 "/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 30392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 707:
-#line 6038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6040 "/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 30398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 708:
-#line 6040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6042 "/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 30404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 709:
-#line 6042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6044 "/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 30410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 710:
-#line 6044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
-#line 30416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 711:
-#line 6048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 712:
-#line 6050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            partition_info *part_info= Lex->part_info;
            if (unlikely(part_info->vers_set_interval(thd, (yyvsp[-2].item), (yyvsp[-1].interval), (yyvsp[0].ulong_num))))
              MYSQL_YYABORT;
          }
-#line 30432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 713:
-#line 6056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
          partition_info *part_info= Lex->part_info;
          if (unlikely(part_info->vers_set_limit((yyvsp[0].ulonglong_number))))
@@ -30443,19 +30441,19 @@
            MYSQL_YYABORT;
          }
        }
-#line 30447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 714:
-#line 6071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            (yyval.ulong_num)= thd->query_start();
          }
-#line 30455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 715:
-#line 6075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            /* only allowed from mysql_unpack_partition() */
            if (unlikely(!Lex->part_info->table))
@@ -30465,19 +30463,19 @@
            }
            (yyval.ulong_num)= (ulong)(yyvsp[0].ulong_num);
          }
-#line 30469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 716:
-#line 6093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_with_clause((yyvsp[-4].with_clause));
           }
-#line 30477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 717:
-#line 6099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (lex->sql_command == SQLCOM_INSERT)
@@ -30492,19 +30490,19 @@
             mysql_init_select(lex);
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 30496 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 718:
-#line 6114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 30504 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 723:
-#line 6131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               The following work only with the local list, the global list
@@ -30512,107 +30510,107 @@
             */
             Lex->current_select->table_list.push_front(&Lex->save_list);
           }
-#line 30516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 724:
-#line 6141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 725:
-#line 6142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 726:
-#line 6146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 727:
-#line 6147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 728:
-#line 6151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 729:
-#line 6152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 730:
-#line 6156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 731:
-#line 6157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 30564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 732:
-#line 6162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->check_exists= FALSE;
           }
-#line 30572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 733:
-#line 6166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->check_exists= TRUE;
           }
-#line 30580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 734:
-#line 6173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.object_ddl_options).init();
           }
-#line 30588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 735:
-#line 6177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
           }
-#line 30596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 736:
-#line 6184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.object_ddl_options).init();
           }
-#line 30604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 737:
-#line 6188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
           }
-#line 30612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 745:
-#line 6211 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (!lex->m_sql_cmd)
@@ -30627,65 +30625,65 @@
             *opt= Storage_engine_name((yyvsp[0].lex_str));
             lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
           }
-#line 30631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 746:
-#line 6226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6228 "/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 30640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30638 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 747:
-#line 6231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6233 "/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 30649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 748:
-#line 6236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6238 "/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 30658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 749:
-#line 6241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6243 "/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 30667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 750:
-#line 6246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6248 "/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 30676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 751:
-#line 6251 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6253 "/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 30685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 752:
-#line 6256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             switch((yyvsp[0].ulong_num)) {
             case 0:
@@ -30700,21 +30698,21 @@
             }
             Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
           }
-#line 30704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 753:
-#line 6271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6273 "/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 30714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30712 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 754:
-#line 6277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             switch((yyvsp[0].ulong_num)) {
             case 0:
@@ -30729,20 +30727,20 @@
             }
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
           }
-#line 30733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 755:
-#line 6292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6294 "/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 30742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 756:
-#line 6297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             switch((yyvsp[0].ulong_num)) {
             case 0:
@@ -30757,21 +30755,21 @@
             }
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
           }
-#line 30761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 757:
-#line 6312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6314 "/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 30771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 758:
-#line 6318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6320 "/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 30793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 759:
-#line 6336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6338 "/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 30802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 760:
-#line 6341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6343 "/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 30811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 761:
-#line 6346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6348 "/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 30820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 762:
-#line 6351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6353 "/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 30829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 763:
-#line 6356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6358 "/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 30838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30836 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 764:
-#line 6361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6363 "/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 30847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 765:
-#line 6366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->select_lex.table_list.save_and_clear(&Lex->save_list);
           }
-#line 30855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 766:
-#line 6370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Move the union list to the merge_list and exclude its tables
@@ -30877,84 +30875,84 @@
 
             lex->create_info.used_fields|= HA_CREATE_USED_UNION;
           }
-#line 30881 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 769:
-#line 6394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6396 "/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 30890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 770:
-#line 6399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6401 "/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 30899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 771:
-#line 6404 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6406 "/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 30908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 772:
-#line 6409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {Lex->create_info.tablespace= (yyvsp[0].ident_sys).str;}
-#line 30914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 773:
-#line 6411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {Lex->create_info.storage_media= HA_SM_DISK;}
-#line 30920 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 774:
-#line 6413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {Lex->create_info.storage_media= HA_SM_MEMORY;}
-#line 30926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 775:
-#line 6415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6417 "/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 30936 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 776:
-#line 6421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6423 "/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 30945 "/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 777:
-#line 6426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6428 "/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 30954 "/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 778:
-#line 6431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -30963,11 +30961,11 @@
                                        &Lex->create_info.option_list,
                                        &Lex->option_list_last);
           }
-#line 30967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 779:
-#line 6440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -30976,40 +30974,40 @@
                                        &Lex->create_info.option_list,
                                        &Lex->option_list_last);
           }
-#line 30980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 780:
-#line 6449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->create_info.option_list,
                                        &Lex->option_list_last, thd->mem_root);
           }
-#line 30990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 781:
-#line 6455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), &Lex->create_info.option_list,
                                        &Lex->option_list_last);
           }
-#line 31000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 30998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 782:
-#line 6461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 	    Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
             Lex->create_info.sequence= ((yyvsp[0].choice) == HA_CHOICE_YES);
 	  }
-#line 31009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 786:
-#line 6475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
             {
@@ -31025,20 +31023,20 @@
               Lex->create_info.options|= HA_VERSIONED_TABLE;
             }
           }
-#line 31029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31027 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 787:
-#line 6494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))))
               MYSQL_YYABORT;
           }
-#line 31038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 788:
-#line 6502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             HA_CREATE_INFO *cinfo= &Lex->create_info;
             if (unlikely((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) &&
@@ -31050,22 +31048,22 @@
             Lex->create_info.default_table_charset= (yyvsp[0].charset);
             Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
           }
-#line 31054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 789:
-#line 6517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Storage_engine_name((yyvsp[0].lex_str)).
                  resolve_storage_engine_with_error(thd, &(yyval.db_type),
                                             thd->lex->create_info.tmp_table()))
               MYSQL_YYABORT;
           }
-#line 31065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 790:
-#line 6527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             plugin_ref plugin;
             if (likely((plugin= ha_resolve_by_name(thd, &(yyvsp[0].lex_str), false))))
@@ -31073,217 +31071,217 @@
             else
               my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str));
           }
-#line 31077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 791:
-#line 6537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_DEFAULT; }
-#line 31083 "/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 792:
-#line 6538 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_FIXED; }
-#line 31089 "/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 793:
-#line 6539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_DYNAMIC; }
-#line 31095 "/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 794:
-#line 6540 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_COMPRESSED; }
-#line 31101 "/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 795:
-#line 6541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_REDUNDANT; }
-#line 31107 "/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 796:
-#line 6542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6544 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_COMPACT; }
-#line 31113 "/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 797:
-#line 6543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_PAGE; }
-#line 31119 "/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 798:
-#line 6547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
-#line 31125 "/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 799:
-#line 6548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6550 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
-#line 31131 "/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 800:
-#line 6549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
-#line 31137 "/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 801:
-#line 6553 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) STRING_RESULT; }
-#line 31143 "/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 802:
-#line 6554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) REAL_RESULT; }
-#line 31149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 803:
-#line 6555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) DECIMAL_RESULT; }
-#line 31155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 804:
-#line 6556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) INT_RESULT; }
-#line 31161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31159 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 805:
-#line 6562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           Lex->create_last_non_select_table= Lex->last_table();
         }
-#line 31169 "/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 808:
-#line 6573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31175 "/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 812:
-#line 6581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.create_field)= (yyvsp[0].create_field); }
-#line 31181 "/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 813:
-#line 6583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.create_field)= (yyvsp[-1].create_field); }
-#line 31187 "/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 814:
-#line 6588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_list= NULL;
             if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 31197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 815:
-#line 6593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 816:
-#line 6595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_list= NULL;
             if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-2].ident_sys), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 31213 "/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 817:
-#line 6600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31219 "/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 818:
-#line 6602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_list= NULL;
             if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 31229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 819:
-#line 6607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 820:
-#line 6609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6611 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_list= NULL;
             if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 31245 "/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 821:
-#line 6614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31251 "/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 822:
-#line 6618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6620 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_list= NULL;
             if (unlikely(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 31261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 823:
-#line 6623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 824:
-#line 6626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_list= NULL;
             if (unlikely(Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].ident_sys).str ? &(yyvsp[-2].ident_sys) : &(yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 31277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 825:
-#line 6631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 826:
-#line 6633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_add_key((yyvsp[-1].object_ddl_options))) ||
                 unlikely(!(Lex->last_key= (new (thd->mem_root)
@@ -31293,11 +31291,11 @@
               MYSQL_YYABORT;
             Lex->option_list= NULL;
           }
-#line 31297 "/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 827:
-#line 6643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Key *key= (new (thd->mem_root)
@@ -31323,81 +31321,81 @@
             /* Only used for ALTER TABLE. Ignored otherwise. */
             lex->alter_info.flags|= ALTER_ADD_FOREIGN_KEY;
           }
-#line 31327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 828:
-#line 6672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            Lex->add_constraint(&(yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
          }
-#line 31335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 829:
-#line 6680 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Vers_parse_info &info= Lex->vers_get_info();
             info.set_system_time((yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys));
           }
-#line 31344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31342 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 830:
-#line 6687 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.virtual_column)= (Virtual_column_info*) 0; }
-#line 31350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 831:
-#line 6688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.virtual_column)= (yyvsp[0].virtual_column);}
-#line 31356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 832:
-#line 6693 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6695 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[-1].item));
             if (unlikely(!v))
               MYSQL_YYABORT;
             (yyval.virtual_column)= v;
           }
-#line 31367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 833:
-#line 6702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 834:
-#line 6703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31379 "/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 835:
-#line 6707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 31385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 836:
-#line 6708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 31391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 837:
-#line 6712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 31397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 838:
-#line 6717 "/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;
             Create_field *f= new (thd->mem_root) Create_field();
@@ -31412,11 +31410,11 @@
             lex->init_last_field(f, &(yyvsp[0].lex_str), NULL);
             (yyval.create_field)= f;
           }
-#line 31416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 839:
-#line 6732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             (yyval.create_field)= (yyvsp[-2].create_field);
@@ -31434,192 +31432,192 @@
             else if ((yyval.create_field)->flags & UNIQUE_KEY_FLAG)
               lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::UNIQUE, lex->check_exists);
           }
-#line 31438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 840:
-#line 6752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->set_attributes((yyvsp[0].Lex_field_type), Lex->charset); }
-#line 31444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 842:
-#line 6755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6757 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->set_handler(&type_handler_longlong);
             Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG
                                      | UNSIGNED_FLAG | UNIQUE_KEY_FLAG;
           }
-#line 31454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 844:
-#line 6764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 845:
-#line 6765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31466 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 846:
-#line 6769 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 848:
-#line 6774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31478 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 849:
-#line 6775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6777 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 850:
-#line 6779 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 852:
-#line 6784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 31496 "/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 856:
-#line 6789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
            Lex->last_field->flags&= ~NOT_NULL_FLAG; // undo automatic NOT NULL for timestamps
          }
-#line 31505 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 858:
-#line 6795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Lex->last_field_generated_always_as_row_start())
               MYSQL_YYABORT;
           }
-#line 31514 "/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 859:
-#line 6800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Lex->last_field_generated_always_as_row_end())
               MYSQL_YYABORT;
           }
-#line 31523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 860:
-#line 6807 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 861:
-#line 6808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 862:
-#line 6813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6815 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
           }
-#line 31543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 863:
-#line 6817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
           }
-#line 31551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 864:
-#line 6821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
           }
-#line 31559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 865:
-#line 6825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
           }
-#line 31567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 866:
-#line 6831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 867:
-#line 6832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 868:
-#line 6836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 31585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31583 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 870:
-#line 6842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6844 "/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_ADD_INDEX;
           }
-#line 31595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 871:
-#line 6848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6850 "/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_ADD_INDEX;
           }
-#line 31605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 872:
-#line 6853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->comment= (yyvsp[0].lex_str); }
-#line 31611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 873:
-#line 6855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->invisible= INVISIBLE_USER;
           }
-#line 31619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 874:
-#line 6862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               "PARSE_VCOL_EXPR" can only be used by the SQL server
@@ -31628,43 +31626,43 @@
             */
             MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
           }
-#line 31632 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 875:
-#line 6871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Virtual_column_info *v= add_virtual_expression(thd, (yyvsp[0].item));
             if (unlikely(!v))
               MYSQL_YYABORT;
             Lex->last_field->vcol_info= v;
           }
-#line 31643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 876:
-#line 6881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_singlerow_subselect(thd, (yyvsp[0].select_lex));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 31653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 878:
-#line 6888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyvsp[0].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
             (yyval.item)= new (thd->mem_root) Item_row(thd, *(yyvsp[0].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 31664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31662 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 879:
-#line 6898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Virtual_column_info *v=
               add_virtual_expression(thd, (yyvsp[-1].item));
@@ -31672,32 +31670,32 @@
               MYSQL_YYABORT;
             (yyval.virtual_column)= v;
           }
-#line 31676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 883:
-#line 6912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
               MYSQL_YYABORT;
           }
-#line 31685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 889:
-#line 6927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6929 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].const_simple_string)); }
-#line 31691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 890:
-#line 6928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
-#line 31697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 891:
-#line 6930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_float, (yyvsp[-1].Lex_length_and_dec));
             if ((yyvsp[-1].Lex_length_and_dec).length() && !(yyvsp[-1].Lex_length_and_dec).dec())
@@ -31713,133 +31711,133 @@
                 (yyval.Lex_field_type).set(&type_handler_float);
             }
           }
-#line 31717 "/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 892:
-#line 6946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].const_simple_string));
           }
-#line 31725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 893:
-#line 6950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_tiny, "1");
           }
-#line 31733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 894:
-#line 6954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_tiny, "1");
           }
-#line 31741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 895:
-#line 6958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
-#line 31747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 896:
-#line 6960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if ((yyvsp[-1].Lex_length_and_dec).length() != 0)
               (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));
             else
               (yyval.Lex_field_type).set(&type_handler_double);
           }
-#line 31758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 897:
-#line 6967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
-#line 31764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 898:
-#line 6969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
-#line 31770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 903:
-#line 6982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].const_simple_string));
           }
-#line 31778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31776 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 904:
-#line 6986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].const_simple_string));
             bincmp_collation(national_charset_info, (yyvsp[0].num));
           }
-#line 31787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 905:
-#line 6991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].const_simple_string));
           }
-#line 31796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 906:
-#line 6996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 6998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 907:
-#line 7000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 908:
-#line 7004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].const_simple_string));
             bincmp_collation(national_charset_info, (yyvsp[0].num));
           }
-#line 31821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 909:
-#line 7009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31828 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 910:
-#line 7014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset= &my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 911:
-#line 7022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if ((yyvsp[-1].const_simple_string))
             {
@@ -31857,28 +31855,28 @@
             }
             (yyval.Lex_field_type).set(&type_handler_year, (yyvsp[-1].const_simple_string));
           }
-#line 31861 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 912:
-#line 7039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(thd->type_handler_for_date()); }
-#line 31867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31865 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 913:
-#line 7041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
                    static_cast(&type_handler_time2) :
                    static_cast(&type_handler_time),
                    (yyvsp[0].const_simple_string));
           }
-#line 31878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 914:
-#line 7048 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (thd->variables.sql_mode & MODE_MAXDB)
               (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
@@ -31899,58 +31897,58 @@
                      (yyvsp[0].const_simple_string));
             }
           }
-#line 31903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 915:
-#line 7069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_field_type).set(opt_mysql56_temporal_format ?
                    static_cast(&type_handler_datetime2) :
                    static_cast(&type_handler_datetime),
                    (yyvsp[0].const_simple_string));
           }
-#line 31914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 916:
-#line 7080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_tiny_blob);
           }
-#line 31923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 917:
-#line 7085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string));
           }
-#line 31932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 918:
-#line 7090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string));
           }
-#line 31941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 919:
-#line 7095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_long_blob);
           }
-#line 31950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 920:
-#line 7100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_SPATIAL
             Lex->charset=&my_charset_bin;
@@ -31961,521 +31959,521 @@
                               sym_group_geom.needed_define));
 #endif
           }
-#line 31965 "/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 921:
-#line 7111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_medium_blob);
           }
-#line 31974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 922:
-#line 7116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_long_blob);
           }
-#line 31983 "/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 923:
-#line 7121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_medium_blob);
           }
-#line 31992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 924:
-#line 7126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_medium_blob); }
-#line 31998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 31996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 925:
-#line 7128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_tiny_blob); }
-#line 32004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 926:
-#line 7130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string)); }
-#line 32010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 927:
-#line 7132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_medium_blob); }
-#line 32016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 928:
-#line 7134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_long_blob); }
-#line 32022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32020 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 929:
-#line 7136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_long_blob); }
-#line 32028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 930:
-#line 7138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_medium_blob); }
-#line 32034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 931:
-#line 7140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset= &my_charset_utf8mb4_bin;
             (yyval.Lex_field_type).set(&type_handler_long_blob);
           }
-#line 32043 "/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 932:
-#line 7148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_enum); }
-#line 32049 "/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 933:
-#line 7150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_set); }
-#line 32055 "/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 934:
-#line 7154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_GEOMETRY; }
-#line 32061 "/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 935:
-#line 7155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_GEOMETRYCOLLECTION; }
-#line 32067 "/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 936:
-#line 7156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_POINT; }
-#line 32073 "/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 937:
-#line 7157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_MULTIPOINT; }
-#line 32079 "/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 938:
-#line 7158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_LINESTRING; }
-#line 32085 "/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 939:
-#line 7159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_MULTILINESTRING; }
-#line 32091 "/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 940:
-#line 7160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_POLYGON; }
-#line 32097 "/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 941:
-#line 7161 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_MULTIPOLYGON; }
-#line 32103 "/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 942:
-#line 7165 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32109 "/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 943:
-#line 7169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 944:
-#line 7170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 945:
-#line 7174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 946:
-#line 7175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32133 "/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 947:
-#line 7179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 948:
-#line 7180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32145 "/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 949:
-#line 7181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 950:
-#line 7182 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 951:
-#line 7183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 952:
-#line 7187 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_long; }
-#line 32169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 953:
-#line 7188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_tiny; }
-#line 32175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 954:
-#line 7189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_short; }
-#line 32181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 955:
-#line 7190 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7192 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_int24; }
-#line 32187 "/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 956:
-#line 7191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_longlong; }
-#line 32193 "/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 957:
-#line 7196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.type_handler)= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ?
               static_cast(&type_handler_float) :
               static_cast(&type_handler_double);
           }
-#line 32203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 958:
-#line 7201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_double; }
-#line 32209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 959:
-#line 7202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_double; }
-#line 32215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 960:
-#line 7207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->srid= 0; }
-#line 32221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 961:
-#line 7210 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
           }
-#line 32229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 962:
-#line 7216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set(0, 0);  }
-#line 32235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 963:
-#line 7217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), 0); }
-#line 32241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 964:
-#line 7218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
-#line 32247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 965:
-#line 7222 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
-#line 32253 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 966:
-#line 7226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 967:
-#line 7227 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 968:
-#line 7228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG;}
-#line 32271 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 969:
-#line 7229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
-#line 32277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 970:
-#line 7230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
-#line 32283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 971:
-#line 7231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
-#line 32289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 972:
-#line 7235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 32295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 973:
-#line 7236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 32301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 974:
-#line 7237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 32307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 975:
-#line 7238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 32313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 976:
-#line 7241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (char*) 0; /* use default length */ }
-#line 32319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32317 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 977:
-#line 7242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[0].const_simple_string); }
-#line 32325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32323 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 978:
-#line 7245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (char*) "1"; }
-#line 32331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 979:
-#line 7246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[0].const_simple_string); }
-#line 32337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 980:
-#line 7249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set(0, 0); }
-#line 32343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 981:
-#line 7250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
-#line 32349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 982:
-#line 7255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 984:
-#line 7260 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->flags&= ~ NOT_NULL_FLAG; }
-#line 32361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 985:
-#line 7261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7266 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->default_value= (yyvsp[0].virtual_column); }
-#line 32367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 986:
-#line 7263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7268 "/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 (unlikely(item == NULL))
               MYSQL_YYABORT;
             Lex->last_field->on_update= item;
           }
-#line 32378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 987:
-#line 7269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7274 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; }
-#line 32384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 988:
-#line 7271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
             lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 32394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 989:
-#line 7277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(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 32405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 991:
-#line 7287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= NULL; }
-#line 32411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 992:
-#line 7288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
-#line 32417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 993:
-#line 7292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 994:
-#line 7293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 32429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 995:
-#line 7298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7303 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
               MYSQL_YYABORT;
           }
-#line 32438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 996:
-#line 7306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
               MYSQL_YYABORT;
           }
-#line 32447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 997:
-#line 7314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->last_field->
                 set_compressed_deprecated_column_attribute(thd, (yyvsp[-1].kwd).pos(), (yyvsp[0].const_simple_string))))
               MYSQL_YYABORT;
           }
-#line 32457 "/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 998:
-#line 7323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->flags|= NOT_NULL_FLAG;
           }
-#line 32465 "/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 999:
-#line 7327 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7332 "/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_ADD_INDEX;
           }
-#line 32475 "/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 1002:
-#line 7338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -32484,11 +32482,11 @@
                                        &Lex->last_field->option_list,
                                        &Lex->option_list_last);
           }
-#line 32488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1003:
-#line 7347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -32497,31 +32495,31 @@
                                        &Lex->last_field->option_list,
                                        &Lex->option_list_last);
           }
-#line 32501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1004:
-#line 7356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->last_field->option_list,
                                        &Lex->option_list_last, thd->mem_root);
           }
-#line 32511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1005:
-#line 7362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), &Lex->last_field->option_list,
                                        &Lex->option_list_last);
           }
-#line 32521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1006:
-#line 7368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_field->versioning= (yyvsp[-1].vers_column_versioning);
             Lex->create_info.options|= HA_VERSIONED_TABLE;
@@ -32531,31 +32529,31 @@
                        Lex->create_last_non_select_table->table_name.str));
             }
           }
-#line 32535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1007:
-#line 7381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
             Lex->create_info.vers_info.versioned_fields= true;
             (yyval.vers_column_versioning)= Column_definition::WITH_VERSIONING;
           }
-#line 32545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1008:
-#line 7387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
             Lex->create_info.vers_info.unversioned_fields= true;
             (yyval.vers_column_versioning)= Column_definition::WITHOUT_VERSIONING;
           }
-#line 32555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32553 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1009:
-#line 7397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           (yyval.Lex_field_type)= (yyvsp[-1].Lex_field_type);
 
@@ -32566,205 +32564,205 @@
           }
           Lex->last_field->set_attributes((yyvsp[-1].Lex_field_type), Lex->charset);
         }
-#line 32570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1010:
-#line 7410 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1011:
-#line 7411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1012:
-#line 7416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((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 32591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1013:
-#line 7420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)= &my_charset_bin; }
-#line 32597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1014:
-#line 7424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset);   }
-#line 32603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1015:
-#line 7425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1016:
-#line 7429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7434 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)= NULL; }
-#line 32615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1017:
-#line 7430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7435 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)= (yyvsp[0].charset); }
-#line 32621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1018:
-#line 7435 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((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 32632 "/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 1019:
-#line 7441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)= &my_charset_bin; }
-#line 32638 "/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 1020:
-#line 7445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7450 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset);   }
-#line 32644 "/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 1021:
-#line 7446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32650 "/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 1022:
-#line 7451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.charset)= mysqld_collation_get_by_name((yyvsp[0].lex_str).str))))
               MYSQL_YYABORT;
           }
-#line 32659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1023:
-#line 7458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1024:
-#line 7459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset); }
-#line 32671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1025:
-#line 7463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset); }
-#line 32677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1026:
-#line 7464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1027:
-#line 7468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1028:
-#line 7469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1029:
-#line 7473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)= (yyvsp[0].charset); }
-#line 32701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32699 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1030:
-#line 7474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.charset)= &my_charset_latin1; }
-#line 32707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1031:
-#line 7476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))))
               my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2"));
           }
-#line 32716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1032:
-#line 7483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { bincmp_collation(NULL, false); }
-#line 32722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1033:
-#line 7484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 32728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1034:
-#line 7488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { bincmp_collation(&my_charset_bin, false); }
-#line 32734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1035:
-#line 7489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { bincmp_collation((yyvsp[-1].charset), (yyvsp[0].num)); }
-#line 32740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1036:
-#line 7490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7495 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { bincmp_collation(NULL, true); }
-#line 32746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32744 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1037:
-#line 7491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { bincmp_collation((yyvsp[0].charset), true); }
-#line 32752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32750 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1038:
-#line 7495 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= false; }
-#line 32758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1039:
-#line 7496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= true; }
-#line 32764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1040:
-#line 7501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           if (unlikely((yyvsp[0].ulong_num) == 0))
           {
@@ -32772,148 +32770,148 @@
             MYSQL_YYABORT;
           }
         }
-#line 32776 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1041:
-#line 7509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
-#line 32782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1042:
-#line 7513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 32788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1043:
-#line 7514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
-#line 32794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1044:
-#line 7518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
-#line 32800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1045:
-#line 7521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 32806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1046:
-#line 7522 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1047:
-#line 7523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
-#line 32818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32816 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1048:
-#line 7524 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
-#line 32824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1049:
-#line 7529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7534 "/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 32833 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1050:
-#line 7537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7542 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           (yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
         }
-#line 32841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1051:
-#line 7543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1052:
-#line 7544 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
-#line 32853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1053:
-#line 7549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7554 "/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 32864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1054:
-#line 7558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32870 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1055:
-#line 7559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1056:
-#line 7563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7568 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 32882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32880 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1057:
-#line 7564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1060:
-#line 7578 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.table)=(yyvsp[-3].table);
           }
-#line 32896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32894 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1061:
-#line 7585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ref_list.empty(); }
-#line 32902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32900 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1063:
-#line 7591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
             if (unlikely(key == NULL))
               MYSQL_YYABORT;
             Lex->ref_list.push_back(key, thd->mem_root);
           }
-#line 32913 "/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 1064:
-#line 7598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
             if (unlikely(key == NULL))
@@ -32922,181 +32920,181 @@
             lex->ref_list.empty();
             lex->ref_list.push_back(key, thd->mem_root);
           }
-#line 32926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1065:
-#line 7610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
-#line 32932 "/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 1066:
-#line 7612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
-#line 32938 "/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 1067:
-#line 7614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7619 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
-#line 32944 "/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 1068:
-#line 7616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
-#line 32950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1069:
-#line 7621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->fk_update_opt= FK_OPTION_UNDEF;
             lex->fk_delete_opt= FK_OPTION_UNDEF;
           }
-#line 32960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1070:
-#line 7627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7632 "/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= FK_OPTION_UNDEF;
           }
-#line 32970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1071:
-#line 7633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->fk_update_opt= FK_OPTION_UNDEF;
             lex->fk_delete_opt= (yyvsp[0].m_fk_option);
           }
-#line 32980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1072:
-#line 7640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7645 "/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 32990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1073:
-#line 7647 "/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->fk_update_opt= (yyvsp[0].m_fk_option);
             lex->fk_delete_opt= (yyvsp[-3].m_fk_option);
           }
-#line 33000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 32998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1074:
-#line 7655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
-#line 33006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1075:
-#line 7656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7661 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_CASCADE; }
-#line 33012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1076:
-#line 7657 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
-#line 33018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1077:
-#line 7658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7663 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
-#line 33024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1078:
-#line 7659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
-#line 33030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1079:
-#line 7663 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::PRIMARY; }
-#line 33036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1080:
-#line 7664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7669 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::UNIQUE; }
-#line 33042 "/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 1081:
-#line 7668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33048 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1082:
-#line 7669 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1083:
-#line 7673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1085:
-#line 7678 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33064 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1086:
-#line 7679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1087:
-#line 7680 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33078 "/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 1088:
-#line 7684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::MULTIPLE; }
-#line 33084 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1089:
-#line 7685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::UNIQUE; }
-#line 33090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33088 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1090:
-#line 7689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::FULLTEXT;}
-#line 33096 "/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 1091:
-#line 7694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_SPATIAL
             (yyval.key_type)= Key::SPATIAL;
@@ -33105,104 +33103,104 @@
                               sym_group_geom.needed_define));
 #endif
           }
-#line 33109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1092:
-#line 7705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1093:
-#line 7706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_key->option_list= Lex->option_list; }
-#line 33121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1094:
-#line 7710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1095:
-#line 7711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_key->option_list= Lex->option_list; }
-#line 33133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1096:
-#line 7715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1097:
-#line 7716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_key->option_list= Lex->option_list; }
-#line 33145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1104:
-#line 7735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
-#line 33151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1105:
-#line 7736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= (yyvsp[0].key_alg); }
-#line 33157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1106:
-#line 7740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
-#line 33163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1107:
-#line 7741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= (yyvsp[0].key_alg); }
-#line 33169 "/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 1108:
-#line 7742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= (yyvsp[0].key_alg); }
-#line 33175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1109:
-#line 7746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
-#line 33181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1110:
-#line 7748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
-#line 33187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1111:
-#line 7753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num);
             Lex->last_key->key_create_info.flags|= HA_USES_BLOCK_SIZE;
          }
-#line 33196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33194 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1112:
-#line 7758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
-#line 33202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1113:
-#line 7760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -33210,11 +33208,11 @@
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true, &Lex->option_list,
                                        &Lex->option_list_last);
           }
-#line 33214 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1114:
-#line 7768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -33222,86 +33220,86 @@
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false, &Lex->option_list,
                                        &Lex->option_list_last);
           }
-#line 33226 "/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 1115:
-#line 7776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                   engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->option_list,
                                       &Lex->option_list_last, thd->mem_root);
           }
-#line 33236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1116:
-#line 7782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), &Lex->option_list,
                                        &Lex->option_list_last);
           }
-#line 33246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33244 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1121:
-#line 7801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (likely(plugin_is_ready(&(yyvsp[0].ident_sys), MYSQL_FTPARSER_PLUGIN)))
               Lex->last_key->key_create_info.parser_name= (yyvsp[0].ident_sys);
             else
               my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 33257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1122:
-#line 7810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_BTREE; }
-#line 33263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33261 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1123:
-#line 7811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_RTREE; }
-#line 33269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1124:
-#line 7812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7819 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_HASH; }
-#line 33275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33273 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1125:
-#line 7817 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
           }
-#line 33283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1126:
-#line 7821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
           }
-#line 33291 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1127:
-#line 7828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
             if (unlikely((yyval.key_part) == NULL))
               MYSQL_YYABORT;
           }
-#line 33301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1128:
-#line 7834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             int key_part_len= atoi((yyvsp[-1].lex_str).str);
             if (unlikely(!key_part_len))
@@ -33310,35 +33308,35 @@
             if (unlikely((yyval.key_part) == NULL))
               MYSQL_YYABORT;
           }
-#line 33314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33312 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1129:
-#line 7845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 33320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1130:
-#line 7846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 33326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1131:
-#line 7851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
-#line 33332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1132:
-#line 7853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
-#line 33338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1133:
-#line 7861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->name= null_clex_str;
             Lex->table_type= TABLE_TYPE_UNKNOWN;
@@ -33352,11 +33350,11 @@
             Lex->create_info.storage_media= HA_SM_DEFAULT;
             DBUG_ASSERT(!Lex->m_sql_cmd);
           }
-#line 33356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1134:
-#line 7875 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Lex->select_lex.add_table_to_list(thd, (yyvsp[-1].table), NULL,
                                                             TL_OPTION_UPDATING,
@@ -33365,12 +33363,13 @@
               MYSQL_YYABORT;
             Lex->select_lex.db= (Lex->select_lex.table_list.first)->db;
             Lex->create_last_non_select_table= Lex->last_table();
+            Lex->mark_first_table_as_inserting();
           }
-#line 33370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1135:
-#line 7885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (likely(!Lex->m_sql_cmd))
             {
@@ -33380,20 +33379,20 @@
                 MYSQL_YYABORT;
             }
           }
-#line 33384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1136:
-#line 7895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->create_info.default_table_charset= NULL;
             Lex->create_info.used_fields= 0;
           }
-#line 33393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1137:
-#line 7900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_ALTER_DB;
@@ -33402,11 +33401,11 @@
                 unlikely(lex->copy_db_to(&lex->name)))
               MYSQL_YYABORT;
           }
-#line 33406 "/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 1138:
-#line 7909 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7918 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sphead))
@@ -33414,11 +33413,11 @@
             lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
             lex->name= (yyvsp[-4].ident_sys);
           }
-#line 33418 "/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 1139:
-#line 7917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7926 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -33426,22 +33425,22 @@
               my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE"));
             lex->sp_chistics.init();
           }
-#line 33430 "/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 1140:
-#line 7925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7934 "/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 33441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1141:
-#line 7932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -33449,52 +33448,52 @@
               my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "FUNCTION"));
             lex->sp_chistics.init();
           }
-#line 33453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1142:
-#line 7940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7949 "/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 33464 "/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 1143:
-#line 7947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_view(thd, (yyvsp[-4].num), (yyvsp[-2].view_suid), (yyvsp[0].table))))
               MYSQL_YYABORT;
           }
-#line 33473 "/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 1144:
-#line 7952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33479 "/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 1145:
-#line 7959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, (yyvsp[-2].view_suid), (yyvsp[0].table))))
               MYSQL_YYABORT;
           }
-#line 33488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1146:
-#line 7964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1147:
-#line 7966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* 
               It is safe to use Lex->spname because
@@ -33511,11 +33510,11 @@
             Lex->sql_command= SQLCOM_ALTER_EVENT;
             Lex->stmt_definition_begin= (yyvsp[-2].simple_string);
           }
-#line 33515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1148:
-#line 7987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 7996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))))
             {
@@ -33529,72 +33528,72 @@
             Lex->sql_command= SQLCOM_ALTER_EVENT;
             Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
           }
-#line 33533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1149:
-#line 8001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE;
           }
-#line 33542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33541 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1150:
-#line 8006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP;
           }
-#line 33551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1151:
-#line 8011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE;
           }
-#line 33560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1152:
-#line 8016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8025 "/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 33569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1153:
-#line 8021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8030 "/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 33579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1154:
-#line 8025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 33585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1155:
-#line 8029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->create_info.set((yyvsp[-5].object_ddl_options));
             Lex->sql_command= SQLCOM_ALTER_USER;
           }
-#line 33594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1156:
-#line 8034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->name= null_clex_str;
@@ -33604,11 +33603,11 @@
             lex->no_write_to_binlog= 0;
             DBUG_ASSERT(!lex->m_sql_cmd);
           }
-#line 33608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1157:
-#line 8044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!(lex->create_info.seq_create_info=
@@ -33619,52 +33618,52 @@
                                                             MDL_EXCLUSIVE)))
               MYSQL_YYABORT;
           }
-#line 33623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1158:
-#line 8055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Create a generic ALTER SEQUENCE statment. */
             Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence((yyvsp[-4].object_ddl_options));
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1159:
-#line 8064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;}
-#line 33640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1160:
-#line 8065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1161:
-#line 8066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1162:
-#line 8067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1163:
-#line 8071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;}
-#line 33664 "/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 1164:
-#line 8073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Use lex's spname to hold the new name.
@@ -33673,29 +33672,29 @@
             Lex->spname= (yyvsp[0].spname); 
             (yyval.num)= 1;
           }
-#line 33677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1165:
-#line 8084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;}
-#line 33683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1166:
-#line 8085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1167:
-#line 8089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ident_sys)= Lex_ident_sys(); }
-#line 33695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33694 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1170:
-#line 8096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->m_sql_cmd= new (thd->mem_root)
               Sql_cmd_discard_import_tablespace(
@@ -33703,11 +33702,11 @@
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33706 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1171:
-#line 8104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->m_sql_cmd= new (thd->mem_root)
               Sql_cmd_discard_import_tablespace(
@@ -33715,31 +33714,31 @@
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33718 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1177:
-#line 8126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8135 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_DROP;
             DBUG_ASSERT(!Lex->if_exists());
             Lex->create_info.add((yyvsp[-1].object_ddl_options));
           }
-#line 33729 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1178:
-#line 8133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_info.partition_flags|= ALTER_PARTITION_REBUILD;
             lex->no_write_to_binlog= (yyvsp[-1].num);
           }
-#line 33739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1179:
-#line 8140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[-1].num);
@@ -33750,11 +33749,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33754 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1181:
-#line 8153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8162 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[-1].num);
@@ -33765,11 +33764,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
                MYSQL_YYABORT;
           }
-#line 33769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1182:
-#line 8164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->check_opt.init();
@@ -33779,11 +33778,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33783 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1184:
-#line 8176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[-1].num);
@@ -33794,22 +33793,22 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33798 "/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 1186:
-#line 8188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_info.partition_flags|= ALTER_PARTITION_COALESCE;
             lex->no_write_to_binlog= (yyvsp[-1].num);
             lex->alter_info.num_parts= (yyvsp[0].ulong_num);
           }
-#line 33809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1187:
-#line 8195 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->check_opt.init();
@@ -33819,11 +33818,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1189:
-#line 8207 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->select_lex.db= (yyvsp[-1].table)->db;
@@ -33843,27 +33842,27 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1190:
-#line 8230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8239 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
           }
-#line 33855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1191:
-#line 8237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
           }
-#line 33863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1193:
-#line 8246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info= new (thd->mem_root) partition_info();
@@ -33875,34 +33874,34 @@
             lex->create_info.set((yyvsp[-1].object_ddl_options));
             lex->no_write_to_binlog= (yyvsp[0].num);
           }
-#line 33879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1194:
-#line 8258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1196:
-#line 8264 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info->num_parts= lex->part_info->partitions.elements;
           }
-#line 33894 "/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 1197:
-#line 8269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->part_info->num_parts= (yyvsp[0].ulong_num);
           }
-#line 33902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1198:
-#line 8276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info= new (thd->mem_root) partition_info();
@@ -33911,136 +33910,136 @@
 
             lex->no_write_to_binlog= (yyvsp[0].num);
           }
-#line 33915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1200:
-#line 8289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
           }
-#line 33923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1201:
-#line 8293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
           }
-#line 33931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1202:
-#line 8297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8306 "/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 33940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1203:
-#line 8304 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1204:
-#line 8305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 33952 "/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 1205:
-#line 8310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->alter_info.partition_names.push_back((yyvsp[0].ident_sys).str,
                                                                    thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 33962 "/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 1209:
-#line 8332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->create_last_non_select_table= lex->last_table();
             lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
             (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
           }
-#line 33973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1210:
-#line 8339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->create_last_non_select_table= Lex->last_table();
             Lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 33982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1211:
-#line 8344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_ADD_PERIOD;
           }
-#line 33990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 33989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1212:
-#line 8348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
             if (!lex->alter_info.key_list.is_empty())
               lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 34001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1213:
-#line 8355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
 	  }
-#line 34009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1214:
-#line 8359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
            Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
            Lex->add_constraint(&(yyvsp[-1].lex_str), (yyvsp[0].virtual_column), TRUE);
          }
-#line 34018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1215:
-#line 8365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_CHANGE_COLUMN | ALTER_RENAME_COLUMN;
             Lex->create_last_non_select_table= Lex->last_table();
             (yyvsp[-1].create_field)->change= (yyvsp[-2].lex_str);
             (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
           }
-#line 34029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1216:
-#line 8373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
             Lex->create_last_non_select_table= Lex->last_table();
             (yyvsp[-1].create_field)->change= (yyvsp[-1].create_field)->field_name;
             (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
           }
-#line 34040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1217:
-#line 8380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -34050,11 +34049,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_PARSER_DROP_COLUMN;
           }
-#line 34054 "/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 1218:
-#line 8390 "/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;
             Alter_drop *ad= (new (thd->mem_root)
@@ -34065,11 +34064,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
           }
-#line 34069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1219:
-#line 8401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8410 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -34079,11 +34078,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY;
           }
-#line 34083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1220:
-#line 8411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -34094,11 +34093,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_INDEX;
           }
-#line 34098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1221:
-#line 8422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -34108,50 +34107,50 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_INDEX;
           }
-#line 34112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1222:
-#line 8432 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8441 "/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_KEYS_ONOFF;
           }
-#line 34122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1223:
-#line 8438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8447 "/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_KEYS_ONOFF;
           }
-#line 34132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1224:
-#line 8444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_list((yyvsp[-3].lex_str).str, (yyvsp[0].virtual_column), (yyvsp[-4].num))))
               MYSQL_YYABORT;
           }
-#line 34141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1225:
-#line 8449 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_list((yyvsp[-2].lex_str).str, (Virtual_column_info*) 0,
                                              (yyvsp[-3].num))))
               MYSQL_YYABORT;
           }
-#line 34151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1226:
-#line 8455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->select_lex.db= (yyvsp[0].table)->db;
@@ -34165,11 +34164,11 @@
             lex->name= (yyvsp[0].table)->table;
             lex->alter_info.flags|= ALTER_RENAME;
           }
-#line 34169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1227:
-#line 8469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (!(yyvsp[-1].charset))
             {
@@ -34183,267 +34182,267 @@
               MYSQL_YYABORT;
             Lex->alter_info.flags|= ALTER_OPTIONS;
           }
-#line 34187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1228:
-#line 8483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_OPTIONS;
           }
-#line 34196 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34195 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1229:
-#line 8488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_RECREATE;
           }
-#line 34204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1230:
-#line 8492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_ORDER;
           }
-#line 34213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1233:
-#line 8499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
             Lex->create_info.options|= HA_VERSIONED_TABLE;
           }
-#line 34222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1234:
-#line 8504 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
             Lex->create_info.options&= ~HA_VERSIONED_TABLE;
           }
-#line 34231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1235:
-#line 8509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_DROP_PERIOD;
           }
-#line 34239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1241:
-#line 8523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.requested_algorithm=
               Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT;
           }
-#line 34248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1242:
-#line 8528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8538 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->alter_info.set_requested_algorithm(&(yyvsp[0].ident_sys))))
               my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 34257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1243:
-#line 8536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.requested_lock=
               Alter_info::ALTER_TABLE_LOCK_DEFAULT;
           }
-#line 34266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1244:
-#line 8541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->alter_info.set_requested_lock(&(yyvsp[0].ident_sys))))
               my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 34275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1245:
-#line 8548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1246:
-#line 8549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8559 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34286 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1247:
-#line 8553 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ignore= 0;}
-#line 34293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1248:
-#line 8554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ignore= 1;}
-#line 34299 "/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 1249:
-#line 8558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8568 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ignore= 0;}
-#line 34305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1255:
-#line 8572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ignore= 1;}
-#line 34311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1256:
-#line 8574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8584 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.requested_lock=
               Alter_info::ALTER_TABLE_LOCK_NONE;
           }
-#line 34320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1257:
-#line 8581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->drop_mode= DROP_DEFAULT; }
-#line 34326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1258:
-#line 8582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->drop_mode= DROP_RESTRICT; }
-#line 34332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1259:
-#line 8583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->drop_mode= DROP_CASCADE; }
-#line 34338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1260:
-#line 8587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 34344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1261:
-#line 8589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str)= (yyvsp[0].ident_sys);
             Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
           }
-#line 34353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1262:
-#line 8594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str).str=    first_keyword;
 	    (yyval.lex_str).length= 5; /* Length of "first" */
             Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
           }
-#line 34363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1263:
-#line 8602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1264:
-#line 8603 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1265:
-#line 8604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34381 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1266:
-#line 8605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34386 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1267:
-#line 8610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8621 "/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 34398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1268:
-#line 8617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1269:
-#line 8619 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_SLAVE_ALL_START;
             lex->type = 0;
             /* If you change this code don't forget to update STOP SLAVE too */
           }
-#line 34415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1270:
-#line 8625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1271:
-#line 8627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8638 "/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 34432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1272:
-#line 8634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8645 "/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 34443 "/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 1273:
-#line 8644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_BEGIN;
@@ -34456,103 +34455,103 @@
             }
             lex->start_transaction_opt= (yyvsp[0].num);
           }
-#line 34460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1274:
-#line 8660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= 0;
           }
-#line 34468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1275:
-#line 8664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (yyvsp[0].num);
           }
-#line 34476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1276:
-#line 8671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (yyvsp[0].num);
           }
-#line 34484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1277:
-#line 8675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
           }
-#line 34492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1278:
-#line 8682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8693 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
           }
-#line 34500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1279:
-#line 8686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
           }
-#line 34508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1280:
-#line 8690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8701 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
           }
-#line 34516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1281:
-#line 8696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->slave_thd_opt= 0; }
-#line 34522 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1282:
-#line 8698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34528 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1285:
-#line 8707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1286:
-#line 8708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->slave_thd_opt|=SLAVE_SQL; }
-#line 34540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1287:
-#line 8709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->slave_thd_opt|=SLAVE_IO; }
-#line 34546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1288:
-#line 8713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1289:
-#line 8715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(((lex->mi.log_file_name || lex->mi.pos) &&
@@ -34561,60 +34560,60 @@
                            (lex->mi.relay_log_name && lex->mi.relay_log_pos))))
                my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0)));
           }
-#line 34565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1290:
-#line 8724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
           }
-#line 34573 "/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 1293:
-#line 8736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_CHECKSUM;
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34584 "/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 1294:
-#line 8743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34590 "/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 1295:
-#line 8747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags= 0; }
-#line 34596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1296:
-#line 8748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags= T_QUICK; }
-#line 34602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1297:
-#line 8749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags= T_EXTEND; }
-#line 34608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1299:
-#line 8755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->table_type= TABLE_TYPE_VIEW; }
-#line 34614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1301:
-#line 8761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_REPAIR;
@@ -34624,11 +34623,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1302:
-#line 8771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -34636,65 +34635,65 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1303:
-#line 8781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags = T_MEDIUM; }
-#line 34646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1304:
-#line 8782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1305:
-#line 8786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1306:
-#line 8787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1307:
-#line 8791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_QUICK; }
-#line 34670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1308:
-#line 8792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_EXTEND; }
-#line 34676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1309:
-#line 8793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_USEFRM; }
-#line 34682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1310:
-#line 8797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 34688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1311:
-#line 8798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
-#line 34694 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1312:
-#line 8803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_ANALYZE;
@@ -34704,11 +34703,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1313:
-#line 8813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -34716,149 +34715,149 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1317:
-#line 8833 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1318:
-#line 8835 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             thd->lex->with_persistent_for_clause= TRUE;
           }
-#line 34734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1319:
-#line 8842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1320:
-#line 8844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1321:
-#line 8847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1322:
-#line 8849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             LEX* lex= thd->lex;
             lex->column_list= new (thd->mem_root) List;
             if (unlikely(lex->column_list == NULL))
               MYSQL_YYABORT;
           }
-#line 34763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1324:
-#line 8860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1325:
-#line 8862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             LEX* lex= thd->lex;
             lex->index_list= new (thd->mem_root) List;
             if (unlikely(lex->index_list == NULL))
               MYSQL_YYABORT;
           }
-#line 34780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1327:
-#line 8874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8886 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1328:
-#line 8876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->column_list->push_back((LEX_STRING*)
                 thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
           }
-#line 34795 "/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 1329:
-#line 8881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->column_list->push_back((LEX_STRING*)
                 thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
           }
-#line 34804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1330:
-#line 8889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1333:
-#line 8896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->index_list->push_back((LEX_STRING*)
                                        thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)),
                                        thd->mem_root);
           }
-#line 34820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1334:
-#line 8903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8915 "/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 34831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1335:
-#line 8913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
             Lex->comment= (yyvsp[0].lex_str);
             Lex->ident.str=    NULL;
             Lex->ident.length= 0;
           }
-#line 34842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1336:
-#line 8921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8933 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
             Lex->comment= (yyvsp[-3].lex_str);
             Lex->ident=   (yyvsp[0].lex_str);
           }
-#line 34852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1338:
-#line 8931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->table_type= TABLE_TYPE_VIEW; }
-#line 34858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1340:
-#line 8936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -34868,11 +34867,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1341:
-#line 8946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             if (unlikely(lex->sphead))
@@ -34882,83 +34881,83 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1342:
-#line 8958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags = T_MEDIUM; }
-#line 34892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1343:
-#line 8959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1344:
-#line 8963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1345:
-#line 8964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 34910 "/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 1346:
-#line 8968 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_QUICK; }
-#line 34916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34915 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1347:
-#line 8969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_FAST; }
-#line 34922 "/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 1348:
-#line 8970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_MEDIUM; }
-#line 34928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34927 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1349:
-#line 8971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_EXTEND; }
-#line 34934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34933 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1350:
-#line 8972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
-#line 34940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1351:
-#line 8973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
-#line 34946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34945 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1352:
-#line 8977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 34952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1353:
-#line 8978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
-#line 34958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34957 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1354:
-#line 8983 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 8995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_OPTIMIZE;
@@ -34968,11 +34967,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1355:
-#line 8993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -34980,71 +34979,71 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1356:
-#line 9003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 34990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1357:
-#line 9004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 34996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 34995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1358:
-#line 9005 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 35002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1359:
-#line 9010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_RENAME_TABLE;
           }
-#line 35010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1360:
-#line 9014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 35016 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1361:
-#line 9016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_RENAME_USER;
           }
-#line 35024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1362:
-#line 9023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(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 35034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1363:
-#line 9029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(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 35044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1366:
-#line 9043 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             SELECT_LEX *sl= lex->current_select;
@@ -35056,29 +35055,29 @@
                                                 TL_IGNORE, MDL_EXCLUSIVE)))
               MYSQL_YYABORT;
           }
-#line 35060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1367:
-#line 9058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.reset();
           }
-#line 35068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35067 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1368:
-#line 9062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9074 "/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 35078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1373:
-#line 9081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ,
                                                     MDL_SHARED_READ,
@@ -35086,11 +35085,11 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 35090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1374:
-#line 9092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ,
                                                     MDL_SHARED_READ,
@@ -35098,39 +35097,39 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 35102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1375:
-#line 9102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 35108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1376:
-#line 9103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str) = default_key_cache_base; }
-#line 35114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1377:
-#line 9108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_PRELOAD_KEYS;
             lex->alter_info.reset();
           }
-#line 35124 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1378:
-#line 9114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 35130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1383:
-#line 9129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ,
                                                     MDL_SHARED_READ,
@@ -35138,11 +35137,11 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 35142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1384:
-#line 9140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9152 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ,
                                                     MDL_SHARED_READ,
@@ -35150,73 +35149,73 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 35154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35153 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1385:
-#line 9151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
           }
-#line 35162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1387:
-#line 9158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9170 "/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 35172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35171 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1389:
-#line 9167 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 35178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1391:
-#line 9173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 35184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1392:
-#line 9174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
-#line 35190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1393:
-#line 9184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SELECT;
             lex->current_select->set_with_clause((yyvsp[-1].with_clause));
           }
-#line 35200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1408:
-#line 9212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(true);
           }
-#line 35208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1409:
-#line 9216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 35216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1410:
-#line 9220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               In order to correctly parse UNION's global ORDER BY we need to
@@ -35224,19 +35223,19 @@
             */
             Lex->current_select->set_braces(true);
           }
-#line 35228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1411:
-#line 9229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 35236 "/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 1415:
-#line 9242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               In order to correctly parse UNION's global ORDER BY we need to
@@ -35244,19 +35243,19 @@
             */
             Lex->current_select->set_braces(true);
           }
-#line 35248 "/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 1416:
-#line 9250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9262 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 35256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1420:
-#line 9263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               In order to correctly parse UNION's global ORDER BY we need to
@@ -35264,127 +35263,127 @@
             */
             Lex->current_select->set_braces(true);
           }
-#line 35268 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1421:
-#line 9271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 35276 "/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 1423:
-#line 9279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(true);
           }
-#line 35284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1424:
-#line 9283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9295 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
-#line 35293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1425:
-#line 9288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(true);
           }
-#line 35301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1426:
-#line 9296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
-#line 35310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1427:
-#line 9300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 35316 "/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 1428:
-#line 9306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 35325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1430:
-#line 9313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 35334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1431:
-#line 9323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 35343 "/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 1433:
-#line 9330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 35352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1434:
-#line 9339 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 35360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1435:
-#line 9343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 35368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1437:
-#line 9348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 35376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35375 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1438:
-#line 9352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 35384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1454:
-#line 9392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9404 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -35392,63 +35391,63 @@
               mysql_init_select(lex);
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 35396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1455:
-#line 9400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 35404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1460:
-#line 9428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9440 "/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 35414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1463:
-#line 9443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9455 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((Select->options & SELECT_DISTINCT) &&
                          (Select->options & SELECT_ALL)))
               my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT"));
           }
-#line 35424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1464:
-#line 9452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.vers_range_unit)= VERS_UNDEFINED;
           }
-#line 35432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1465:
-#line 9456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.vers_range_unit)= VERS_TRX_ID;
           }
-#line 35440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1466:
-#line 9460 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.vers_range_unit)= VERS_TIMESTAMP;
           }
-#line 35448 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1467:
-#line 9467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item *item;
             if (!(item= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length, YYCSCL,
@@ -35456,75 +35455,75 @@
               MYSQL_YYABORT;
             (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, item);
           }
-#line 35460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1468:
-#line 9475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
           }
-#line 35468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1469:
-#line 9479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
           }
-#line 35476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35475 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1470:
-#line 9486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= false;
           }
-#line 35484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1471:
-#line 9490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= true;
           }
-#line 35492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1472:
-#line 9497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
           }
-#line 35500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1473:
-#line 9501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_ALL);
           }
-#line 35508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1474:
-#line 9505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_FROM_TO, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
           }
-#line 35516 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1475:
-#line 9509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9521 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_BETWEEN, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
           }
-#line 35524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1479:
-#line 9522 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* 
               Allow this flag only on the first top-level SELECT statement, if
@@ -35541,11 +35540,11 @@
             Lex->select_lex.options&= ~OPTION_TO_QUERY_CACHE;
             Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE;
           }
-#line 35545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1480:
-#line 9539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* 
               Allow this flag only on the first top-level SELECT statement, if
@@ -35562,22 +35561,22 @@
             Lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
             Lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE;
           }
-#line 35566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1482:
-#line 9560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9572 "/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, false);
             lex->safe_to_cache_query=0;
           }
-#line 35577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1483:
-#line 9567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
@@ -35585,11 +35584,11 @@
               set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
             lex->safe_to_cache_query=0;
           }
-#line 35589 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35588 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1486:
-#line 9580 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root)
                           Item_field(thd, &thd->lex->current_select->context,
@@ -35600,20 +35599,20 @@
               MYSQL_YYABORT;
             (thd->lex->current_select->with_wild)++;
           }
-#line 35604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1487:
-#line 9594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
               MYSQL_YYABORT;
           }
-#line 35613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1488:
-#line 9599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9611 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string));
 
@@ -35632,121 +35631,121 @@
               (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
             }
           }
-#line 35636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1489:
-#line 9620 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_tok_start();
           }
-#line 35644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1490:
-#line 9626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_tok_end();
           }
-#line 35652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35651 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1491:
-#line 9632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
           }
-#line 35660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1492:
-#line 9638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
           }
-#line 35668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35667 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1493:
-#line 9644 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=null_clex_str;}
-#line 35674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1494:
-#line 9645 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9657 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys); }
-#line 35680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35679 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1495:
-#line 9646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 35686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1496:
-#line 9647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys); }
-#line 35692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1497:
-#line 9648 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 35698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1498:
-#line 9652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= NOT_FIXED_DEC;  }
-#line 35704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1499:
-#line 9653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= NOT_FIXED_DEC;  }
-#line 35710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1500:
-#line 9654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].ulong_num); }
-#line 35716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1501:
-#line 9658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;  }
-#line 35722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1502:
-#line 9659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;  }
-#line 35728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1503:
-#line 9660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].ulong_num); }
-#line 35734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1504:
-#line 9664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 35740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1505:
-#line 9665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 35746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35745 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1506:
-#line 9671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Design notes:
@@ -35797,22 +35796,22 @@
                 MYSQL_YYABORT;
             }
           }
-#line 35801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1507:
-#line 9722 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9734 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1508:
-#line 9729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* See comments in rule expr: expr or expr */
             Item_cond_and *item1;
@@ -35855,141 +35854,141 @@
                 MYSQL_YYABORT;
             }
           }
-#line 35859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1509:
-#line 9772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= negate_expression(thd, (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1510:
-#line 9778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1511:
-#line 9784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1512:
-#line 9790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1513:
-#line 9796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35909 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1514:
-#line 9802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1515:
-#line 9808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1517:
-#line 9818 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1518:
-#line 9824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1519:
-#line 9830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9842 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1520:
-#line 9836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9848 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1521:
-#line 9842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9854 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1523:
-#line 9852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9864 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 35988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1524:
-#line 9858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9870 "/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 (unlikely(item == NULL))
@@ -35998,21 +35997,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36001 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1525:
-#line 9867 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9879 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36011 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1526:
-#line 9873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9885 "/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);
@@ -36020,21 +36019,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1527:
-#line 9881 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9893 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1528:
-#line 9887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9899 "/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);
@@ -36043,21 +36042,21 @@
               MYSQL_YYABORT;
             (yyval.item)= item->neg_transformer(thd);
           }
-#line 36047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1529:
-#line 9896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9908 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1530:
-#line 9902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9914 "/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));
@@ -36065,11 +36064,11 @@
               MYSQL_YYABORT;
             (yyval.item)= item->neg_transformer(thd);
           }
-#line 36069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1531:
-#line 9910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9922 "/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));
@@ -36079,22 +36078,22 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1532:
-#line 9920 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9932 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1533:
-#line 9927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9939 "/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);
@@ -36102,21 +36101,21 @@
               MYSQL_YYABORT;
             (yyval.item)= item->neg_transformer(thd);
           }
-#line 36106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1534:
-#line 9935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9947 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1535:
-#line 9941 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9953 "/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 (unlikely(item == NULL))
@@ -36125,350 +36124,350 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1537:
-#line 9954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9966 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1538:
-#line 9960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9972 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1539:
-#line 9966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9978 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36159 "/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 1540:
-#line 9972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9984 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1541:
-#line 9978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_concat_operator_oracle(thd,
                                                                      (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1542:
-#line 9985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 9997 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1543:
-#line 9991 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10003 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36199 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1544:
-#line 9997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10009 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36210 "/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 1545:
-#line 10003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10015 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36220 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36219 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1546:
-#line 10010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10022 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1547:
-#line 10016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10028 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1548:
-#line 10022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10034 "/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), 1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36250 "/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 1549:
-#line 10028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10040 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1550:
-#line 10034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10046 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1551:
-#line 10040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10052 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36280 "/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 1552:
-#line 10046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10058 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1553:
-#line 10052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10064 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1554:
-#line 10058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10070 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36310 "/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 1564:
-#line 10087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_eq_creator; }
-#line 36316 "/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 1565:
-#line 10088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_ge_creator; }
-#line 36322 "/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 1566:
-#line 10089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_gt_creator; }
-#line 36328 "/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 1567:
-#line 10090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_le_creator; }
-#line 36334 "/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 1568:
-#line 10091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_lt_creator; }
-#line 36340 "/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 1569:
-#line 10092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_ne_creator; }
-#line 36346 "/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 1570:
-#line 10096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 36352 "/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 1571:
-#line 10097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 36358 "/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 1572:
-#line 10102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
             Lex->charset= NULL;
 	  }
-#line 36367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1573:
-#line 10106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
-#line 36373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1574:
-#line 10110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); Lex->charset= NULL; }
-#line 36379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1575:
-#line 10111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); Lex->charset= NULL; }
-#line 36385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1576:
-#line 10112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
-#line 36391 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1577:
-#line 10116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
-#line 36397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1578:
-#line 10117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10129 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_UINT);  }
-#line 36403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1579:
-#line 10118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE);  }
-#line 36409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1580:
-#line 10119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
-#line 36415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1581:
-#line 10120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
-#line 36421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1582:
-#line 10121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
-#line 36427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36426 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1583:
-#line 10125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10137 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
-#line 36433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1584:
-#line 10126 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_TIME, 0, (yyvsp[0].const_simple_string)); }
-#line 36439 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1585:
-#line 10127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10139 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, 0, (yyvsp[0].const_simple_string)); }
-#line 36445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36444 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1586:
-#line 10132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10144 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 36451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1587:
-#line 10134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_dyncol_type).set(DYN_COL_STRING);
           }
-#line 36459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1588:
-#line 10138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_dyncol_type).set(DYN_COL_STRING);
             Lex->charset= national_charset_info;
           }
-#line 36468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1589:
-#line 10146 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
      LEX *lex= Lex;
      (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
@@ -36488,148 +36487,148 @@
      else
        (yyval.dyncol_def)->len= 0;
    }
-#line 36492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1590:
-#line 10168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
          (yyval.dyncol_def_list)= new (thd->mem_root) List;
          if (unlikely((yyval.dyncol_def_list) == NULL))
            MYSQL_YYABORT;
          (yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
        }
-#line 36503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1591:
-#line 10175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10188 "/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 36512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1592:
-#line 10183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
-#line 36518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1593:
-#line 10184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
-#line 36524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1594:
-#line 10185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
-#line 36530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36529 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1595:
-#line 10186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
-#line 36536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1596:
-#line 10191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_plsql_cursor_attr(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].plsql_cursor_attr)))))
               MYSQL_YYABORT;
           }
-#line 36545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1597:
-#line 10199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item));         }
-#line 36551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1598:
-#line 10200 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item));  }
-#line 36557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1599:
-#line 10201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
-#line 36563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1600:
-#line 10202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10215 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item));     }
-#line 36569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1601:
-#line 10203 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item));      }
-#line 36575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1602:
-#line 10204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item));     }
-#line 36581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1603:
-#line 10205 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item));         }
-#line 36587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1604:
-#line 10206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10219 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item));     }
-#line 36593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1611:
-#line 10244 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item_param); }
-#line 36599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1616:
-#line 10250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10263 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36610 "/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 1617:
-#line 10257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10270 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36620 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1618:
-#line 10263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].item)->make_odbc_literal(thd, &(yyvsp[-2].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 36629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1619:
-#line 10268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10281 "/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),
@@ -36639,58 +36638,58 @@
             Select->add_ftfunc_to_list(thd, i1);
             (yyval.item)= i1;
           }
-#line 36643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36642 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1620:
-#line 10278 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item(thd, (yyvsp[-3].item), Lex->charset))))
               MYSQL_YYABORT;
           }
-#line 36652 "/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 1621:
-#line 10283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= new(thd->mem_root) Item_func_case_searched(thd, *(yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 36661 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1622:
-#line 10288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyvsp[-1].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
             if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_case_simple(thd, *(yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 36671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1623:
-#line 10294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item(thd, (yyvsp[-3].item), Lex->charset))))
               MYSQL_YYABORT;
           }
-#line 36680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36679 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1624:
-#line 10299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10312 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1625:
-#line 10305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item_splocal *il= (yyvsp[-1].item)->get_item_splocal();
             if (unlikely(il))
@@ -36701,199 +36700,199 @@
               MYSQL_YYABORT;
             Lex->default_used= TRUE;
           }
-#line 36705 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1626:
-#line 10316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10329 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1627:
-#line 10323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
               MYSQL_YYABORT;
           }
-#line 36725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36724 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1628:
-#line 10328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
               MYSQL_YYABORT;
           }
-#line 36734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1629:
-#line 10333 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
               MYSQL_YYABORT;
           }
-#line 36743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1630:
-#line 10338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
               MYSQL_YYABORT;
           }
-#line 36752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1631:
-#line 10343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-3].table), (yyvsp[-1].longlong_number), 0, 1))))
               MYSQL_YYABORT;
           }
-#line 36761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36760 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1632:
-#line 10348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-5].table), (yyvsp[-3].longlong_number), 0, (yyvsp[-1].ulong_num)))))
               MYSQL_YYABORT;
           }
-#line 36770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1633:
-#line 10353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-7].table), (yyvsp[-5].longlong_number), (yyvsp[-1].ulonglong_number), (yyvsp[-3].ulong_num)))))
               MYSQL_YYABORT;
           }
-#line 36779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1636:
-#line 10362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10375 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[-1].item); }
-#line 36785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1638:
-#line 10368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_set_collation(thd, (yyvsp[-2].item), (yyvsp[0].charset)))))
               MYSQL_YYABORT;
           }
-#line 36794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1640:
-#line 10377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Type_cast_attributes at(&my_charset_bin);
             if (unlikely(!((yyval.item)= type_handler_long_blob.create_typecast_item(thd, (yyvsp[0].item), at))))
               MYSQL_YYABORT;
           }
-#line 36804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1641:
-#line 10383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item);
           }
-#line 36812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1642:
-#line 10387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item)->neg(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1643:
-#line 10393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10406 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36832 "/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 1644:
-#line 10399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= negate_expression(thd, (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1646:
-#line 10409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10422 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1647:
-#line 10418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10431 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1648:
-#line 10425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10438 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1649:
-#line 10439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10452 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1650:
-#line 10445 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10458 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1651:
-#line 10451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_current_user(thd,
                                       Lex->current_context());
@@ -36902,11 +36901,11 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 36906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1652:
-#line 10460 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_current_role(thd,
                                       Lex->current_context());
@@ -36915,51 +36914,51 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 36919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1653:
-#line 10469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1654:
-#line 10475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1655:
-#line 10481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36948 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1656:
-#line 10487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10500 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1657:
-#line 10493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             List *list= new (thd->mem_root) List;
             if (unlikely(list == NULL))
@@ -36974,11 +36973,11 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1658:
-#line 10508 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10521 "/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);
@@ -36989,61 +36988,61 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 36992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1659:
-#line 10519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10532 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1660:
-#line 10525 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10538 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1661:
-#line 10531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10544 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1662:
-#line 10537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10550 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1663:
-#line 10543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1664:
-#line 10549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_oracle_sql_rowcount(thd);
             if (unlikely((yyval.item) == NULL))
@@ -37051,39 +37050,39 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 37055 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1665:
-#line 10557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10570 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37066 "/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 1666:
-#line 10564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item);
           }
-#line 37074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37073 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1667:
-#line 10568 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim(thd))))
               MYSQL_YYABORT;
           }
-#line 37083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1668:
-#line 10573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_user(thd);
             if (unlikely((yyval.item) == NULL))
@@ -37091,222 +37090,222 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query=0;
           }
-#line 37095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1669:
-#line 10581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1670:
-#line 10602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10615 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1671:
-#line 10609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10622 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37126 "/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 1672:
-#line 10615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1673:
-#line 10622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10635 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1674:
-#line 10629 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10642 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1675:
-#line 10635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10648 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37168 "/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 1676:
-#line 10641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_date_format(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1677:
-#line 10647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_date_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1678:
-#line 10653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_decode(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37198 "/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 1679:
-#line 10659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
             if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_decode_oracle(thd, *(yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 37208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1680:
-#line 10665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10678 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1681:
-#line 10671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10684 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37228 "/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 1682:
-#line 10677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10690 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1683:
-#line 10684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10697 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37249 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1684:
-#line 10690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10703 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37259 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1685:
-#line 10697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10710 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37270 "/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 1686:
-#line 10703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 37279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1687:
-#line 10708 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 37288 "/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 1688:
-#line 10713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 37297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1689:
-#line 10718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 37306 "/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 1690:
-#line 10723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Unlike other time-related functions, SYSDATE() is
@@ -37324,113 +37323,113 @@
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1691:
-#line 10741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10754 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1692:
-#line 10747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10760 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37348 "/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 1693:
-#line 10753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
               MYSQL_YYABORT;
           }
-#line 37357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1694:
-#line 10758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1695:
-#line 10765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10778 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1696:
-#line 10772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10785 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37390 "/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 1697:
-#line 10780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10793 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1698:
-#line 10787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10800 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1699:
-#line 10794 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10807 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37420 "/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 1700:
-#line 10801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1701:
-#line 10808 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10821 "/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].Lex_cast_type).type_handler(),
@@ -37439,92 +37438,92 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1702:
-#line 10825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1703:
-#line 10831 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37462 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1704:
-#line 10837 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10850 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1705:
-#line 10843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_collation(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1706:
-#line 10849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_database(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 37494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1707:
-#line 10856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10869 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37504 "/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 1708:
-#line 10862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10875 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1709:
-#line 10868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10881 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37523 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1710:
-#line 10877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             List *list= new (thd->mem_root) List;
             if (unlikely(list == NULL))
@@ -37535,53 +37534,53 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1711:
-#line 10888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyvsp[-3].item_list)->push_back((yyvsp[-1].item), thd->mem_root);
             (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-3].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1712:
-#line 10895 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_microsecond(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1713:
-#line 10901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10914 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37570 "/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 1714:
-#line 10907 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10920 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1715:
-#line 10914 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item* i1;
             i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item));
@@ -37589,50 +37588,50 @@
               MYSQL_YYABORT;
             (yyval.item)= i1;
           }
-#line 37593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1716:
-#line 10922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_quarter(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1717:
-#line 10928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10941 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1718:
-#line 10934 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10947 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 37622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1719:
-#line 10939 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_reverse(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37632 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1720:
-#line 10945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_row_count(thd);
             if (unlikely((yyval.item) == NULL))
@@ -37640,51 +37639,51 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 37644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1721:
-#line 10953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10966 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37654 "/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 1722:
-#line 10959 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1723:
-#line 10965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10978 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37674 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1724:
-#line 10971 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10984 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37684 "/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 1725:
-#line 10977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10990 "/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),
@@ -37692,11 +37691,11 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37696 "/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 1726:
-#line 10985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 10998 "/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);
@@ -37708,22 +37707,22 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37712 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37711 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1727:
-#line 10997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11010 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1728:
-#line 11004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_SPATIAL
             (yyval.item)= (yyvsp[0].item);
@@ -37735,104 +37734,104 @@
                               sym_group_geom.needed_define));
 #endif
           }
-#line 37739 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1729:
-#line 11019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11032 "/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 37749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37748 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1730:
-#line 11025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11038 "/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 37760 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1731:
-#line 11032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11045 "/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 37771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37770 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1732:
-#line 11039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11052 "/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 37782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37781 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1733:
-#line 11046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11059 "/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 37793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1734:
-#line 11053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11066 "/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 37804 "/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 1735:
-#line 11060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11073 "/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 37812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1736:
-#line 11064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11077 "/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 37823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1737:
-#line 11071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11084 "/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_WITHIN_FUNC));
           }
-#line 37832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1738:
-#line 11088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_DLOPEN
             udf_func *udf= 0;
@@ -37851,11 +37850,11 @@
             (yyval.udf)= udf;
 #endif
           }
-#line 37855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1739:
-#line 11107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Create_func *builder;
             Item *item= NULL;
@@ -37904,88 +37903,88 @@
             if (unlikely(! ((yyval.item)= item)))
               MYSQL_YYABORT;
           }
-#line 37908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1740:
-#line 11156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11169 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 37917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1741:
-#line 11164 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); }
-#line 37923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1742:
-#line 11166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11179 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_BOOL; }
-#line 37929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37928 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1743:
-#line 11170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_NL; }
-#line 37935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1744:
-#line 11171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_NL; }
-#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1745:
-#line 11175 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;         }
-#line 37947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1746:
-#line 11176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_EXPAND; }
-#line 37953 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1747:
-#line 11180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item_list)= NULL; }
-#line 37959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37958 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1748:
-#line 11181 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11194 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[0].item_list); }
-#line 37965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1749:
-#line 11186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL))
               MYSQL_YYABORT;
             (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root);
           }
-#line 37976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1750:
-#line 11193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11206 "/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 37985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 37984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1751:
-#line 11201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11214 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
              Use Item::name as a storage for the attribute value of user
@@ -38009,61 +38008,61 @@
               (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
             (yyval.item)= (yyvsp[-2].item);
           }
-#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1752:
-#line 11228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11241 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1753:
-#line 11234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11247 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1754:
-#line 11240 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1755:
-#line 11246 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11259 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1756:
-#line 11252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1757:
-#line 11258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1);
             if (unlikely(item == NULL))
@@ -38072,149 +38071,149 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1758:
-#line 11267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38086 "/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 1759:
-#line 11273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->in_sum_expr++; }
-#line 38092 "/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 1760:
-#line 11275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->in_sum_expr--; }
-#line 38098 "/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 1761:
-#line 11277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11290 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1762:
-#line 11283 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11296 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1763:
-#line 11294 "/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_sum_min(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38128 "/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 1764:
-#line 11300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1765:
-#line 11306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1766:
-#line 11312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11325 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38158 "/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 1767:
-#line 11318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11331 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1768:
-#line 11324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11337 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1769:
-#line 11330 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11343 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38188 "/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 1770:
-#line 11336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11349 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1771:
-#line 11342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11355 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1772:
-#line 11348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->in_sum_expr++; }
-#line 38214 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38213 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1773:
-#line 11352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             sel->in_sum_expr--;
@@ -38232,11 +38231,11 @@
             (yyvsp[-4].item_list)->empty();
             sel->gorder_list.empty();
           }
-#line 38236 "/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 1774:
-#line 11373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item), (yyvsp[0].lex_str_ptr));
             if (unlikely((yyval.item) == NULL))
@@ -38244,11 +38243,11 @@
             if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
               MYSQL_YYABORT;
           }
-#line 38248 "/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 1775:
-#line 11382 "/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;
             if (unlikely(Select->add_window_spec(thd, lex->win_ref,
@@ -38263,109 +38262,109 @@
             if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
               MYSQL_YYABORT;
           }
-#line 38267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1777:
-#line 11402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             ((Item_sum *) (yyvsp[0].item))->mark_as_window_func_sum_expr();
           }
-#line 38275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1778:
-#line 11409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_row_number(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38285 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1779:
-#line 11416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_rank(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1780:
-#line 11423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11436 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_dense_rank(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1781:
-#line 11430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_percent_rank(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38315 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1782:
-#line 11437 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11450 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_cume_dist(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38324 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1783:
-#line 11444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_ntile(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38335 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1784:
-#line 11451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_first_value(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1785:
-#line 11458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_last_value(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1786:
-#line 11465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_nth_value(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1787:
-#line 11472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* No second argument defaults to 1. */
             Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
@@ -38375,21 +38374,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1788:
-#line 11483 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11496 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1789:
-#line 11490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* No second argument defaults to 1. */
             Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
@@ -38399,21 +38398,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1790:
-#line 11501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1791:
-#line 11513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11526 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(Select->add_window_spec(thd, lex->win_ref,
@@ -38428,25 +38427,25 @@
             if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
               MYSQL_YYABORT;
           }
-#line 38432 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38431 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1792:
-#line 11531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11544 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->prepare_add_window_spec(thd); }
-#line 38438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1793:
-#line 11533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11546 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              (yyval.item)= (yyvsp[-6].item);
            }
-#line 38446 "/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 1794:
-#line 11537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11550 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item *args= new (thd->mem_root) Item_decimal(thd, "0.5", 3,
                                                    thd->charset());
@@ -38460,67 +38459,67 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1795:
-#line 11554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11567 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1796:
-#line 11560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_percentile_disc(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 38484 "/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 1797:
-#line 11569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
           }
-#line 38493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38492 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1798:
-#line 11578 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
             if (unlikely((yyval.lex_str_ptr) == NULL))
               MYSQL_YYABORT;
           }
-#line 38503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1799:
-#line 11587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(! Lex->parsing_options.allows_variable))
               my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0)));
           }
-#line 38512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38511 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1800:
-#line 11592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item);
           }
-#line 38520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1801:
-#line 11599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11612 "/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));
@@ -38530,11 +38529,11 @@
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
             lex->set_var_list.push_back(item, thd->mem_root);
           }
-#line 38534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1802:
-#line 11609 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11622 "/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 (unlikely((yyval.item) == NULL))
@@ -38542,134 +38541,134 @@
             LEX *lex= Lex;
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
           }
-#line 38546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1803:
-#line 11617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-1].var_type), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 38555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1804:
-#line 11622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 38564 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1805:
-#line 11629 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1806:
-#line 11630 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11643 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 38576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1807:
-#line 11635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11648 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1);
             if (unlikely((yyval.string) == NULL))
               MYSQL_YYABORT;
           }
-#line 38586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1808:
-#line 11640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.string) = (yyvsp[0].string); }
-#line 38592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1811:
-#line 11650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11663 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 38601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38600 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1812:
-#line 11655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11668 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 38610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1813:
-#line 11662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1814:
-#line 11663 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 38622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1815:
-#line 11667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11680 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 38628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1816:
-#line 11672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
-#line 38636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1817:
-#line 11679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11692 "/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 38647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1818:
-#line 11686 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11699 "/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 38658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38657 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1819:
-#line 11693 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11706 "/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 38669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1820:
-#line 11705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->current_select->inc_in_sum_expr()))
@@ -38678,213 +38677,213 @@
               MYSQL_YYABORT;
             }
           }
-#line 38682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38681 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1821:
-#line 11714 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->in_sum_expr--;
             (yyval.item)= (yyvsp[0].item);
           }
-#line 38691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1822:
-#line 11722 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].const_simple_string)); Lex->charset= &my_charset_bin; }
-#line 38697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38696 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1823:
-#line 11724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 38703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38702 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1824:
-#line 11726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11739 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
-#line 38709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38708 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1825:
-#line 11728 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 38715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1826:
-#line 11730 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
-#line 38721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1827:
-#line 11732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 38727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1828:
-#line 11734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
-#line 38733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1829:
-#line 11736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->charset= national_charset_info;
             (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].const_simple_string), 0);
           }
-#line 38742 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1830:
-#line 11740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); Lex->charset= NULL; }
-#line 38748 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1831:
-#line 11741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); Lex->charset= NULL; }
-#line 38754 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1832:
-#line 11745 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_longlong); }
-#line 38760 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1833:
-#line 11746 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_longlong); }
-#line 38766 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1834:
-#line 11747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_longlong); }
-#line 38772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1835:
-#line 11748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
-#line 38778 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1836:
-#line 11749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
-#line 38784 "/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 1837:
-#line 11750 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_newdecimal, (yyvsp[0].Lex_length_and_dec)); }
-#line 38790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1838:
-#line 11751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_float); }
-#line 38796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38795 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1839:
-#line 11752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_double, (yyvsp[0].Lex_length_and_dec));  }
-#line 38802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1840:
-#line 11756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11769 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_newdate); }
-#line 38808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1841:
-#line 11757 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_time2, 0, (yyvsp[0].const_simple_string)); }
-#line 38814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1842:
-#line 11758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_datetime2, 0, (yyvsp[0].const_simple_string)); }
-#line 38820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1843:
-#line 11762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item_list)= NULL; }
-#line 38826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38825 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1844:
-#line 11763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[0].item_list);}
-#line 38832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1845:
-#line 11768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL) ||
                 unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38843 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1846:
-#line 11775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11788 "/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 38852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1847:
-#line 11782 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[0].item_list); }
-#line 38858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1848:
-#line 11783 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11796 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[-1].item_list); }
-#line 38864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1849:
-#line 11788 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11801 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL) ||
                 unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1850:
-#line 11795 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11808 "/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 38884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1851:
-#line 11803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL))
@@ -38893,32 +38892,32 @@
                          (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1852:
-#line 11812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
                          (yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.item_list)= (yyvsp[-4].item_list);
           }
-#line 38908 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1854:
-#line 11823 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11836 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.item_list)= (yyvsp[-2].item_list);
           }
-#line 38918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1855:
-#line 11832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL) ||
@@ -38927,27 +38926,27 @@
               MYSQL_YYABORT;
 
           }
-#line 38931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1856:
-#line 11841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= (yyvsp[-2].item_list);
             if (unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38940 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1857:
-#line 11852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table_list)= (yyvsp[0].table_list); }
-#line 38947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1858:
-#line 11854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11867 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!((yyval.table_list)= lex->current_select->nest_last_join(thd))))
@@ -38956,54 +38955,54 @@
               MYSQL_YYABORT;
             }
           }
-#line 38960 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1859:
-#line 11865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); }
-#line 38966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1860:
-#line 11876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table_list)=(yyvsp[0].table_list); }
-#line 38972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1861:
-#line 11877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table_list)=(yyvsp[-1].table_list); }
-#line 38978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38977 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1862:
-#line 11883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table_list)=(yyvsp[0].table_list); }
-#line 38984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1863:
-#line 11885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11898 "/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 38992 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 38991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1864:
-#line 11903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
 
             if (unlikely(Select->add_cross_joined_table((yyvsp[-2].table_list), (yyvsp[0].table_list), (yyvsp[-1].num))))
               MYSQL_YYABORT;
           }
-#line 39003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1865:
-#line 11911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11924 "/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. */
@@ -39011,50 +39010,50 @@
               MYSQL_YYABORT;
             Select->parsing_place= IN_ON;
           }
-#line 39015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1866:
-#line 11919 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11932 "/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));
             (yyvsp[-3].table_list)->on_context= Lex->pop_context();
             Select->parsing_place= NO_MATTER;
           }
-#line 39026 "/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 1867:
-#line 11927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
           }
-#line 39034 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1868:
-#line 11931 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11944 "/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 39044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1869:
-#line 11937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11950 "/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 39054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1870:
-#line 11946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11959 "/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. */
@@ -39062,11 +39061,11 @@
               MYSQL_YYABORT;
             Select->parsing_place= IN_ON;
           }
-#line 39066 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1871:
-#line 11954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
             (yyvsp[-3].table_list)->on_context= Lex->pop_context();
@@ -39074,40 +39073,40 @@
             (yyval.table_list)=(yyvsp[-3].table_list);
             Select->parsing_place= NO_MATTER;
           }
-#line 39078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1872:
-#line 11962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
           }
-#line 39086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39085 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1873:
-#line 11966 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11979 "/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 39096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1874:
-#line 11972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11985 "/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 39107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1875:
-#line 11982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 11995 "/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. */
@@ -39115,11 +39114,11 @@
               MYSQL_YYABORT;
             Select->parsing_place= IN_ON;
           }
-#line 39119 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1876:
-#line 11990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
@@ -39128,30 +39127,30 @@
             (yyvsp[-7].table_list)->on_context= Lex->pop_context();
             Select->parsing_place= NO_MATTER;
           }
-#line 39132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1877:
-#line 11999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
           }
-#line 39140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1878:
-#line 12003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!((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 39151 "/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 1879:
-#line 12010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12023 "/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);
@@ -39159,65 +39158,65 @@
             if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
               MYSQL_YYABORT;
           }
-#line 39163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1880:
-#line 12021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 39169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39168 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1881:
-#line 12022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 39175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1882:
-#line 12023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 39181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39180 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1883:
-#line 12027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = (yyvsp[0].num); }
-#line 39187 "/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 1884:
-#line 12028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 39193 "/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 1885:
-#line 12036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.string_list)= 0;}
-#line 39199 "/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 1887:
-#line 12042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.string_list)= (yyvsp[-2].string_list);
           }
-#line 39207 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1890:
-#line 12061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Select);
             SELECT_LEX *sel= Select;
             sel->table_join_options= 0;
           }
-#line 39217 "/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 1891:
-#line 12067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
                                                          Select->get_table_join_options(),
@@ -39232,11 +39231,11 @@
             if ((yyvsp[-2].num))
               tl->vers_conditions= Lex->vers_conditions;
           }
-#line 39236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1892:
-#line 12103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12116 "/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. */
@@ -39301,11 +39300,11 @@
               (yyval.table_list)->vers_conditions= Lex->vers_conditions;
             }
           }
-#line 39305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1893:
-#line 12171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             SELECT_LEX *sel= (yyvsp[-7].select_lex);
@@ -39324,11 +39323,11 @@
             if ((yyvsp[-1].num))
               (yyval.table_list)->vers_conditions= Lex->vers_conditions;
           }
-#line 39328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1895:
-#line 12213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12226 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-1].table_list)))
             {
@@ -39336,11 +39335,11 @@
               MYSQL_YYABORT;
             }
           }
-#line 39340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1896:
-#line 12221 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-1].table_list)))
             {
@@ -39348,37 +39347,37 @@
               MYSQL_YYABORT;
             }
           }
-#line 39352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1901:
-#line 12235 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->pop_context(); }
-#line 39358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39357 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1902:
-#line 12236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12249 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->pop_context(); }
-#line 39364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39363 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1903:
-#line 12237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->pop_context(); }
-#line 39370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1906:
-#line 12248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_braces(0);
           }
-#line 39378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1907:
-#line 12255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12268 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -39386,19 +39385,19 @@
               mysql_init_select(lex);
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 39390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1908:
-#line 12263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 39398 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1909:
-#line 12271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             /* for normal joins, $2 != NULL and end_nested_join() != NULL,
@@ -39412,51 +39411,51 @@
               MYSQL_YYABORT;
             }
           }
-#line 39416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39415 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1910:
-#line 12287 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table_list)= (yyvsp[0].table_list); }
-#line 39422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39421 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1911:
-#line 12288 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12301 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.table_list)= (yyvsp[0].table_list); }
-#line 39428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39427 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1912:
-#line 12297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if ((yyvsp[-1].num))
               Select->set_braces(1);
             (yyval.table_list)= NULL;
           }
-#line 39438 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1913:
-#line 12306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->tvc_start();
           }
-#line 39446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1914:
-#line 12310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Lex->tvc_finalize_derived())
               MYSQL_YYABORT;
             (yyval.table_list)= NULL;
           }
-#line 39456 "/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 1915:
-#line 12319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->derived_tables|= DERIVED_SUBQUERY;
@@ -39473,35 +39472,35 @@
             lex->current_select->linkage= DERIVED_TABLE_TYPE;
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 39477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1916:
-#line 12336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12349 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 39485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1918:
-#line 12343 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= Select; }
-#line 39491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1919:
-#line 12348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely((yyvsp[0].select_lex)->init_nested_join(lex->thd)))
               MYSQL_YYABORT;
           }
-#line 39501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1920:
-#line 12356 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -39510,113 +39509,113 @@
                 !embedding->nested_join->join_list.elements;
             /* return true if we are deeply nested */
           }
-#line 39514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1921:
-#line 12367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12380 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1922:
-#line 12368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1923:
-#line 12373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12386 "/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 39534 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1924:
-#line 12376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= INDEX_HINT_MASK_JOIN;  }
-#line 39540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1925:
-#line 12377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= INDEX_HINT_MASK_ORDER; }
-#line 39546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1926:
-#line 12378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= INDEX_HINT_MASK_GROUP; }
-#line 39552 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1927:
-#line 12382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12395 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.index_hint)= INDEX_HINT_FORCE; }
-#line 39558 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1928:
-#line 12383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.index_hint)= INDEX_HINT_IGNORE; }
-#line 39564 "/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 1929:
-#line 12388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
           }
-#line 39572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1931:
-#line 12393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
           }
-#line 39580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1936:
-#line 12406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->alloc_index_hints(thd); }
-#line 39586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1938:
-#line 12410 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {  Select->clear_index_hints(); }
-#line 39592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1940:
-#line 12415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->add_index_hint(thd, NULL, 0); }
-#line 39598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1941:
-#line 12416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12429 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1942:
-#line 12421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12434 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->add_index_hint(thd, (yyvsp[0].ident_sys).str, (yyvsp[0].ident_sys).length); }
-#line 39610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1943:
-#line 12423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12436 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->add_index_hint(thd, "PRIMARY", 7); }
-#line 39616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1946:
-#line 12433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.string_list)= new (thd->mem_root) List)))
               MYSQL_YYABORT;
@@ -39627,11 +39626,11 @@
               MYSQL_YYABORT;
             (yyval.string_list)->push_back(s, thd->mem_root);
           }
-#line 39631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1947:
-#line 12444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             String *s= new (thd->mem_root) String((const char *) (yyvsp[0].ident_sys).str,
                                                     (yyvsp[0].ident_sys).length,
@@ -39642,191 +39641,191 @@
               MYSQL_YYABORT;
             (yyval.string_list)= (yyvsp[-2].string_list);
           }
-#line 39646 "/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 1948:
-#line 12457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39652 "/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 1949:
-#line 12458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_HOUR; }
-#line 39658 "/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 1950:
-#line 12459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
-#line 39664 "/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 1951:
-#line 12460 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_MINUTE; }
-#line 39670 "/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 1952:
-#line 12461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_SECOND; }
-#line 39676 "/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 1953:
-#line 12462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
-#line 39682 "/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 1954:
-#line 12463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_HOUR_MINUTE; }
-#line 39688 "/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 1955:
-#line 12464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_HOUR_SECOND; }
-#line 39694 "/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 1956:
-#line 12465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
-#line 39700 "/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 1957:
-#line 12466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_MINUTE_SECOND; }
-#line 39706 "/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 1958:
-#line 12467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
-#line 39712 "/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 1959:
-#line 12468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12481 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_YEAR_MONTH; }
-#line 39718 "/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 1960:
-#line 12472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_DAY; }
-#line 39724 "/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 1961:
-#line 12473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_WEEK; }
-#line 39730 "/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 1962:
-#line 12474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_HOUR; }
-#line 39736 "/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 1963:
-#line 12475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12488 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_MINUTE; }
-#line 39742 "/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 1964:
-#line 12476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_MONTH; }
-#line 39748 "/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 1965:
-#line 12477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12490 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_QUARTER; }
-#line 39754 "/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 1966:
-#line 12478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_SECOND; }
-#line 39760 "/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 1967:
-#line 12479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
-#line 39766 "/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 1968:
-#line 12480 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_YEAR; }
-#line 39772 "/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 1969:
-#line 12484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
-#line 39778 "/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 1970:
-#line 12485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
-#line 39784 "/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 1971:
-#line 12486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
-#line 39790 "/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 1972:
-#line 12487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
-#line 39796 "/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 1976:
-#line 12497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12510 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str_ptr)=0; }
-#line 39802 "/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 1977:
-#line 12499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str_ptr)= (LEX_CSTRING*) thd->memdup(&(yyvsp[0].ident_sys),sizeof(LEX_STRING));
             if (unlikely((yyval.lex_str_ptr) == NULL))
               MYSQL_YYABORT;
           }
-#line 39812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1980:
-#line 12512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12525 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->where= 0; }
-#line 39818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1981:
-#line 12514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12527 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= IN_WHERE;
           }
-#line 39826 "/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 1982:
-#line 12518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *select= Select;
             select->where= normalize_cond(thd, (yyvsp[0].item));
@@ -39834,19 +39833,19 @@
             if ((yyvsp[0].item))
               (yyvsp[0].item)->top_level_item();
           }
-#line 39838 "/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 1984:
-#line 12530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= IN_HAVING;
           }
-#line 39846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1985:
-#line 12534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             sel->having= normalize_cond(thd, (yyvsp[0].item));
@@ -39854,20 +39853,20 @@
             if ((yyvsp[0].item))
               (yyvsp[0].item)->top_level_item();
           }
-#line 39858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1986:
-#line 12545 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->escape_used= TRUE;
             (yyval.item)= (yyvsp[0].item);
           }
-#line 39867 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1987:
-#line 12550 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12563 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->escape_used= FALSE;
             (yyval.item)= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ?
@@ -39876,35 +39875,35 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 39880 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1990:
-#line 12571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12584 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
                MYSQL_YYABORT;
            }
-#line 39889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39888 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1991:
-#line 12576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 39898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1992:
-#line 12583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1993:
-#line 12585 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
@@ -39921,11 +39920,11 @@
 
             my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE"));
           }
-#line 39925 "/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 1994:
-#line 12602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               'WITH ROLLUP' is needed for backward compatibility,
@@ -39940,23 +39939,23 @@
                                 "global union parameters"));
             lex->current_select->olap= ROLLUP_TYPE;
           }
-#line 39944 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1995:
-#line 12624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1996:
-#line 12627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39955 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 1999:
-#line 12637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             LEX *lex= Lex;
             if (unlikely(Select->add_window_def(thd, (yyvsp[-2].lex_str_ptr), lex->win_ref,
@@ -39965,51 +39964,51 @@
                                                 lex->win_frame)))
               MYSQL_YYABORT;
           }
-#line 39969 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2000:
-#line 12649 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->prepare_add_window_spec(thd); }
-#line 39975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2002:
-#line 12656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12669 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 39981 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2003:
-#line 12658 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             thd->lex->win_ref= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
             if (unlikely(thd->lex->win_ref == NULL))
               MYSQL_YYABORT;
           }
-#line 39991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2004:
-#line 12665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 39997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 39996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2006:
-#line 12670 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 40003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2008:
-#line 12675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40009 "/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 2009:
-#line 12677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->win_frame=
@@ -40020,23 +40019,23 @@
             if (unlikely(lex->win_frame == NULL))
               MYSQL_YYABORT;
           }
-#line 40024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2010:
-#line 12690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12704 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_units)= Window_frame::UNITS_ROWS; }
-#line 40030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2011:
-#line 12691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_units)= Window_frame::UNITS_RANGE; }
-#line 40036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2012:
-#line 12696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->frame_top_bound= (yyvsp[0].window_frame_bound);
@@ -40046,128 +40045,128 @@
             if (unlikely(lex->frame_bottom_bound == NULL))
               MYSQL_YYABORT;
           }
-#line 40050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2013:
-#line 12706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->frame_top_bound= (yyvsp[-2].window_frame_bound);
             lex->frame_bottom_bound= (yyvsp[0].window_frame_bound);
           }
-#line 40060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2014:
-#line 12715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root) 
                   Window_frame_bound(Window_frame_bound::PRECEDING, NULL); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 40071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2015:
-#line 12722 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12736 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::CURRENT, NULL); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 40082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2016:
-#line 12729 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::PRECEDING, (yyvsp[-1].item)); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 40093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2017:
-#line 12738 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.window_frame_bound)= (yyvsp[0].window_frame_bound); }
-#line 40099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2018:
-#line 12740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12754 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::FOLLOWING, NULL); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 40110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2019:
-#line 12747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::FOLLOWING, (yyvsp[-1].item)); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 40121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2020:
-#line 12756 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
-#line 40127 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2021:
-#line 12758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_CURRENT_ROW; }
-#line 40133 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2022:
-#line 12760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_GROUP; }
-#line 40139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2023:
-#line 12762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_TIES; }
-#line 40145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2024:
-#line 12764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
-#line 40151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2025:
-#line 12766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
-#line 40157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40156 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2029:
-#line 12784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             bool ascending= ((yyvsp[0].num) == 1) ? true : false;
             if (unlikely(add_order_to_list(thd, (yyvsp[-1].item), ascending)))
               MYSQL_YYABORT;
           }
-#line 40167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2032:
-#line 12802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -40210,67 +40209,67 @@
                lex->current_select= sel->master_unit()->fake_select_lex;
              }
           }
-#line 40214 "/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 2033:
-#line 12845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 
           }
-#line 40222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2034:
-#line 12852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
                MYSQL_YYABORT;
            }
-#line 40231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2035:
-#line 12857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 40240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2036:
-#line 12864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) =  1; }
-#line 40246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2037:
-#line 12865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) =1; }
-#line 40252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2038:
-#line 12866 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12880 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num) =0; }
-#line 40258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2039:
-#line 12870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2040:
-#line 12871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2041:
-#line 12876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             if (sel->master_unit()->is_unit_op() && !sel->braces)
@@ -40280,366 +40279,366 @@
               DBUG_ASSERT(Select);
             }
           }
-#line 40284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40283 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2042:
-#line 12889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12903 "/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 40295 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2043:
-#line 12897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12911 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
-#line 40303 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2044:
-#line 12901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
-#line 40311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2045:
-#line 12908 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12922 "/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 40322 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2046:
-#line 12915 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12929 "/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 40333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2047:
-#line 12922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12936 "/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 40344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2048:
-#line 12932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 40353 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2049:
-#line 12937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 40362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2050:
-#line 12942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyvsp[0].item_param)->limit_clause_param= TRUE;
           }
-#line 40370 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2051:
-#line 12946 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12960 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 40380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2052:
-#line 12952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12966 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 40390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2053:
-#line 12958 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12972 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 40400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40399 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2054:
-#line 12967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             LEX *lex=Lex;
             lex->limit_rows_examined= (yyvsp[0].item);
           }
-#line 40409 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2055:
-#line 12974 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->current_select->select_limit= 0;
           }
-#line 40418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2056:
-#line 12979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 12994 "/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 40429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2057:
-#line 12985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { thd->parse_error(); MYSQL_YYABORT; }
-#line 40435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2058:
-#line 12986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { thd->parse_error(); MYSQL_YYABORT; }
-#line 40441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2061:
-#line 12995 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13010 "/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 40447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2062:
-#line 12996 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13011 "/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 40453 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2063:
-#line 12999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13015 "/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 40459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2064:
-#line 13000 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
-#line 40465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2065:
-#line 13001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13017 "/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 40471 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2066:
-#line 13002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13018 "/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 40477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40476 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2067:
-#line 13003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13019 "/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 40483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2068:
-#line 13004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13020 "/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 40489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2069:
-#line 13008 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13024 "/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 40495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2070:
-#line 13009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
-#line 40501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2071:
-#line 13010 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13026 "/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 40507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2072:
-#line 13011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13027 "/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 40513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2073:
-#line 13012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { MYSQL_YYABORT; }
-#line 40519 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2074:
-#line 13016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40525 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2075:
-#line 13017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40531 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2076:
-#line 13018 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40537 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2077:
-#line 13019 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2078:
-#line 13023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13039 "/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 40549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2079:
-#line 13024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13040 "/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 40555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2080:
-#line 13025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13041 "/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 40561 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2081:
-#line 13026 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13042 "/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 40567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2082:
-#line 13027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13043 "/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 40573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2083:
-#line 13031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13047 "/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 40579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2084:
-#line 13032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13048 "/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 40585 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40584 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2085:
-#line 13033 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); }
-#line 40591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2086:
-#line 13034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13050 "/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 40597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40596 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2087:
-#line 13035 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13051 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { MYSQL_YYABORT; }
-#line 40603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2088:
-#line 13040 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
-#line 40609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2091:
-#line 13049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
-#line 40615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2092:
-#line 13050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.choice)= HA_CHOICE_UNDEF; }
-#line 40621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40620 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2093:
-#line 13054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
-#line 40627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2094:
-#line 13055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 1; }
-#line 40633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40632 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2095:
-#line 13056 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 40639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40638 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2096:
-#line 13061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -40665,43 +40664,43 @@
             */
             Lex->expr_allows_subselect= false;
           }
-#line 40669 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2097:
-#line 13087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* Subqueries are allowed from now.*/
             Lex->expr_allows_subselect= true;
           }
-#line 40678 "/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 2098:
-#line 13094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40684 "/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 2099:
-#line 13095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40690 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2102:
-#line 13105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_proc_to_list(thd, (yyvsp[-1].item))))
               MYSQL_YYABORT;
             if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
               (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
           }
-#line 40701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40700 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2103:
-#line 13114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (!lex->describe &&
@@ -40709,23 +40708,23 @@
                             select_dumpvar(thd)))))
               MYSQL_YYABORT;
           }
-#line 40713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40712 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2104:
-#line 13122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40718 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2106:
-#line 13127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40724 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2107:
-#line 13131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13147 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (Lex->result)
             {
@@ -40742,37 +40741,37 @@
               DBUG_ASSERT(Lex->describe);
             }
           }
-#line 40746 "/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 2108:
-#line 13151 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13167 "/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 40754 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40753 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2109:
-#line 13155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[0].lex_str))) && Lex->result))
               MYSQL_YYABORT;
           }
-#line 40763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2110:
-#line 13160 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))) && Lex->result))
               MYSQL_YYABORT;
           }
-#line 40772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2112:
-#line 13172 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13188 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
@@ -40783,17 +40782,17 @@
                          select_export(thd, lex->exchange))))
               MYSQL_YYABORT;
           }
-#line 40787 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40786 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2113:
-#line 13183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->exchange->cs= (yyvsp[0].charset); }
-#line 40793 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40792 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2115:
-#line 13186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (!lex->describe)
@@ -40808,54 +40807,54 @@
                 MYSQL_YYABORT;
             }
           }
-#line 40812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40811 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2116:
-#line 13201 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
           }
-#line 40820 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2117:
-#line 13212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13228 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_DO;
             mysql_init_select(lex);
           }
-#line 40830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2118:
-#line 13218 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13234 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->insert_list= (yyvsp[0].item_list);
           }
-#line 40838 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2119:
-#line 13229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13245 "/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 40849 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2120:
-#line 13236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13252 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2121:
-#line 13238 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13254 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -40872,21 +40871,21 @@
                                            MDL_SHARED_UPGRADABLE)))
               MYSQL_YYABORT;
           }
-#line 40876 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2122:
-#line 13255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13271 "/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].ident_sys);
           }
-#line 40886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2123:
-#line 13261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13277 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             sp_name *spname;
@@ -40900,11 +40899,11 @@
               MYSQL_YYABORT;
             lex->spname= spname;
           }
-#line 40904 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2124:
-#line 13275 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13291 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             LEX_CSTRING db= {0, 0};
@@ -40919,11 +40918,11 @@
               MYSQL_YYABORT;
             lex->spname= spname;
           }
-#line 40923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40922 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2125:
-#line 13290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->sphead))
@@ -40931,90 +40930,90 @@
             lex->set_command(SQLCOM_DROP_PROCEDURE, (yyvsp[-1].object_ddl_options));
             lex->spname= (yyvsp[0].spname);
           }
-#line 40935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2126:
-#line 13298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options));
           }
-#line 40943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40942 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2127:
-#line 13302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options));
           }
-#line 40951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2128:
-#line 13306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13322 "/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 40962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2129:
-#line 13313 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 40968 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2130:
-#line 13315 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13331 "/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 40977 "/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 2131:
-#line 13320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13336 "/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 40987 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40986 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2132:
-#line 13326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE;
           }
-#line 40996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 40995 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2133:
-#line 13331 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP;
           }
-#line 41005 "/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 2134:
-#line 13336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13352 "/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 41014 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2135:
-#line 13342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->set_command(SQLCOM_DROP_SEQUENCE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
@@ -41022,17 +41021,17 @@
             YYPS->m_lock_type= TL_UNLOCK;
             YYPS->m_mdl_type= MDL_EXCLUSIVE;
           }
-#line 41026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2136:
-#line 13350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41032 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2139:
-#line 13360 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[0].table), NULL,
                                                     TL_OPTION_UPDATING,
@@ -41040,11 +41039,11 @@
                                                     YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 41044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41043 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2140:
-#line 13371 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
                                                     TL_OPTION_UPDATING,
@@ -41054,11 +41053,11 @@
                                                     (yyvsp[0].string_list))))
               MYSQL_YYABORT;
           }
-#line 41058 "/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 2143:
-#line 13389 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->
                          add_table_to_list(thd, (yyvsp[0].table), NULL,
@@ -41068,109 +41067,113 @@
                                            YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 41072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2144:
-#line 13402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           Lex->check_exists= FALSE;
           (yyval.num)= 0;
         }
-#line 41081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2145:
-#line 13407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           Lex->check_exists= TRUE;
           (yyval.num)= 1;
         }
-#line 41090 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2146:
-#line 13415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           (yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
         }
-#line 41098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41097 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2147:
-#line 13419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13435 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS);
         }
-#line 41106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2148:
-#line 13425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 41112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2149:
-#line 13426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
-#line 41118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2150:
-#line 13434 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13450 "/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 41129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41128 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2151:
-#line 13442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13458 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_lock_for_tables((yyvsp[-2].lock_type), true);
             Lex->current_select= &Lex->select_lex;
           }
-#line 41138 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2152:
-#line 13447 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
-    {}
-#line 41144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 13463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+    {
+            Lex->mark_first_table_as_inserting();
+          }
+#line 41145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2153:
-#line 13452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13470 "/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 41155 "/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 2154:
-#line 13459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->set_lock_for_tables((yyvsp[-1].lock_type), true);
             Lex->current_select= &Lex->select_lex;
           }
-#line 41164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41165 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2155:
-#line 13464 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
-    {}
-#line 41170 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 13482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+    {
+            Lex->mark_first_table_as_inserting();
+          }
+#line 41173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2156:
-#line 13469 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               If it is SP we do not allow insert optimisation when result of
@@ -41179,91 +41182,91 @@
             */
             (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
-#line 41183 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41186 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2157:
-#line 13477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 41189 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41192 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2158:
-#line 13479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
          // QQ: why was +1?
           Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
           Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
           (yyval.lock_type)= TL_WRITE_DELAYED;
         }
-#line 41200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2159:
-#line 13485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE; }
-#line 41206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41209 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2160:
-#line 13489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13509 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= (yyvsp[0].lock_type); }
-#line 41212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2161:
-#line 13491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
           Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
           (yyval.lock_type)= TL_WRITE_DELAYED;
         }
-#line 41222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2162:
-#line 13499 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41228 "/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;
 
   case 2163:
-#line 13500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2164:
-#line 13505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13525 "/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 41245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41248 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2165:
-#line 13513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41254 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2166:
-#line 13514 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2167:
-#line 13515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41266 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2168:
-#line 13517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13538 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)) ||
@@ -41271,170 +41274,170 @@
                          thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41278 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2170:
-#line 13529 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13550 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 41281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2171:
-#line 13530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 41287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2172:
-#line 13534 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2173:
-#line 13535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41302 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2174:
-#line 13536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41308 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2179:
-#line 13551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13572 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->field_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
                 unlikely(lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2180:
-#line 13560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41322 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2181:
-#line 13561 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41328 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2182:
-#line 13565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41337 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2183:
-#line 13566 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13587 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2184:
-#line 13570 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41346 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2185:
-#line 13571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2186:
-#line 13575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2187:
-#line 13576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2188:
-#line 13581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
               MYSQL_YYABORT;
           }
-#line 41373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2189:
-#line 13586 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->many_values.push_back(lex->insert_list,
                                                     thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2190:
-#line 13596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
               MYSQL_YYABORT;
           }
-#line 41393 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41396 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2191:
-#line 13601 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->many_values.push_back(lex->insert_list,
                                                     thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41404 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2192:
-#line 13610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2194:
-#line 13615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13636 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2196:
-#line 13621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2197:
-#line 13626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13647 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2198:
-#line 13634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
                MYSQL_YYABORT;
@@ -41442,11 +41445,11 @@
             if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
               (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
            }
-#line 41446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41449 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2199:
-#line 13642 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13663 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
                MYSQL_YYABORT;
@@ -41454,70 +41457,70 @@
             if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
               (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
           }
-#line 41458 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2200:
-#line 13652 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13673 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item);}
-#line 41464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41467 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2201:
-#line 13654 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context());
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 41474 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2202:
-#line 13660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_ignore_value(thd, Lex->current_context());
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 41484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41487 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2204:
-#line 13669 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13690 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->duplicates= DUP_UPDATE; }
-#line 41490 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2205:
-#line 13671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13692 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 	    Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
           }
-#line 41498 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41501 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2206:
-#line 13675 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
 	    Select->parsing_place= NO_MATTER;
           }
-#line 41506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2207:
-#line 13684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13705 "/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 41517 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2208:
-#line 13692 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *slex= &Lex->select_lex;
             if (slex->table_list.elements > 1)
@@ -41536,50 +41539,50 @@
             */
             slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1);
           }
-#line 41540 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2209:
-#line 13710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41546 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41549 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2212:
-#line 13720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_item_to_list(thd, (yyvsp[-2].item))) ||
                 unlikely(add_value_to_list(thd, (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 41556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41559 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2215:
-#line 13734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           LEX *lex= Lex;
           if (unlikely(lex->update_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
               unlikely(lex->value_list.push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41567 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2216:
-#line 13743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_DEFAULT; }
-#line 41573 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2217:
-#line 13744 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 41579 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41582 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2218:
-#line 13751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13772 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_DELETE;
@@ -41590,41 +41593,41 @@
             lex->ignore= 0;
             lex->select_lex.init_order();
           }
-#line 41594 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2220:
-#line 13766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
-            Lex->vers_conditions.init(SYSTEM_TIME_ALL);
+            Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
           }
-#line 41602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2221:
-#line 13770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13791 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_BEFORE, (yyvsp[0].vers_history_point));
           }
-#line 41610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2222:
-#line 13776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2223:
-#line 13778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13799 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->last_table()->vers_conditions= Lex->vers_conditions;
           }
-#line 41624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2224:
-#line 13785 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->
                          add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
@@ -41636,55 +41639,55 @@
             YYPS->m_lock_type= TL_READ_DEFAULT;
             YYPS->m_mdl_type= MDL_SHARED_READ;
           }
-#line 41640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2225:
-#line 13803 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13824 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2226:
-#line 13805 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13826 "/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 41656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2227:
-#line 13811 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13832 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
               MYSQL_YYABORT;
           }
-#line 41665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2228:
-#line 13816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13837 "/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 41675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2229:
-#line 13822 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
               MYSQL_YYABORT;
           }
-#line 41684 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41687 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2234:
-#line 13840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13861 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Table_ident *ti= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
             if (unlikely(ti == NULL))
@@ -41699,11 +41702,11 @@
                                            YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 41703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41706 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2235:
-#line 13855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13876 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Table_ident *ti= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
             if (unlikely(ti == NULL))
@@ -41718,53 +41721,53 @@
                                            YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 41722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2236:
-#line 13872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2237:
-#line 13873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41734 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2238:
-#line 13877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2239:
-#line 13878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13899 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 41746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2240:
-#line 13882 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->options|= OPTION_QUICK; }
-#line 41752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41755 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2241:
-#line 13883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13904 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
-#line 41758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2242:
-#line 13884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ignore= 1; }
-#line 41764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2243:
-#line 13889 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX* lex= Lex;
             lex->sql_command= SQLCOM_TRUNCATE;
@@ -41775,11 +41778,11 @@
             YYPS->m_lock_type= TL_WRITE;
             YYPS->m_mdl_type= MDL_EXCLUSIVE;
           }
-#line 41779 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41782 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2244:
-#line 13900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13921 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -41787,99 +41790,99 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 41791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2251:
-#line 13924 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13945 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_CPU;
     }
-#line 41799 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41802 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2252:
-#line 13928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_MEMORY;
     }
-#line 41807 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41810 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2253:
-#line 13932 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_BLOCK_IO;
     }
-#line 41815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2254:
-#line 13936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_CONTEXT;
     }
-#line 41823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2255:
-#line 13940 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_PAGE_FAULTS;
     }
-#line 41831 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2256:
-#line 13944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13965 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_IPC;
     }
-#line 41839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2257:
-#line 13948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_SWAPS;
     }
-#line 41847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2258:
-#line 13952 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13973 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_SOURCE;
     }
-#line 41855 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2259:
-#line 13956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_ALL;
     }
-#line 41863 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2260:
-#line 13963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_query_id= 0;
     }
-#line 41871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2261:
-#line 13967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13988 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
       Lex->profile_query_id= atoi((yyvsp[0].lex_str).str);
     }
-#line 41879 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2262:
-#line 13976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 13997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->wild=0;
@@ -41888,30 +41891,30 @@
             lex->current_select->parsing_place= SELECT_LIST;
             lex->create_info.init();
           }
-#line 41892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2263:
-#line 13985 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 41900 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2264:
-#line 13992 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_DATABASES;
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)))
                MYSQL_YYABORT;
            }
-#line 41911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41914 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2265:
-#line 13999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14020 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLES;
@@ -41919,11 +41922,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)))
                MYSQL_YYABORT;
            }
-#line 41923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2266:
-#line 14007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14028 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TRIGGERS;
@@ -41931,11 +41934,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)))
                MYSQL_YYABORT;
            }
-#line 41935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2267:
-#line 14015 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_EVENTS;
@@ -41943,11 +41946,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_EVENTS)))
                MYSQL_YYABORT;
            }
-#line 41947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41950 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2268:
-#line 14023 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14044 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
@@ -41955,11 +41958,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLES)))
                MYSQL_YYABORT;
            }
-#line 41959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2269:
-#line 14031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14052 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
@@ -41967,55 +41970,55 @@
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)))
               MYSQL_YYABORT;
           }
-#line 41971 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2270:
-#line 14039 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_PLUGINS;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PLUGINS)))
               MYSQL_YYABORT;
           }
-#line 41982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2271:
-#line 14046 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->ident= (yyvsp[0].lex_str);
             Lex->sql_command= SQLCOM_SHOW_PLUGINS;
             if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
               MYSQL_YYABORT;
           }
-#line 41993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 41996 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2272:
-#line 14053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_PLUGINS;
             if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
               MYSQL_YYABORT;
           }
-#line 42003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42006 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2273:
-#line 14059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->create_info.db_type= (yyvsp[-1].db_type); }
-#line 42009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2274:
-#line 14061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->create_info.db_type= NULL; }
-#line 42015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2275:
-#line 14063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_FIELDS;
@@ -42024,45 +42027,45 @@
             if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)))
               MYSQL_YYABORT;
           }
-#line 42028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2276:
-#line 14072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_BINLOGS;
           }
-#line 42036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2277:
-#line 14076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
           }
-#line 42044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2278:
-#line 14080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
           }
-#line 42053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2280:
-#line 14086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
           }
-#line 42062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2282:
-#line 14091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_KEYS;
@@ -42071,96 +42074,96 @@
             if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)))
               MYSQL_YYABORT;
           }
-#line 42075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2283:
-#line 14100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14121 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_ENGINES)))
               MYSQL_YYABORT;
           }
-#line 42086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2284:
-#line 14107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14128 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_AUTHORS;
           }
-#line 42095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2285:
-#line 14112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
           }
-#line 42104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2286:
-#line 14117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
           }
-#line 42113 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2287:
-#line 14122 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING var= {STRING_WITH_LEN("warning_count")};
             (void) create_select_for_variable(thd, &var);
           }
-#line 42122 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2288:
-#line 14127 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
             (void) create_select_for_variable(thd, &var);
           }
-#line 42131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2289:
-#line 14132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command = SQLCOM_SHOW_WARNS;}
-#line 42137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2290:
-#line 14134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command = SQLCOM_SHOW_ERRORS;}
-#line 42143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2291:
-#line 14136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14157 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command = SQLCOM_SHOW_PROFILES; }
-#line 42149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2292:
-#line 14138 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_PROFILE;
             if (unlikely(prepare_schema_table(thd, lex, NULL, SCH_PROFILES)))
               MYSQL_YYABORT;
           }
-#line 42160 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2293:
-#line 14145 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14166 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS;
@@ -42168,17 +42171,17 @@
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)))
               MYSQL_YYABORT;
           }
-#line 42172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2294:
-#line 14153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14174 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
-#line 42178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2295:
-#line 14155 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_VARIABLES;
@@ -42186,33 +42189,33 @@
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)))
               MYSQL_YYABORT;
           }
-#line 42190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2296:
-#line 14163 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_CHARSETS;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_CHARSETS)))
               MYSQL_YYABORT;
           }
-#line 42201 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42204 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2297:
-#line 14170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_COLLATIONS;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)))
               MYSQL_YYABORT;
           }
-#line 42212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2298:
-#line 14177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14198 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_GRANTS;
             if (unlikely(!(Lex->grant_user=
@@ -42220,30 +42223,30 @@
               MYSQL_YYABORT;
             Lex->grant_user->user= current_user_and_current_role;
           }
-#line 42224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42227 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2299:
-#line 14185 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14206 "/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 42234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42237 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2300:
-#line 14191 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14212 "/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].ident_sys);
           }
-#line 42243 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2301:
-#line 14196 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -42251,11 +42254,11 @@
               MYSQL_YYABORT;
             lex->create_info.storage_media= HA_SM_DEFAULT;
           }
-#line 42255 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2302:
-#line 14204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -42263,11 +42266,11 @@
               MYSQL_YYABORT;
             lex->table_type= TABLE_TYPE_VIEW;
           }
-#line 42267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42270 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2303:
-#line 14212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14233 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -42275,100 +42278,100 @@
               MYSQL_YYABORT;
             lex->table_type= TABLE_TYPE_SEQUENCE;
           }
-#line 42279 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2304:
-#line 14220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_MASTER_STAT;
           }
-#line 42287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42290 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2305:
-#line 14224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
             Lex->verbose= 1;
           }
-#line 42296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2306:
-#line 14229 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->mi.connection_name= null_clex_str;
             lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
             lex->verbose= 0;
           }
-#line 42307 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2307:
-#line 14236 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14257 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
             Lex->verbose= 0;
           }
-#line 42316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42319 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2308:
-#line 14241 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14262 "/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 42327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42330 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2309:
-#line 14248 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14269 "/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 42338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42341 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2310:
-#line 14255 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14276 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
             lex->spname= (yyvsp[0].spname);
           }
-#line 42348 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42351 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2311:
-#line 14261 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
             lex->spname= (yyvsp[0].spname);
           }
-#line 42358 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2312:
-#line 14267 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14288 "/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 42368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2313:
-#line 14273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
             if (unlikely(!(Lex->grant_user=
@@ -42376,111 +42379,111 @@
               MYSQL_YYABORT;
             Lex->grant_user->user= current_user;
           }
-#line 42380 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2314:
-#line 14281 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14302 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
              Lex->grant_user= (yyvsp[0].lex_user);
           }
-#line 42389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2315:
-#line 14286 "/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;
             lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 42400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2316:
-#line 14293 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 42411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42414 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2317:
-#line 14300 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14321 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 42422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2318:
-#line 14307 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14328 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 42433 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2319:
-#line 14314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
             Lex->spname= (yyvsp[0].spname);
           }
-#line 42442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2320:
-#line 14319 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14340 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
             Lex->spname= (yyvsp[0].spname);
           }
-#line 42451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2321:
-#line 14324 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14345 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
             Lex->spname= (yyvsp[0].spname);
           }
-#line 42460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2322:
-#line 14329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14350 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->spname= (yyvsp[0].spname);
             Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
           }
-#line 42469 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2323:
-#line 14334 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
             if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_EXPLAIN)))
               MYSQL_YYABORT;
             add_value_to_list(thd, (yyvsp[0].item));
           }
-#line 42480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42483 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2324:
-#line 14341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14362 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              bool in_plugin;
@@ -42499,83 +42502,83 @@
              if (unlikely(make_schema_select(thd, Lex->current_select, table)))
                MYSQL_YYABORT;
            }
-#line 42503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42506 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2325:
-#line 14363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14384 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
-#line 42509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2326:
-#line 14365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
-#line 42515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2327:
-#line 14367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
-#line 42521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42524 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2332:
-#line 14381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 42527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2333:
-#line 14382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 42533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42536 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2334:
-#line 14386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->verbose=0; }
-#line 42539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42542 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2335:
-#line 14387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14408 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->verbose=1; }
-#line 42545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2338:
-#line 14396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->mi.log_file_name = 0; }
-#line 42551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42554 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2339:
-#line 14397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->mi.log_file_name = (yyvsp[0].lex_str).str; }
-#line 42557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2340:
-#line 14401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->mi.pos = 4; /* skip magic number */ }
-#line 42563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42566 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2341:
-#line 14402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14423 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->mi.pos = (yyvsp[0].ulonglong_number); }
-#line 42569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2342:
-#line 14406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.simple_string)= 0; }
-#line 42575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42578 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2343:
-#line 14408 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14429 "/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);
@@ -42583,22 +42586,22 @@
               MYSQL_YYABORT;
             (yyval.simple_string)= (yyvsp[-1].simple_string);
           }
-#line 42587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2344:
-#line 14416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14437 "/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 42598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42601 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2345:
-#line 14427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             mysql_init_select(lex);
@@ -42609,66 +42612,66 @@
             if (unlikely(prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)))
               MYSQL_YYABORT;
           }
-#line 42613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2346:
-#line 14438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 42621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2347:
-#line 14442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14463 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->describe|= DESCRIBE_NORMAL; }
-#line 42627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2348:
-#line 14444 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->select_lex.options|= SELECT_DESCRIBE;
           }
-#line 42636 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2356:
-#line 14465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->analyze_stmt= true;
           }
-#line 42644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2357:
-#line 14471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->describe|= DESCRIBE_EXTENDED; }
-#line 42650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2358:
-#line 14472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->describe|= DESCRIBE_PARTITIONS; }
-#line 42656 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2359:
-#line 14473 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42662 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2360:
-#line 14477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2361:
-#line 14479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("JSON")))
               Lex->explain_json= true;
@@ -42678,23 +42681,23 @@
               my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), "EXPLAIN",
                                (yyvsp[0].lex_str).str));
           }
-#line 42682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42685 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2362:
-#line 14491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2363:
-#line 14492 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->wild= (yyvsp[0].string); }
-#line 42694 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2364:
-#line 14494 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
                                                     (yyvsp[0].ident_sys).length,
@@ -42702,28 +42705,28 @@
             if (unlikely(Lex->wild == NULL))
               MYSQL_YYABORT;
           }
-#line 42706 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2365:
-#line 14508 "/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;
             lex->sql_command= SQLCOM_FLUSH;
             lex->type= 0;
             lex->no_write_to_binlog= (yyvsp[0].num);
           }
-#line 42717 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42720 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2366:
-#line 14515 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14536 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42723 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42726 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2367:
-#line 14520 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->type|= REFRESH_TABLES;
             /*
@@ -42733,23 +42736,23 @@
             YYPS->m_lock_type= TL_READ_NO_INSERT;
             YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO;
           }
-#line 42737 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42740 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2368:
-#line 14530 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14551 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2370:
-#line 14535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42749 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2371:
-#line 14537 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14558 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           TABLE_LIST *tables= Lex->query_tables;
           for (; tables; tables= tables->next_global)
@@ -42761,17 +42764,17 @@
             tables->open_type= OT_BASE_ONLY;
           }
         }
-#line 42765 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2372:
-#line 14552 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); }
-#line 42771 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42774 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2373:
-#line 14554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->query_tables == NULL))
             {
@@ -42781,53 +42784,53 @@
             } 
             Lex->type|= REFRESH_FOR_EXPORT;
           }
-#line 42785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42788 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2374:
-#line 14562 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42791 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42794 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2376:
-#line 14568 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42797 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42800 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2377:
-#line 14573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_ERROR_LOG; }
-#line 42803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42806 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2378:
-#line 14575 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14596 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_ENGINE_LOG; }
-#line 42809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2379:
-#line 14577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_GENERAL_LOG; }
-#line 42815 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42818 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2380:
-#line 14579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_SLOW_LOG; }
-#line 42821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42824 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2381:
-#line 14581 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_BINARY_LOG; }
-#line 42827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2382:
-#line 14583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->type & REFRESH_RELAY_LOG))
@@ -42835,44 +42838,44 @@
             lex->type|= REFRESH_RELAY_LOG;
             lex->relay_log_connection_name= lex->mi.connection_name;
            }
-#line 42839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42842 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2383:
-#line 14591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_QUERY_CACHE_FREE; }
-#line 42845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2384:
-#line 14593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_HOSTS; }
-#line 42851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42854 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2385:
-#line 14595 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_GRANT; }
-#line 42857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42860 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2386:
-#line 14597 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->type|= REFRESH_LOG;
             Lex->relay_log_connection_name= empty_clex_str;
           }
-#line 42866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2387:
-#line 14602 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14623 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_STATUS; }
-#line 42872 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42875 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2388:
-#line 14604 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             LEX *lex= Lex;
             if (unlikely(lex->type & REFRESH_SLAVE))
@@ -42880,29 +42883,29 @@
             lex->type|= REFRESH_SLAVE;
             lex->reset_slave_info.all= false;
           }
-#line 42884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42887 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2389:
-#line 14612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_MASTER; }
-#line 42890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42893 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2390:
-#line 14614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_DES_KEY_FILE; }
-#line 42896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42899 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2391:
-#line 14616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14637 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_USER_RESOURCES; }
-#line 42902 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42905 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2392:
-#line 14618 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              Lex->type|= REFRESH_GENERIC;
              ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-1].ident_sys));
@@ -42916,35 +42919,35 @@
                                                    thd->mem_root)))
                MYSQL_YYABORT;
            }
-#line 42920 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42923 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2393:
-#line 14634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2394:
-#line 14635 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14656 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2395:
-#line 14639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42941 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2396:
-#line 14641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42944 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2400:
-#line 14651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             uint32 value= (uint32) (yyvsp[0].ulonglong_number);
             if ((yyvsp[0].ulonglong_number) > UINT_MAX32)
@@ -42957,126 +42960,126 @@
             }
             insert_dynamic(&Lex->delete_gtid_domain, (uchar*) &value);
           }
-#line 42961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2401:
-#line 14666 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14687 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.num)= 0;}
-#line 42967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2402:
-#line 14667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14688 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.num)= REFRESH_CHECKPOINT; }
-#line 42973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42976 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2403:
-#line 14671 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14693 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_RESET; lex->type=0;
           }
-#line 42982 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2404:
-#line 14676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 42988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42991 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2407:
-#line 14685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14707 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_SLAVE; }
-#line 42994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 42997 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2408:
-#line 14687 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 43000 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2409:
-#line 14689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              Lex->type|= REFRESH_MASTER;
              Lex->next_binlog_file_number= 0;
           }
-#line 43009 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43012 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2411:
-#line 14694 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_QUERY_CACHE;}
-#line 43015 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2412:
-#line 14698 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14720 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->reset_slave_info.all= false; }
-#line 43021 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2413:
-#line 14699 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14721 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->reset_slave_info.all= true; }
-#line 43027 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2414:
-#line 14703 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14725 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2415:
-#line 14705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->next_binlog_file_number = (yyvsp[0].ulong_num);
           }
-#line 43041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2416:
-#line 14712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->type=0;
             lex->sql_command = SQLCOM_PURGE;
           }
-#line 43051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43054 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2417:
-#line 14718 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43060 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2419:
-#line 14727 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14749 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->to_log = (yyvsp[0].lex_str).str;
           }
-#line 43065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2420:
-#line 14731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14753 "/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 43076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43079 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2421:
-#line 14743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14765 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->value_list.empty();
@@ -43084,97 +43087,97 @@
             lex->sql_command= SQLCOM_KILL;
             lex->kill_type= KILL_TYPE_ID;
           }
-#line 43088 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43091 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2422:
-#line 14751 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14773 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->kill_signal= (killed_state) ((yyvsp[-2].num) | (yyvsp[-1].num));
           }
-#line 43096 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2423:
-#line 14757 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14779 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_HARD_BIT; }
-#line 43102 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2424:
-#line 14758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_HARD_BIT; }
-#line 43108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2425:
-#line 14759 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 43114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43117 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2426:
-#line 14762 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14785 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_CONNECTION; }
-#line 43120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2427:
-#line 14763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_CONNECTION; }
-#line 43126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2428:
-#line 14764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14787 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_QUERY; }
-#line 43132 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43135 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2429:
-#line 14766 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14789 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (int) KILL_QUERY;
             Lex->kill_type= KILL_TYPE_QUERY;
           }
-#line 43141 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2430:
-#line 14774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14797 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           Lex->value_list.push_front((yyval.item), thd->mem_root);
          }
-#line 43149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2431:
-#line 14778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14801 "/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 43158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2432:
-#line 14786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14809 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHUTDOWN; }
-#line 43164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2433:
-#line 14793 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14816 "/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].ident_sys);
           }
-#line 43174 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43177 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2434:
-#line 14804 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             mysql_init_select(lex);
@@ -43186,11 +43189,11 @@
               MYSQL_YYABORT;
             }
           }
-#line 43190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2435:
-#line 14816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14839 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_LOAD;
@@ -43201,11 +43204,11 @@
                          sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))))
               MYSQL_YYABORT;
           }
-#line 43205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43208 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2436:
-#line 14827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
@@ -43218,53 +43221,55 @@
             lex->value_list.empty();
             lex->many_values.empty();
           }
-#line 43222 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43225 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2437:
-#line 14840 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14863 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->exchange->cs= (yyvsp[0].charset); }
-#line 43228 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2438:
-#line 14844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
-    {}
-#line 43234 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 14867 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+    {
+            Lex->mark_first_table_as_inserting();
+          }
+#line 43239 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2439:
-#line 14848 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.filetype)= FILETYPE_CSV; }
-#line 43240 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43245 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2440:
-#line 14849 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.filetype)= FILETYPE_XML; }
-#line 43246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2441:
-#line 14853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)=0;}
-#line 43252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2442:
-#line 14854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)=1;}
-#line 43258 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2443:
-#line 14858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14883 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_DEFAULT; }
-#line 43264 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2444:
-#line 14860 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14885 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Ignore this option in SP to avoid problem with query cache and
@@ -43272,182 +43277,182 @@
             */
             (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
-#line 43276 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2445:
-#line 14867 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14892 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 43282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2446:
-#line 14871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->duplicates=DUP_ERROR; }
-#line 43288 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43293 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2447:
-#line 14872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14897 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->duplicates=DUP_REPLACE; }
-#line 43294 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43299 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2448:
-#line 14873 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ignore= 1; }
-#line 43300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2453:
-#line 14888 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14913 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->field_term= (yyvsp[0].string);
           }
-#line 43309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43314 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2454:
-#line 14893 "/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;
             DBUG_ASSERT(lex->exchange != 0);
             lex->exchange->enclosed= (yyvsp[0].string);
             lex->exchange->opt_enclosed= 1;
           }
-#line 43320 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43325 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2455:
-#line 14900 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14925 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->enclosed= (yyvsp[0].string);
           }
-#line 43329 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43334 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2456:
-#line 14905 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->escaped= (yyvsp[0].string);
           }
-#line 43338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2461:
-#line 14923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14948 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->line_term= (yyvsp[0].string);
           }
-#line 43347 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43352 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2462:
-#line 14928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14953 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->line_start= (yyvsp[0].string);
           }
-#line 43356 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2463:
-#line 14935 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14960 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 43362 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2464:
-#line 14937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14962 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->exchange->line_term = (yyvsp[0].string); }
-#line 43368 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2466:
-#line 14942 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14968 "/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 43377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2467:
-#line 14949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 43383 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43388 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2468:
-#line 14950 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 43389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2469:
-#line 14954 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43395 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2470:
-#line 14955 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14981 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43401 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43406 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2471:
-#line 14956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14982 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43407 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2472:
-#line 14961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14987 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 43413 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2473:
-#line 14963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 43419 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2474:
-#line 14967 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14993 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {(yyval.item)= (yyvsp[0].item);}
-#line 43425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2475:
-#line 14969 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 14995 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2476:
-#line 14977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15003 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2477:
-#line 14978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15004 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 43447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2480:
-#line 14988 "/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 (unlikely(lex->update_list.push_back((yyvsp[-4].item), thd->mem_root)) ||
@@ -43455,47 +43460,47 @@
                 MYSQL_YYABORT;
             (yyvsp[-1].item)->set_name_no_truncate(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
           }
-#line 43459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43464 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2481:
-#line 15001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal((yyvsp[0].lex_string_with_metadata)))))
               MYSQL_YYABORT;
           }
-#line 43468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43473 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2482:
-#line 15006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15032 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_nchar((yyvsp[0].lex_string_with_metadata)))))
               MYSQL_YYABORT;
           }
-#line 43477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43482 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2483:
-#line 15011 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_charset((yyvsp[0].lex_string_with_metadata), (yyvsp[-1].charset)))))
               MYSQL_YYABORT;
           }
-#line 43486 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43491 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2484:
-#line 15016 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15042 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= (yyvsp[-1].item_basic_constant)->make_string_literal_concat(thd, &(yyvsp[0].lex_str)))))
               MYSQL_YYABORT;
           }
-#line 43495 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43500 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2485:
-#line 15024 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15050 "/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,
@@ -43503,17 +43508,17 @@
             if (unlikely((yyval.string) == NULL))
               MYSQL_YYABORT;
           }
-#line 43507 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43512 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2486:
-#line 15031 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.string)= (yyvsp[0].string); }
-#line 43513 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43518 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2487:
-#line 15037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15063 "/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);
@@ -43526,11 +43531,11 @@
             tmp->quick_fix_field();
             (yyval.string)= tmp->val_str((String*) 0);
           }
-#line 43530 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43535 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2488:
-#line 15050 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15076 "/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);
@@ -43539,11 +43544,11 @@
             tmp->quick_fix_field();
             (yyval.string)= tmp->val_str((String*) 0);
           }
-#line 43543 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43548 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2489:
-#line 15059 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15085 "/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);
@@ -43556,76 +43561,76 @@
             tmp->quick_fix_field();
             (yyval.string)= tmp->val_str((String*) 0);
           }
-#line 43560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2490:
-#line 15075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, ¶m_clex_str,
                                                     YYLIP->get_tok_start(),
                                                     YYLIP->get_tok_start() + 1))))
               MYSQL_YYABORT;
           }
-#line 43571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2491:
-#line 15082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
                                                     (yyvsp[-1].kwd).pos(), (yyvsp[0].ident_cli).end()))))
               MYSQL_YYABORT;
           }
-#line 43581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2492:
-#line 15088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
                                                     (yyvsp[-1].kwd).pos(),
                                                     YYLIP->get_ptr()))))
               MYSQL_YYABORT;
           }
-#line 43592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2493:
-#line 15097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item_num); }
-#line 43598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2494:
-#line 15099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15125 "/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 43607 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43612 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2495:
-#line 15106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15132 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item_basic_constant); }
-#line 43613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43618 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2496:
-#line 15107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15133 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item_num); }
-#line 43619 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43624 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2497:
-#line 15108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 43625 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43630 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2498:
-#line 15110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               For the digest computation, in this context only,
@@ -43639,61 +43644,61 @@
               MYSQL_YYABORT;
             YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
           }
-#line 43643 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43648 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2499:
-#line 15124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15150 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "FALSE",0);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2500:
-#line 15130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15156 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "TRUE",1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43663 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43668 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2501:
-#line 15136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15162 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43673 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43678 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2502:
-#line 15142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15168 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2503:
-#line 15148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15174 "/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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43693 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2504:
-#line 15154 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15180 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Item_string_with_introducer *item_str;
             /*
@@ -43709,11 +43714,11 @@
 
             (yyval.item)= item_str;
           }
-#line 43713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43718 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2505:
-#line 15173 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             int error;
             (yyval.item_num)= new (thd->mem_root)
@@ -43723,11 +43728,11 @@
             if (unlikely((yyval.item_num) == NULL))
               MYSQL_YYABORT;
           }
-#line 43727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43732 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2506:
-#line 15183 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15209 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             int error;
             (yyval.item_num)= new (thd->mem_root)
@@ -43737,42 +43742,42 @@
             if (unlikely((yyval.item_num) == NULL))
               MYSQL_YYABORT;
           }
-#line 43741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43746 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2507:
-#line 15193 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15219 "/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 (unlikely((yyval.item_num) == NULL))
               MYSQL_YYABORT;
           }
-#line 43751 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2508:
-#line 15199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15225 "/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());
             if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
               MYSQL_YYABORT;
           }
-#line 43762 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43767 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2509:
-#line 15206 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15232 "/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 (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
               MYSQL_YYABORT;
           }
-#line 43772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2510:
-#line 15216 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
                                                        YYCSCL,
@@ -43780,11 +43785,11 @@
                                                        true))))
               MYSQL_YYABORT;
           }
-#line 43784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2511:
-#line 15224 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15250 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
                                                        YYCSCL,
@@ -43792,11 +43797,11 @@
                                                        true))))
               MYSQL_YYABORT;
           }
-#line 43796 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43801 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2512:
-#line 15232 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15258 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
                                                        YYCSCL,
@@ -43804,25 +43809,25 @@
                                                        true))))
               MYSQL_YYABORT;
           }
-#line 43808 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43813 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2513:
-#line 15243 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15269 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.with_clause)= 0; }
-#line 43814 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43819 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2514:
-#line 15245 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.with_clause)= (yyvsp[0].with_clause);
           }
-#line 43822 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43827 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2515:
-#line 15253 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15279 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
              With_clause *with_clause=
              new With_clause((yyvsp[0].num), Lex->curr_with_clause);
@@ -43832,43 +43837,43 @@
              Lex->curr_with_clause= with_clause;
              with_clause->add_to_list(Lex->with_clauses_list_last_next);
           }
-#line 43836 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2516:
-#line 15263 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15289 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.with_clause)= Lex->curr_with_clause;
             Lex->curr_with_clause= Lex->curr_with_clause->pop();
           }
-#line 43845 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43850 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2517:
-#line 15271 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15297 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 43851 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43856 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2518:
-#line 15272 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 43857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2521:
-#line 15285 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyvsp[0].lex_str_list)= new List (Lex->with_column_list);
             if (unlikely((yyvsp[0].lex_str_list) == NULL))
               MYSQL_YYABORT;
             Lex->with_column_list.empty();
           }
-#line 43868 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43873 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2522:
-#line 15292 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
@@ -43882,203 +43887,203 @@
                                         spec_start - query_start))
               MYSQL_YYABORT;
 	  }
-#line 43886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2523:
-#line 15310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str_list)= NULL; }
-#line 43892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2524:
-#line 15312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str_list)= NULL; }
-#line 43898 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43903 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2525:
-#line 15318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15344 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->with_column_list.push_back((LEX_CSTRING*)
                     thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)));
 	  }
-#line 43907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2526:
-#line 15323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15349 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->with_column_list.push_back((LEX_CSTRING*)
                     thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)));
           }
-#line 43916 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2527:
-#line 15332 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
             if (unlikely((yyval.lex_str_ptr) == NULL))
               MYSQL_YYABORT;
           }
-#line 43926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43931 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2528:
-#line 15346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15372 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 43932 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43937 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2529:
-#line 15347 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15373 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 43938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2530:
-#line 15352 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15378 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43947 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43952 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2531:
-#line 15357 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2532:
-#line 15365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43965 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2533:
-#line 15370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15396 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43974 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2534:
-#line 15377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 43980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2535:
-#line 15383 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15409 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43989 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 43994 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2536:
-#line 15388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15414 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2537:
-#line 15393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex_ident_cli empty((yyvsp[-2].ident_cli).pos(), 0);
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &empty, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 44008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2538:
-#line 15399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 44017 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44022 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2539:
-#line 15404 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15430 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 44026 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2540:
-#line 15412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident_nosp(thd, &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 44035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2541:
-#line 15417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident_nospvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 44044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44049 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2542:
-#line 15422 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 44053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2543:
-#line 15427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex_ident_sys none;
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &none, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 44063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2544:
-#line 15433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15459 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 44072 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2545:
-#line 15440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15466 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys);}
-#line 44078 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2546:
-#line 15442 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15468 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             TABLE_LIST *table= Select->table_list.first;
             if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-4].ident_sys).str,
@@ -44089,11 +44094,11 @@
               my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
             (yyval.lex_str)=(yyvsp[0].ident_sys);
           }
-#line 44093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2547:
-#line 15453 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15479 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             TABLE_LIST *table= Select->table_list.first;
             if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
@@ -44101,193 +44106,193 @@
               my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
             (yyval.lex_str)=(yyvsp[0].ident_sys);
           }
-#line 44105 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44110 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2548:
-#line 15460 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys);}
-#line 44111 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44116 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2549:
-#line 15465 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15491 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 44121 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44126 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2550:
-#line 15471 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15497 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys), 0);
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 44131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2551:
-#line 15477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15503 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /* For Delphi */
             (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 44142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44147 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2552:
-#line 15487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15513 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 44152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2553:
-#line 15493 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15519 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 44162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2554:
-#line 15502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING db={(char*) any_db,3};
             (yyval.table)= new (thd->mem_root) Table_ident(thd, &db, &(yyvsp[0].ident_sys), 0);
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 44173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2559:
-#line 15518 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15544 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ident_cli)= (yyvsp[0].kwd); }
-#line 44179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2560:
-#line 15523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
               MYSQL_YYABORT;
           }
-#line 44188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2561:
-#line 15531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15557 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (thd->make_text_string_sys(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
               MYSQL_YYABORT;
           }
-#line 44197 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44202 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2562:
-#line 15539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (thd->make_text_string_connection(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
               MYSQL_YYABORT;
           }
-#line 44206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2563:
-#line 15547 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15573 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (thd->make_text_string_filesystem(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
               MYSQL_YYABORT;
           }
-#line 44215 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44220 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2565:
-#line 15556 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 44224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2567:
-#line 15565 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15591 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 44233 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44238 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2569:
-#line 15574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 44242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2570:
-#line 15579 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_sys(thd, &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 44251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2572:
-#line 15589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 44260 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44265 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2574:
-#line 15598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15624 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 44269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2575:
-#line 15605 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15631 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys);}
-#line 44275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2576:
-#line 15606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15632 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 44281 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44286 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2577:
-#line 15607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 44287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2578:
-#line 15612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
@@ -44300,11 +44305,11 @@
                                                   system_charset_info, 0)))
               MYSQL_YYABORT;
           }
-#line 44304 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44309 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2579:
-#line 15625 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
@@ -44334,11 +44339,11 @@
               (yyval.lex_user)->host= host_not_specified;
             }
           }
-#line 44338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44343 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2580:
-#line 15655 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
@@ -44346,46 +44351,46 @@
             (yyval.lex_user)->plugin= empty_clex_str;
             (yyval.lex_user)->auth= empty_clex_str;
           }
-#line 44350 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 2583:
-#line 15667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 15693 "/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 44360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44365 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3057:
-#line 16273 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16299 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->set_stmt_init();
             lex->var_list.empty();
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 44371 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44376 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3058:
-#line 16280 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16306 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 44377 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44382 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3059:
-#line 16282 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16308 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_init();
           }
-#line 44385 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44390 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3060:
-#line 16286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16312 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->table_or_sp_used()))
@@ -44393,267 +44398,267 @@
             lex->stmt_var_list= lex->var_list;
             lex->var_list.empty();
           }
-#line 44397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3061:
-#line 16294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 44403 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44408 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3064:
-#line 16310 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16336 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3066:
-#line 16316 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_type= OPT_DEFAULT;
           }
-#line 44420 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44425 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3067:
-#line 16320 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16346 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3068:
-#line 16325 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16351 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_type= (yyvsp[0].var_type);
           }
-#line 44437 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44442 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3070:
-#line 16335 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16361 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44451 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3072:
-#line 16341 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16367 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44455 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44460 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3075:
-#line 16355 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 44463 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44468 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3076:
-#line 16359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44472 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44477 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3077:
-#line 16364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16390 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 44480 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44485 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3078:
-#line 16368 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44489 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3079:
-#line 16377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16403 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->option_type= (yyvsp[0].var_type);
           }
-#line 44497 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44502 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3082:
-#line 16385 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16411 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_GLOBAL; }
-#line 44503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3083:
-#line 16386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3084:
-#line 16387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16413 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3085:
-#line 16391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3086:
-#line 16392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16418 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_GLOBAL; }
-#line 44527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3087:
-#line 16393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16419 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3088:
-#line 16394 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3089:
-#line 16398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_DEFAULT; }
-#line 44545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3090:
-#line 16399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16425 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_GLOBAL; }
-#line 44551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3091:
-#line 16400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3092:
-#line 16401 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3093:
-#line 16407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable(Lex->option_type, &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44572 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44577 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3094:
-#line 16412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16438 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable(thd, Lex->option_type, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3095:
-#line 16417 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16443 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44590 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44595 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3096:
-#line 16426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3097:
-#line 16431 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44613 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3098:
-#line 16436 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16462 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3099:
-#line 16441 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_user_variable(thd, &(yyvsp[-2].lex_str), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44631 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3100:
-#line 16446 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable((yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3101:
-#line 16451 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16477 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable(thd, (yyvsp[-5].var_type), &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44649 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3102:
-#line 16456 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16482 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_default_system_variable((yyvsp[-5].var_type), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3103:
-#line 16461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16487 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             CHARSET_INFO *cs2;
@@ -44667,11 +44672,11 @@
               MYSQL_YYABORT;
             lex->var_list.push_back(var, thd->mem_root);
           }
-#line 44671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3104:
-#line 16475 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16501 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_pcontext *spc= lex->spcont;
@@ -44682,11 +44687,11 @@
               thd->parse_error();
             MYSQL_YYABORT;
           }
-#line 44686 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44691 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3105:
-#line 16486 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             CHARSET_INFO *cs2;
@@ -44705,11 +44710,11 @@
                 unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44714 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3106:
-#line 16505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16531 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             LEX_USER *user;
@@ -44727,11 +44732,11 @@
             if (lex->sphead)
               lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
           }
-#line 44731 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3107:
-#line 16523 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             set_var_default_role *var= (new (thd->mem_root)
@@ -44743,11 +44748,11 @@
             if (lex->sphead)
               lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
           }
-#line 44747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3108:
-#line 16535 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16561 "/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));
@@ -44755,20 +44760,20 @@
                 unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44759 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3109:
-#line 16543 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-2].kwd), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44768 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44773 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3110:
-#line 16548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16574 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             set_var_password *var= (new (thd->mem_root)
@@ -44780,11 +44785,11 @@
             if (lex->sphead)
               lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
           }
-#line 44784 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44789 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3115:
-#line 16571 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16597 "/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));
@@ -44800,11 +44805,11 @@
             if (unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3116:
-#line 16590 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16616 "/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));
@@ -44819,47 +44824,47 @@
                 unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44823 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44828 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3117:
-#line 16607 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16633 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= true; }
-#line 44829 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44834 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3118:
-#line 16608 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= false; }
-#line 44835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44840 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3119:
-#line 16612 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
-#line 44841 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44846 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3120:
-#line 16613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_READ_COMMITTED; }
-#line 44847 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44852 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3121:
-#line 16614 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16640 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
-#line 44853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44858 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3122:
-#line 16615 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_SERIALIZABLE; }
-#line 44859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3123:
-#line 16620 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16646 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             sp_pcontext *spc= lex->spcont;
@@ -44874,82 +44879,82 @@
             lex->definer->plugin= empty_clex_str;
             lex->definer->auth=   empty_clex_str;
           }
-#line 44878 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44883 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3124:
-#line 16634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16660 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->definer= (yyvsp[-1].lex_user); }
-#line 44884 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44889 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3125:
-#line 16638 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16664 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->definer->pwhash= (yyvsp[0].lex_string_with_metadata);}
-#line 44890 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44895 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3126:
-#line 16639 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->definer->pwtext= (yyvsp[-1].lex_string_with_metadata); }
-#line 44896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3127:
-#line 16641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16667 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->definer->pwtext= (yyvsp[-1].lex_string_with_metadata);
             Lex->definer->pwhash.str= Item_func_password::alloc(thd,
                                    (yyvsp[-1].lex_string_with_metadata).str, (yyvsp[-1].lex_string_with_metadata).length, Item_func_password::OLD);
             Lex->definer->pwhash.length=  SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
           }
-#line 44907 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3128:
-#line 16650 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 44913 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44918 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3129:
-#line 16651 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16677 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.item)=0; }
-#line 44919 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44924 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3130:
-#line 16653 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16679 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON",  2);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 44929 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44934 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3131:
-#line 16659 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 44939 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44944 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3132:
-#line 16665 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 44949 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3133:
-#line 16676 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -44957,55 +44962,55 @@
               my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK"));
             lex->sql_command= SQLCOM_LOCK_TABLES;
           }
-#line 44961 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44966 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3134:
-#line 16684 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 44967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3135:
-#line 16689 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16715 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 44973 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44978 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3136:
-#line 16691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16717 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), (yyvsp[0].ulong_num))) ||
               unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), (yyvsp[0].ulong_num))))
             MYSQL_YYABORT;
         }
-#line 44983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3137:
-#line 16697 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16723 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
           if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), 0)) ||
               unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), 0)))
             MYSQL_YYABORT;
         }
-#line 44993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 44998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3138:
-#line 16705 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16731 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 44999 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45004 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3139:
-#line 16706 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16732 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { }
-#line 45005 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45010 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3142:
-#line 16716 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16742 "/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);
@@ -45021,43 +45026,43 @@
                                            lock_type, mdl_type)))
               MYSQL_YYABORT;
           }
-#line 45025 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45030 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3143:
-#line 16734 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16760 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_READ_NO_INSERT; }
-#line 45031 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45036 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3144:
-#line 16735 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16761 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_WRITE_DEFAULT; }
-#line 45037 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45042 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3145:
-#line 16737 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16763 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
-#line 45045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3146:
-#line 16741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16767 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_WRITE_LOW_PRIORITY; }
-#line 45051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3147:
-#line 16742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16768 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_READ; }
-#line 45057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3148:
-#line 16747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16773 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -45065,17 +45070,17 @@
               my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK"));
             lex->sql_command= SQLCOM_UNLOCK_TABLES;
           }
-#line 45069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3149:
-#line 16755 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3150:
-#line 16764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16790 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sphead))
@@ -45085,11 +45090,11 @@
                                                                  0)))
               MYSQL_YYABORT;
           }
-#line 45089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3151:
-#line 16774 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16800 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sphead))
@@ -45099,11 +45104,11 @@
                                                                  0)))
               MYSQL_YYABORT;
           }
-#line 45103 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45108 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3152:
-#line 16784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16810 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->sphead))
@@ -45121,11 +45126,11 @@
                                                                  0)))
               MYSQL_YYABORT;
           }
-#line 45125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3153:
-#line 16802 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->expr_allows_subselect= TRUE;
             /* Stored functions are not supported for HANDLER READ. */
@@ -45136,59 +45141,59 @@
               MYSQL_YYABORT;
             }
           }
-#line 45140 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45145 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3154:
-#line 16815 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ident= null_clex_str; }
-#line 45146 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45151 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3155:
-#line 16816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ident= (yyvsp[-1].ident_sys); }
-#line 45152 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45157 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3156:
-#line 16820 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RFIRST; }
-#line 45158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3157:
-#line 16821 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16847 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RNEXT;  }
-#line 45164 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45169 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3158:
-#line 16825 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16851 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RFIRST; }
-#line 45170 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45175 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3159:
-#line 16826 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16852 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RNEXT;  }
-#line 45176 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45181 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3160:
-#line 16827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RPREV;  }
-#line 45182 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45187 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3161:
-#line 16828 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16854 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RLAST;  }
-#line 45188 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45193 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3162:
-#line 16830 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16856 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->ha_read_mode = RKEY;
@@ -45196,211 +45201,211 @@
             if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)))
               MYSQL_YYABORT;
           }
-#line 45200 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45205 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3163:
-#line 16838 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45206 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3164:
-#line 16842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16868 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT;   }
-#line 45212 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45217 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3165:
-#line 16843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
-#line 45218 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45223 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3166:
-#line 16844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
-#line 45224 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45229 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3167:
-#line 16845 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16871 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY;   }
-#line 45230 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45235 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3168:
-#line 16846 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16872 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY;  }
-#line 45236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3169:
-#line 16853 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16879 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45242 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45247 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3170:
-#line 16858 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_REVOKE;
             lex->type= 0;
           }
-#line 45252 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3171:
-#line 16864 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                                                 TYPE_ENUM_FUNCTION)))
               MYSQL_YYABORT;
           }
-#line 45262 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45267 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3172:
-#line 16870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16896 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                          TYPE_ENUM_PROCEDURE)))
               MYSQL_YYABORT;
           }
-#line 45272 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45277 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3173:
-#line 16877 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16903 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                                                 TYPE_ENUM_PACKAGE)))
               MYSQL_YYABORT;
           }
-#line 45282 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45287 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3174:
-#line 16884 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                                                 TYPE_ENUM_PACKAGE_BODY)))
               MYSQL_YYABORT;
           }
-#line 45292 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45297 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3175:
-#line 16890 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16916 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_REVOKE_ALL;
           }
-#line 45300 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3176:
-#line 16894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16920 "/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 45311 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45316 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3177:
-#line 16901 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16927 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_REVOKE_ROLE;
             if (unlikely(Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45321 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45326 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3178:
-#line 16910 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16936 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 45327 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45332 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3179:
-#line 16912 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16938 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 45333 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45338 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3180:
-#line 16917 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16943 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45339 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45344 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3181:
-#line 16923 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16949 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_GRANT;
             lex->type= 0;
           }
-#line 45349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3182:
-#line 16930 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_FUNCTION)))
               MYSQL_YYABORT;
           }
-#line 45359 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45364 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3183:
-#line 16937 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16963 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_PROCEDURE)))
               MYSQL_YYABORT;
           }
-#line 45369 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45374 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3184:
-#line 16944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_PACKAGE)))
               MYSQL_YYABORT;
           }
-#line 45379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3185:
-#line 16951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16977 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_PACKAGE_BODY)))
               MYSQL_YYABORT;
           }
-#line 45389 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45394 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3186:
-#line 16957 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16983 "/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 45400 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3187:
-#line 16964 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 16990 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_GRANT_ROLE;
@@ -45408,64 +45413,64 @@
             if (unlikely(Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45412 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3188:
-#line 16975 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17001 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->definer = 0; }
-#line 45418 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3189:
-#line 16976 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17002 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->definer = (yyvsp[0].lex_user); }
-#line 45424 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3190:
-#line 16979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= false; }
-#line 45430 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3191:
-#line 16980 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= true; }
-#line 45436 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3192:
-#line 16984 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17012 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45445 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45450 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3193:
-#line 16989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45454 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45459 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3194:
-#line 16997 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
             (yyval.lex_user)->user= current_role;
             (yyval.lex_user)->reset_auth();
           }
-#line 45465 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45470 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3195:
-#line 17007 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17035 "/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) */
@@ -45484,281 +45489,281 @@
                                                   cs, 0)))
               MYSQL_YYABORT;
           }
-#line 45488 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45493 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3199:
-#line 17034 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17062 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45494 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45499 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3200:
-#line 17036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             Lex->all_privileges= 1; 
             Lex->grant= GLOBAL_ACLS;
           }
-#line 45503 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45508 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3205:
-#line 17054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->which_columns = SELECT_ACL;}
-#line 45509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3206:
-#line 17055 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3207:
-#line 17057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->which_columns = INSERT_ACL;}
-#line 45521 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45526 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3208:
-#line 17058 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3209:
-#line 17060 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->which_columns = UPDATE_ACL; }
-#line 45533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3210:
-#line 17061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3211:
-#line 17063 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->which_columns = REFERENCES_ACL;}
-#line 45545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3212:
-#line 17064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17092 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45551 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45556 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3213:
-#line 17065 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17093 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= DELETE_ACL;}
-#line 45557 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45562 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3214:
-#line 17066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17094 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45563 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45568 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3215:
-#line 17067 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= INDEX_ACL;}
-#line 45569 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45574 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3216:
-#line 17068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= ALTER_ACL;}
-#line 45575 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45580 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3217:
-#line 17069 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_ACL;}
-#line 45581 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3218:
-#line 17070 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17098 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= DROP_ACL;}
-#line 45587 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45592 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3219:
-#line 17071 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17099 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= EXECUTE_ACL;}
-#line 45593 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45598 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3220:
-#line 17072 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17100 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= RELOAD_ACL;}
-#line 45599 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45604 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3221:
-#line 17073 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17101 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= SHUTDOWN_ACL;}
-#line 45605 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45610 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3222:
-#line 17074 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= PROCESS_ACL;}
-#line 45611 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45616 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3223:
-#line 17075 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= FILE_ACL;}
-#line 45617 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45622 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3224:
-#line 17076 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17104 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= GRANT_ACL;}
-#line 45623 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45628 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3225:
-#line 17077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= SHOW_DB_ACL;}
-#line 45629 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45634 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3226:
-#line 17078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= SUPER_ACL;}
-#line 45635 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45640 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3227:
-#line 17079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_TMP_ACL;}
-#line 45641 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45646 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3228:
-#line 17080 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= LOCK_TABLES_ACL; }
-#line 45647 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45652 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3229:
-#line 17081 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17109 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= REPL_SLAVE_ACL; }
-#line 45653 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45658 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3230:
-#line 17082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17110 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= REPL_CLIENT_ACL; }
-#line 45659 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45664 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3231:
-#line 17083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_VIEW_ACL; }
-#line 45665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3232:
-#line 17084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= SHOW_VIEW_ACL; }
-#line 45671 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45676 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3233:
-#line 17085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_PROC_ACL; }
-#line 45677 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45682 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3234:
-#line 17086 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17114 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= ALTER_PROC_ACL; }
-#line 45683 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45688 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3235:
-#line 17087 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_USER_ACL; }
-#line 45689 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45694 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3236:
-#line 17088 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17116 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= EVENT_ACL;}
-#line 45695 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45700 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3237:
-#line 17089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= TRIGGER_ACL; }
-#line 45701 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45706 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3238:
-#line 17090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_TABLESPACE_ACL; }
-#line 45707 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45712 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3239:
-#line 17091 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17119 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= DELETE_HISTORY_ACL; }
-#line 45713 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45718 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3240:
-#line 17095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45719 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45724 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3241:
-#line 17096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17124 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 45725 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45730 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3244:
-#line 17106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17134 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->x509_subject))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
             lex->x509_subject=(yyvsp[0].lex_string_with_metadata).str;
           }
-#line 45736 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45741 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3245:
-#line 17113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17141 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->x509_issuer))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
             lex->x509_issuer=(yyvsp[0].lex_string_with_metadata).str;
           }
-#line 45747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3246:
-#line 17120 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17148 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->ssl_cipher))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
             lex->ssl_cipher=(yyvsp[0].lex_string_with_metadata).str;
           }
-#line 45758 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45763 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3247:
-#line 17130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->copy_db_to(&lex->current_select->db)))
@@ -45768,11 +45773,11 @@
             else if (unlikely(lex->columns.elements))
               my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
           }
-#line 45772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3248:
-#line 17140 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17168 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->current_select->db= (yyvsp[-2].ident_sys);
@@ -45781,11 +45786,11 @@
             else if (unlikely(lex->columns.elements))
               my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
           }
-#line 45785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45790 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3249:
-#line 17149 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17177 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->current_select->db= null_clex_str;
@@ -45794,11 +45799,11 @@
             else if (unlikely(lex->columns.elements))
               my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
           }
-#line 45798 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45803 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3250:
-#line 17158 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17186 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!lex->current_select->
@@ -45808,120 +45813,120 @@
             if (lex->grant == GLOBAL_ACLS)
               lex->grant =  TABLE_ACLS & ~GRANT_ACL;
           }
-#line 45812 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45817 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3251:
-#line 17171 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17199 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45821 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45826 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3252:
-#line 17176 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17204 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45830 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45835 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3253:
-#line 17184 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17212 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45839 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45844 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3254:
-#line 17189 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17217 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3255:
-#line 17197 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45857 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45862 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3256:
-#line 17202 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17230 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45866 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45871 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3261:
-#line 17213 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17241 "/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_string_with_metadata);
             if (unlikely(Lex->sql_command == SQLCOM_REVOKE))
               MYSQL_YYABORT;
           }
-#line 45877 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45882 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3262:
-#line 17220 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17248 "/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_string_with_metadata);
           }
-#line 45886 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45891 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3263:
-#line 17225 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17253 "/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_clex_str;
           }
-#line 45896 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3264:
-#line 17231 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17259 "/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 45906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45911 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3265:
-#line 17237 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17265 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 45912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3266:
-#line 17242 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17270 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->grant |= lex->which_columns;
           }
-#line 45921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3270:
-#line 17256 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17284 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             String *new_str= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,(yyvsp[0].ident_sys).length,system_charset_info);
             if (unlikely(new_str == NULL))
@@ -45947,245 +45952,245 @@
               lex->columns.push_back(col, thd->mem_root);
             }
           }
-#line 45951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45956 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3272:
-#line 17286 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17314 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_SPECIFIED;
           }
-#line 45959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45964 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3273:
-#line 17290 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17318 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_ANY;
           }
-#line 45967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45972 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3274:
-#line 17294 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17322 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_X509;
           }
-#line 45975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45980 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3275:
-#line 17298 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17326 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_NONE;
           }
-#line 45983 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45988 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3276:
-#line 17305 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17333 "/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 45993 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 45998 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3277:
-#line 17311 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17339 "/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 46003 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46008 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3278:
-#line 17317 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17345 "/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 46013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3279:
-#line 17323 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17351 "/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 46023 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46028 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3280:
-#line 17329 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17357 "/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 46033 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46038 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3281:
-#line 17337 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17365 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46039 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46044 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3282:
-#line 17338 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17366 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46045 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46050 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3283:
-#line 17342 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17370 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46051 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46056 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3285:
-#line 17348 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17376 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46057 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46062 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3286:
-#line 17349 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17377 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46063 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46068 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3287:
-#line 17353 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17381 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46069 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46074 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3288:
-#line 17354 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17382 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= GRANT_ACL;}
-#line 46075 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46080 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3289:
-#line 17358 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17386 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46081 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46086 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3290:
-#line 17359 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46087 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46092 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3291:
-#line 17363 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17391 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->grant |= GRANT_ACL;}
-#line 46093 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46098 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3292:
-#line 17364 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46099 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46104 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3293:
-#line 17369 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17397 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_BEGIN;
             lex->start_transaction_opt= 0;
           }
-#line 46109 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46114 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3294:
-#line 17374 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17402 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46115 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46120 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3295:
-#line 17379 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17407 "/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 46125 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46130 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3296:
-#line 17387 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17415 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 46131 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46136 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3297:
-#line 17388 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17416 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 46137 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46142 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3298:
-#line 17392 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17420 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46143 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46148 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3299:
-#line 17393 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17421 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46149 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46154 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3300:
-#line 17398 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17426 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
-#line 46155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46160 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3301:
-#line 17399 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17427 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_NO; }
-#line 46161 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46166 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3302:
-#line 17400 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17428 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_YES; }
-#line 46167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46172 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3303:
-#line 17405 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
-#line 46173 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46178 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3304:
-#line 17406 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17434 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_YES; }
-#line 46179 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46184 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3305:
-#line 17407 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17435 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_NO; }
-#line 46185 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46190 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3306:
-#line 17412 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17440 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_COMMIT;
@@ -46194,11 +46199,11 @@
             lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
             lex->tx_release= (yyvsp[0].m_yes_no_unk);
           }
-#line 46198 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46203 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3307:
-#line 17424 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17452 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK;
@@ -46207,84 +46212,84 @@
             lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
             lex->tx_release= (yyvsp[0].m_yes_no_unk);
           }
-#line 46211 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46216 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3308:
-#line 17433 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17461 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 46221 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46226 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3309:
-#line 17439 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17467 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 46231 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46236 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3310:
-#line 17448 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17476 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 46241 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46246 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3311:
-#line 17457 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17485 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 46251 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46256 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3312:
-#line 17470 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17498 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.unit_type)= UNION_TYPE; }
-#line 46257 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46262 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3313:
-#line 17472 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.unit_type)= INTERSECT_TYPE; }
-#line 46263 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46268 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3314:
-#line 17474 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17502 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.unit_type)= EXCEPT_TYPE; }
-#line 46269 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46274 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3315:
-#line 17478 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17506 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46275 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46280 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3317:
-#line 17484 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17512 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_select_to_union_list((bool)(yyvsp[0].num), (yyvsp[-1].unit_type), TRUE)))
               MYSQL_YYABORT;
           }
-#line 46284 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46289 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3318:
-#line 17489 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17517 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               Remove from the name resolution context stack the context of the
@@ -46292,28 +46297,28 @@
             */
             Lex->pop_context();
           }
-#line 46296 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46301 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3319:
-#line 17500 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17528 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_select_to_union_list((bool)(yyvsp[0].num), (yyvsp[-1].unit_type), TRUE)))
               MYSQL_YYABORT;
           }
-#line 46305 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46310 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3320:
-#line 17505 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17533 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->pop_context();
           }
-#line 46313 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46318 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3321:
-#line 17511 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17539 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
@@ -46327,136 +46332,136 @@
             }
             thd->where= "global ORDER clause";
           }
-#line 46331 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46336 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3322:
-#line 17525 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17553 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             thd->lex->current_select->no_table_names_allowed= 0;
             thd->where= "";
           }
-#line 46340 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46345 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3325:
-#line 17541 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17569 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_select_to_union_list((bool)(yyvsp[0].num), (yyvsp[-1].unit_type), FALSE)))
               MYSQL_YYABORT;
           }
-#line 46349 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46354 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3326:
-#line 17548 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17576 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)=1; }
-#line 46355 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46360 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3327:
-#line 17549 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17577 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)=1; }
-#line 46361 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46366 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3328:
-#line 17550 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17578 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)=0; }
-#line 46367 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46372 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3329:
-#line 17554 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 46373 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46378 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3330:
-#line 17555 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17583 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 46379 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46384 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3331:
-#line 17560 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->tvc_start();
 	  }
-#line 46387 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46392 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3332:
-#line 17564 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17592 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.select_lex)= Lex->current_select;
             if (Lex->tvc_finalize())
               MYSQL_YYABORT;
 	  }
-#line 46397 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46402 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3333:
-#line 17582 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17610 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
-#line 46405 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46410 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3334:
-#line 17588 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17616 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-2].select_lex); }
-#line 46411 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46416 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3335:
-#line 17589 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17617 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-2].select_lex); }
-#line 46417 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46422 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3336:
-#line 17593 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17621 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 46423 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46428 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3337:
-#line 17594 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17622 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 46429 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46434 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3338:
-#line 17598 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17626 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 46435 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46440 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3339:
-#line 17599 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17627 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 46441 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46446 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3340:
-#line 17600 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17628 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 46447 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46452 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3341:
-#line 17606 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { 
             (yyvsp[-1].select_lex)->set_with_clause((yyvsp[-2].with_clause));
             (yyval.select_lex)= (yyvsp[-1].select_lex);
           }
-#line 46456 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46461 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3342:
-#line 17613 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17641 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!lex->expr_allows_subselect ||
@@ -46475,11 +46480,11 @@
             if (unlikely(mysql_new_select(Lex, 1, NULL)))
               MYSQL_YYABORT;
           }
-#line 46479 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46484 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3343:
-#line 17634 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17662 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -46505,17 +46510,17 @@
                 temp->select_n_having_items;
             }
           }
-#line 46509 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46514 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3348:
-#line 17672 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17700 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_STRAIGHT_JOIN; }
-#line 46515 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46520 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3349:
-#line 17674 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17702 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_simple_select(&(yyvsp[0].kwd))))
               MYSQL_YYABORT;
@@ -46523,55 +46528,55 @@
             YYPS->m_mdl_type= MDL_SHARED_READ;
             Select->options|= SELECT_HIGH_PRIORITY;
           }
-#line 46527 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46532 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3350:
-#line 17681 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17709 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_DISTINCT; }
-#line 46533 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46538 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3351:
-#line 17682 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17710 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_SMALL_RESULT; }
-#line 46539 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46544 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3352:
-#line 17683 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17711 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_BIG_RESULT; }
-#line 46545 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46550 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3353:
-#line 17685 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17713 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_simple_select(&(yyvsp[0].kwd))))
               MYSQL_YYABORT;
             Select->options|= OPTION_BUFFER_RESULT;
           }
-#line 46555 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46560 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3354:
-#line 17691 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17719 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_simple_select(&(yyvsp[0].kwd))))
               MYSQL_YYABORT;
             Select->options|= OPTION_FOUND_ROWS;
           }
-#line 46565 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46570 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3355:
-#line 17696 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17724 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_ALL; }
-#line 46571 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46576 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3358:
-#line 17712 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17740 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             /*
               We have to distinguish missing DEFINER-clause from case when
@@ -46582,100 +46587,100 @@
             */
             thd->lex->definer= 0;
           }
-#line 46586 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46591 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3359:
-#line 17726 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17754 "/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 46597 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46602 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3360:
-#line 17741 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17769 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= DTYPE_ALGORITHM_UNDEFINED; }
-#line 46603 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46608 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3361:
-#line 17742 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_ALGORITHM_MERGE; }
-#line 46609 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46614 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3362:
-#line 17743 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17771 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_ALGORITHM_TMPTABLE; }
-#line 46615 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46620 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3363:
-#line 17747 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17775 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= VIEW_SUID_DEFAULT; }
-#line 46621 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46626 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3364:
-#line 17748 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17776 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= (yyvsp[0].view_suid); }
-#line 46627 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46632 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3365:
-#line 17752 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17780 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= VIEW_SUID_DEFINER; }
-#line 46633 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46638 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3366:
-#line 17753 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17781 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= VIEW_SUID_INVOKER; }
-#line 46639 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46644 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3367:
-#line 17758 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17786 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 46645 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46650 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3369:
-#line 17764 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17792 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->view_list.push_back((LEX_CSTRING*)
                                      thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
                                      thd->mem_root);
           }
-#line 46655 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46660 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3370:
-#line 17770 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17798 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->view_list.push_back((LEX_CSTRING*)
                                      thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
                                      thd->mem_root);
           }
-#line 46665 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46670 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3371:
-#line 17778 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17806 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->parsing_options.allows_variable= FALSE;
             lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
           }
-#line 46675 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46680 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3372:
-#line 17784 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17812 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             size_t len= YYLIP->get_cpp_ptr() - lex->create_view->select.str;
@@ -46688,99 +46693,99 @@
             lex->parsing_options.allows_variable= TRUE;
             lex->current_select->set_with_clause((yyvsp[-2].with_clause));
           }
-#line 46692 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46697 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3380:
-#line 17813 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_NONE; }
-#line 46698 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46703 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3381:
-#line 17814 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17842 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_CASCADED; }
-#line 46704 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46709 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3382:
-#line 17815 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17843 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_CASCADED; }
-#line 46710 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46715 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3383:
-#line 17816 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17844 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_LOCAL; }
-#line 46716 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46721 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3384:
-#line 17827 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17855 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trigger_action_order_type)= TRG_ORDER_FOLLOWS; }
-#line 46722 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46727 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3385:
-#line 17829 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17857 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.trigger_action_order_type)= TRG_ORDER_PRECEDES; }
-#line 46728 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46733 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3386:
-#line 17834 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17862 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
               (yyval.trg_execution_order).ordering_clause= TRG_ORDER_NONE;
               (yyval.trg_execution_order).anchor_trigger_name.str= NULL;
               (yyval.trg_execution_order).anchor_trigger_name.length= 0;
             }
-#line 46738 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46743 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3387:
-#line 17841 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17869 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
               (yyval.trg_execution_order).ordering_clause= (yyvsp[-1].trigger_action_order_type);
               (yyval.trg_execution_order).anchor_trigger_name= (yyvsp[0].lex_str);
             }
-#line 46747 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46752 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3388:
-#line 17850 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17878 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 46756 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46761 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3389:
-#line 17859 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17887 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { /* $9 */
             Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
           }
-#line 46764 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46769 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3390:
-#line 17865 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17893 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { /* $13 */
             Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
           }
-#line 46772 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46777 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3391:
-#line 17870 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17898 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->trg_chistics.ordering_clause_begin= YYLIP->get_cpp_ptr();
           }
-#line 46780 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46785 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3392:
-#line 17874 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17902 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { /* $18 */
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -46800,11 +46805,11 @@
 
             lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
           }
-#line 46804 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46809 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3393:
-#line 17894 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17922 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { /* $20 */
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -46828,11 +46833,11 @@
                                            MDL_SHARED_NO_WRITE)))
               MYSQL_YYABORT;
           }
-#line 46832 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46837 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3394:
-#line 17928 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17956 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             if (unlikely(lex->add_create_options_with_check((yyvsp[-5].object_ddl_options))))
@@ -46844,43 +46849,43 @@
             lex->udf.returns= (Item_result) (yyvsp[-2].num);
             lex->udf.dl= (yyvsp[0].lex_str).str;
           }
-#line 46848 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46853 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3395:
-#line 17944 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17972 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->init_last_field(&lex->sphead->m_return_field_def,
                                  &empty_clex_str,
                                  thd->variables.collation_database);
           }
-#line 46859 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46864 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3396:
-#line 17951 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17979 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->fill_field_definition(thd,
                                                             Lex->last_field)))
               MYSQL_YYABORT;
           }
-#line 46869 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46874 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3397:
-#line 17961 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17989 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
             if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[-1].object_ddl_options), (yyvsp[0].spname),
                                                          &sp_handler_function)))
               MYSQL_YYABORT;
           }
-#line 46880 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46885 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3398:
-#line 17970 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 17998 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -46888,104 +46893,104 @@
             lex->sphead->set_chistics(lex->sp_chistics);
             lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
           }
-#line 46892 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46897 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3399:
-#line 17978 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18006 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_body_finalize_function(thd)))
               MYSQL_YYABORT;
           }
-#line 46901 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46906 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3400:
-#line 17986 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18014 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_CREATE_PROCEDURE;
             if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[-1].object_ddl_options), (yyvsp[0].spname),
                                                          &sp_handler_procedure)))
               MYSQL_YYABORT;
           }
-#line 46912 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46917 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3401:
-#line 17994 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18022 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sphead->set_chistics(Lex->sp_chistics);
             Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
           }
-#line 46921 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46926 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3402:
-#line 17999 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18027 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_body_finalize_procedure(thd)))
               MYSQL_YYABORT;
           }
-#line 46930 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46935 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3403:
-#line 18009 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18037 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_START;
           }
-#line 46938 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46943 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3404:
-#line 18013 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18041 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_END;
           }
-#line 46946 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46951 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3405:
-#line 18017 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18045 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_PREPARE;
           }
-#line 46954 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46959 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3406:
-#line 18021 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18049 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_COMMIT;
           }
-#line 46962 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46967 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3407:
-#line 18025 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18053 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_ROLLBACK;
           }
-#line 46970 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46975 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3408:
-#line 18029 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18057 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_RECOVER;
             Lex->verbose= (yyvsp[0].num);
           }
-#line 46979 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46984 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3409:
-#line 18036 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18064 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { (yyval.num)= false; }
-#line 46985 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 46990 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3410:
-#line 18038 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18066 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("SQL")))
               (yyval.num)= true;
@@ -46998,167 +47003,167 @@
               (yyval.num)= false;
             }
           }
-#line 47002 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47007 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3411:
-#line 18054 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18082 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
             if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
               MYSQL_YYABORT;
             Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
           }
-#line 47013 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47018 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3412:
-#line 18061 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
             if (unlikely(!(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 47024 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47029 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3413:
-#line 18068 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18096 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE && (yyvsp[-2].string)->length() <= MAXBQUALSIZE);
             if (unlikely(!(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 47035 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47040 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3414:
-#line 18077 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18105 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 47041 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47046 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3415:
-#line 18078 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18106 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 47047 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47052 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3416:
-#line 18079 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18107 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 47053 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47058 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3417:
-#line 18083 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18111 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_NONE;        }
-#line 47059 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47064 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3418:
-#line 18084 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18112 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_JOIN;        }
-#line 47065 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47070 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3419:
-#line 18085 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18113 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_RESUME;      }
-#line 47071 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47076 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3420:
-#line 18089 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18117 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_NONE;        }
-#line 47077 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47082 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3421:
-#line 18090 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18118 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_ONE_PHASE;   }
-#line 47083 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47088 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3422:
-#line 18095 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18123 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_NONE;        }
-#line 47089 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47094 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3423:
-#line 18097 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_SUSPEND;     }
-#line 47095 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47100 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3425:
-#line 18102 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18130 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {}
-#line 47101 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47106 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3426:
-#line 18103 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_FOR_MIGRATE; }
-#line 47107 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47112 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3427:
-#line 18108 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18136 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSTALL_PLUGIN;
             lex->comment= (yyvsp[-2].ident_sys);
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 47118 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47123 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3428:
-#line 18115 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18143 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSTALL_PLUGIN;
             lex->comment= null_clex_str;
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 47129 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47134 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3429:
-#line 18125 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18153 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
             lex->comment= (yyvsp[0].ident_sys);
           }
-#line 47139 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47144 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3430:
-#line 18131 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18159 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
             lex->comment= null_clex_str;
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 47150 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47155 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
   case 3431:
-#line 18142 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
+#line 18170 "/home/buildbot/git/sql/sql_yacc.yy" /* yacc.c:1646  */
     {
-	  YYERROR;
-	}
-#line 47158 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+            YYERROR;
+          }
+#line 47163 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
     break;
 
 
-#line 47162 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
+#line 47167 "/home/buildbot/git/mkdist/sql/sql_yacc.cc" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
diff -Nru mariadb-10.3-10.3.18/sql/sql_yacc.yy mariadb-10.3-10.3.22/sql/sql_yacc.yy
--- mariadb-10.3-10.3.18/sql/sql_yacc.yy	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_yacc.yy	2020-01-26 18:37:29.000000000 +0000
@@ -2901,24 +2901,26 @@
         ;
 
 sf_tail_not_aggregate:
-        sf_tail
-        {
-          if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
+          sf_tail
           {
-            my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
+            if (unlikely(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR))
+            {
+              my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0)));
+            }
+            Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
           }
-          Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
-        }
+        ;
 
 sf_tail_aggregate:
-        sf_tail
-        {
-          if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
+          sf_tail
           {
-            my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
+            if (unlikely(!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)))
+            {
+              my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0)));
+            }
+            Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
           }
-          Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE);
-        }
+        ;
 
 create_function_tail:
           sf_tail_not_aggregate { }
@@ -3080,8 +3082,6 @@
           {
             MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
             Lex->server_options.host= $2;
-            my_casedn_str(system_charset_info,
-		         (char*) Lex->server_options.host.str);
           }
         | DATABASE TEXT_STRING_sys
           {
@@ -3986,6 +3986,7 @@
             if (unlikely($$ == NULL))
               MYSQL_YYABORT;
           }
+        ;
 
 simple_target_specification:
           ident_cli
@@ -4042,6 +4043,7 @@
             if (unlikely($$ == NULL))
               MYSQL_YYABORT;
           }
+        ;
 
 condition_information_item_name:
           CLASS_ORIGIN_SYM
@@ -7235,15 +7237,18 @@
           '(' LONG_NUM ')'      { $$= $2.str; }
         | '(' ULONGLONG_NUM ')' { $$= $2.str; }
         | '(' DECIMAL_NUM ')'   { $$= $2.str; }
-        | '(' NUM ')'           { $$= $2.str; };
+        | '(' NUM ')'           { $$= $2.str; }
+        ;
 
 opt_field_length:
           /* empty */  { $$= (char*) 0; /* use default length */ }
         | field_length { $$= $1; }
+        ;
 
 opt_field_length_default_1:
           /* empty */  { $$= (char*) "1"; }
         | field_length { $$= $1; }
+        ;
 
 opt_precision:
           /* empty */    { $$.set(0, 0); }
@@ -7734,12 +7739,14 @@
 opt_USING_key_algorithm:
           /* Empty*/              { $$= HA_KEY_ALG_UNDEF; }
         | USING    btree_or_rtree { $$= $2; }
+        ;
 
 /* TYPE is a valid identifier, so it's handled differently than USING */
 opt_key_algorithm_clause:
           /* Empty*/              { $$= HA_KEY_ALG_UNDEF; }
         | USING    btree_or_rtree { $$= $2; }
         | TYPE_SYM btree_or_rtree { $$= $2; }
+        ;
 
 key_using_alg:
           USING btree_or_rtree
@@ -7850,7 +7857,8 @@
           text_string
           { Lex->last_field->interval_list.push_back($1, thd->mem_root); }
         | string_list ',' text_string
-          { Lex->last_field->interval_list.push_back($3, thd->mem_root); };
+          { Lex->last_field->interval_list.push_back($3, thd->mem_root); }
+        ;
 
 /*
 ** Alter table
@@ -7880,6 +7888,7 @@
               MYSQL_YYABORT;
             Lex->select_lex.db= (Lex->select_lex.table_list.first)->db;
             Lex->create_last_non_select_table= Lex->last_table();
+            Lex->mark_first_table_as_inserting();
           }
           alter_commands
           {
@@ -8517,6 +8526,7 @@
         | alter_algorithm_option
         | alter_lock_option alter_algorithm_option
         | alter_algorithm_option alter_lock_option
+        ;
 
 alter_algorithm_option:
           ALGORITHM_SYM opt_equal DEFAULT
@@ -8575,6 +8585,7 @@
             Lex->alter_info.requested_lock=
               Alter_info::ALTER_TABLE_LOCK_NONE;
           }
+        ;
 
 
 opt_restrict:
@@ -8842,6 +8853,7 @@
           {}
         | COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec
           {}
+        ;
 
 persistent_column_stat_spec:
           ALL {}
@@ -9651,13 +9663,13 @@
 opt_default_time_precision:
           /* empty */             { $$= NOT_FIXED_DEC;  }
         | '(' ')'                 { $$= NOT_FIXED_DEC;  }
-        | '(' real_ulong_num ')'  { $$= $2; };
+        | '(' real_ulong_num ')'  { $$= $2; }
         ;
 
 opt_time_precision:
           /* empty */             { $$= 0;  }
         | '(' ')'                 { $$= 0;  }
-        | '(' real_ulong_num ')'  { $$= $2; };
+        | '(' real_ulong_num ')'  { $$= $2; }
         ;
 
 optional_braces:
@@ -10162,6 +10174,7 @@
      else
        $$->len= 0;
    }
+   ;
 
 dyncall_create_list:
      dyncall_create_element
@@ -11642,7 +11655,7 @@
 
 opt_gorder_clause:
           /* empty */
-        | ORDER_SYM BY gorder_list;
+        | ORDER_SYM BY gorder_list
         ;
 
 gorder_list:
@@ -12660,6 +12673,7 @@
             if (unlikely(thd->lex->win_ref == NULL))
               MYSQL_YYABORT;
           }
+        ;
 
 opt_window_partition_clause:
           /* empty */ { }
@@ -12968,6 +12982,7 @@
             LEX *lex=Lex;
             lex->limit_rows_examined= $1;
           }
+        ;
 
 delete_limit_clause:
           /* empty */
@@ -12994,6 +13009,7 @@
 int_num:
           opt_plus NUM           { int error; $$= (int) my_strtoll10($2.str, (char**) 0, &error); }
         | '-' NUM       { int error; $$= -(int) my_strtoll10($2.str, (char**) 0, &error); }
+        ;
 
 ulong_num:
           opt_plus NUM           { int error; $$= (ulong) my_strtoll10($2.str, (char**) 0, &error); }
@@ -13017,7 +13033,7 @@
         | LONG_NUM      { int error; $$= (longlong) my_strtoll10($1.str, (char**) 0, &error); }
         | '-' NUM         { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
         | '-' LONG_NUM  { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
-
+        ;
 
 ulonglong_num:
           opt_plus NUM           { int error; $$= (ulonglong) my_strtoll10($2.str, (char**) 0, &error); }
@@ -13054,7 +13070,7 @@
         ulong_num   { $$= $1 != 0; }
         | TRUE_SYM  { $$= 1; }
         | FALSE_SYM { $$= 0; }
-
+        ;
 
 procedure_clause:
           PROCEDURE_SYM ident /* Procedure name */
@@ -13444,7 +13460,9 @@
             Lex->current_select= &Lex->select_lex;
           }
           insert_field_spec opt_insert_update
-          {}
+          {
+            Lex->mark_first_table_as_inserting();
+          }
         ;
 
 replace:
@@ -13461,7 +13479,9 @@
             Lex->current_select= &Lex->select_lex;
           }
           insert_field_spec
-          {}
+          {
+            Lex->mark_first_table_as_inserting();
+          }
         ;
 
 insert_lock_option:
@@ -13507,7 +13527,8 @@
             lex->field_list.empty();
             lex->many_values.empty();
             lex->insert_list=0;
-          };
+          }
+        ;
 
 insert_field_spec:
           insert_values {}
@@ -13764,7 +13785,7 @@
 opt_delete_system_time:
             /* empty */
           {
-            Lex->vers_conditions.init(SYSTEM_TIME_ALL);
+            Lex->vers_conditions.init(SYSTEM_TIME_HISTORY);
           }
           | BEFORE_SYM SYSTEM_TIME_SYM history_point
           {
@@ -14665,6 +14686,7 @@
 optional_flush_tables_arguments:
           /* empty */        {$$= 0;}
         | AND_SYM DISABLE_SYM CHECKPOINT_SYM {$$= REFRESH_CHECKPOINT; } 
+        ;
 
 reset:
           RESET_SYM
@@ -14757,6 +14779,7 @@
         /* Empty */    { $$= (int) KILL_HARD_BIT; }
         | HARD_SYM     { $$= (int) KILL_HARD_BIT; }
         | SOFT_SYM     { $$= 0; }
+        ;
 
 kill_option:
           /* empty */    { $$= (int) KILL_CONNECTION; }
@@ -14841,7 +14864,9 @@
           opt_xml_rows_identified_by
           opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec
           opt_load_data_set_spec
-          {}
+          {
+            Lex->mark_first_table_as_inserting();
+          }
           ;
 
 data_or_xml:
@@ -14934,7 +14959,8 @@
 opt_xml_rows_identified_by:
         /* empty */ { }
         | ROWS_SYM IDENTIFIED_SYM BY text_string
-          { Lex->exchange->line_term = $4; };
+          { Lex->exchange->line_term = $4; }
+        ;
 
 opt_ignore_lines:
           /* empty */
@@ -16972,12 +16998,14 @@
         ;
 
 opt_with_admin:
-           /* nothing */               { Lex->definer = 0; }
-         | WITH ADMIN_SYM user_or_role { Lex->definer = $3; }
+          /* nothing */               { Lex->definer = 0; }
+        | WITH ADMIN_SYM user_or_role { Lex->definer = $3; }
+        ;
 
 opt_with_admin_option:
-           /* nothing */               { Lex->with_admin_option= false; }
-         | WITH ADMIN_SYM OPTION       { Lex->with_admin_option= true; }
+          /* nothing */               { Lex->with_admin_option= false; }
+        | WITH ADMIN_SYM OPTION       { Lex->with_admin_option= true; }
+        ;
 
 role_list:
           grant_role
@@ -17405,7 +17433,7 @@
           { $$= TVL_UNKNOWN; }
         | RELEASE_SYM        { $$= TVL_YES; }
         | NO_SYM RELEASE_SYM { $$= TVL_NO; }
-;
+        ;
 
 commit:
           COMMIT_SYM opt_work opt_chain opt_release
@@ -17472,7 +17500,7 @@
           { $$= INTERSECT_TYPE; }
         | EXCEPT_SYM
           { $$= EXCEPT_TYPE; }
-
+        ;
 
 union_clause:
           /* empty */ {}
@@ -18138,10 +18166,11 @@
 
 /* Avoid compiler warning from sql_yacc.cc where yyerrlab1 is not used */
 keep_gcc_happy:
-	IMPOSSIBLE_ACTION
-	{
-	  YYERROR;
-	}
+          IMPOSSIBLE_ACTION
+          {
+            YYERROR;
+          }
+        ;
 
 /**
   @} (end of group Parser)
diff -Nru mariadb-10.3-10.3.18/sql/sql_yacc_ora.cc mariadb-10.3-10.3.22/sql/sql_yacc_ora.cc
--- mariadb-10.3-10.3.18/sql/sql_yacc_ora.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_yacc_ora.cc	2020-01-26 18:37:30.000000000 +0000
@@ -1518,27 +1518,27 @@
     2492,  2491,  2515,  2514,  2533,  2536,  2538,  2542,  2543,  2547,
     2554,  2564,  2565,  2569,  2570,  2574,  2575,  2579,  2584,  2590,
     2596,  2604,  2610,  2616,  2624,  2632,  2640,  2648,  2656,  2664,
-    2676,  2693,  2692,  2704,  2705,  2709,  2714,  2721,  2726,  2731,
-    2736,  2741,  2749,  2748,  2781,  2780,  2787,  2794,  2795,  2801,
-    2807,  2817,  2823,  2829,  2831,  2838,  2839,  2843,  2853,  2854,
-    2862,  2862,  2907,  2921,  2926,  2934,  2935,  2939,  2940,  2944,
-    2945,  2950,  2952,  2954,  2956,  2958,  2960,  2962,  2967,  2969,
-    2974,  2975,  2978,  2980,  2984,  2984,  2990,  2991,  2995,  2996,
-    3001,  3000,  3009,  3011,  3014,  3016,  3020,  3024,  3031,  3033,
-    3037,  3038,  3042,  3050,  3055,  3060,  3065,  3070,  3075,  3083,
-    3085,  3089,  3090,  3094,  3100,  3106,  3112,  3118,  3124,  3133,
-    3134,  3135,  3136,  3137,  3142,  3141,  3154,  3153,  3166,  3173,
-    3174,  3178,  3179,  3183,  3184,  3188,  3189,  3193,  3193,  3205,
-    3208,  3213,  3212,  3221,  3225,  3226,  3233,  3234,  3241,  3242,
-    3246,  3252,  3258,  3267,  3279,  3283,  3289,  3301,  3305,  3312,
-    3322,  3330,  3338,  3349,  3350,  3357,  3368,  3367,  3386,  3385,
-    3399,  3401,  3406,  3416,  3415,  3431,  3432,  3433,  3434,  3439,
-    3441,  3446,  3461,  3469,  3473,  3493,  3494,  3498,  3502,  3508,
-    3514,  3520,  3526,  3536,  3541,  3549,  3557,  3572,  3578,  3579,
-    3585,  3588,  3592,  3600,  3617,  3619,  3637,  3643,  3645,  3647,
-    3649,  3651,  3653,  3655,  3657,  3659,  3661,  3663,  3665,  3670,
-    3678,  3694,  3695,  3700,  3706,  3715,  3722,  3731,  3739,  3744,
-    3753,  3755,  3757,  3766,  3771,  3778,  3787,  3795,  3797,  3799,
+    2676,  2693,  2692,  2704,  2705,  2709,  2714,  2719,  2724,  2729,
+    2734,  2739,  2747,  2746,  2779,  2778,  2785,  2792,  2793,  2799,
+    2805,  2815,  2821,  2827,  2829,  2836,  2837,  2841,  2851,  2852,
+    2860,  2860,  2905,  2919,  2924,  2932,  2933,  2937,  2938,  2942,
+    2943,  2948,  2950,  2952,  2954,  2956,  2958,  2960,  2965,  2967,
+    2972,  2973,  2976,  2978,  2982,  2982,  2988,  2989,  2993,  2994,
+    2999,  2998,  3007,  3009,  3012,  3014,  3018,  3022,  3029,  3031,
+    3035,  3036,  3040,  3048,  3053,  3058,  3063,  3068,  3073,  3081,
+    3083,  3087,  3088,  3092,  3098,  3104,  3110,  3116,  3122,  3131,
+    3132,  3133,  3134,  3135,  3140,  3139,  3152,  3151,  3164,  3171,
+    3172,  3176,  3177,  3181,  3182,  3186,  3187,  3191,  3191,  3203,
+    3206,  3211,  3210,  3219,  3223,  3224,  3231,  3232,  3239,  3240,
+    3244,  3250,  3256,  3265,  3277,  3281,  3287,  3299,  3303,  3310,
+    3320,  3328,  3336,  3347,  3348,  3355,  3366,  3365,  3384,  3383,
+    3397,  3399,  3404,  3414,  3413,  3429,  3430,  3431,  3432,  3437,
+    3439,  3444,  3459,  3467,  3471,  3491,  3492,  3496,  3500,  3506,
+    3512,  3518,  3524,  3534,  3539,  3547,  3555,  3570,  3576,  3577,
+    3583,  3586,  3590,  3598,  3615,  3617,  3635,  3641,  3643,  3645,
+    3647,  3649,  3651,  3653,  3655,  3657,  3659,  3661,  3663,  3668,
+    3676,  3692,  3693,  3698,  3704,  3713,  3720,  3729,  3738,  3743,
+    3752,  3754,  3756,  3765,  3770,  3777,  3786,  3795,  3797,  3799,
     3801,  3803,  3805,  3807,  3809,  3811,  3813,  3815,  3817,  3819,
     3824,  3825,  3833,  3845,  3860,  3861,  3862,  3866,  3867,  3868,
     3869,  3870,  3871,  3875,  3876,  3877,  3878,  3879,  3880,  3881,
@@ -1603,257 +1603,257 @@
     7057,  7058,  7059,  7063,  7067,  7068,  7072,  7073,  7077,  7078,
     7079,  7080,  7081,  7085,  7086,  7087,  7088,  7089,  7093,  7099,
     7100,  7105,  7107,  7114,  7115,  7116,  7120,  7124,  7125,  7126,
-    7127,  7128,  7129,  7133,  7134,  7135,  7136,  7139,  7140,  7143,
-    7144,  7165,  7166,  7169,  7170,  7173,  7174,  7179,  7180,  7184,
-    7185,  7186,  7193,  7194,  7200,  7207,  7211,  7212,  7216,  7217,
-    7221,  7229,  7237,  7246,  7250,  7256,  7260,  7261,  7270,  7279,
-    7285,  7291,  7304,  7310,  7320,  7334,  7347,  7348,  7352,  7357,
-    7361,  7362,  7366,  7367,  7371,  7378,  7382,  7383,  7387,  7395,
-    7396,  7400,  7401,  7405,  7406,  7410,  7411,  7412,  7420,  7421,
-    7425,  7426,  7427,  7428,  7432,  7433,  7438,  7437,  7450,  7451,
-    7455,  7458,  7459,  7460,  7461,  7465,  7473,  7480,  7481,  7485,
-    7495,  7496,  7500,  7501,  7504,  7506,  7510,  7522,  7523,  7527,
-    7534,  7547,  7548,  7550,  7552,  7558,  7563,  7569,  7575,  7582,
-    7592,  7593,  7594,  7595,  7596,  7600,  7601,  7605,  7606,  7610,
-    7611,  7615,  7616,  7617,  7621,  7622,  7626,  7630,  7642,  7643,
-    7647,  7648,  7652,  7653,  7657,  7658,  7662,  7663,  7667,  7668,
-    7672,  7673,  7677,  7678,  7679,  7682,  7684,  7689,  7694,  7696,
-    7704,  7712,  7718,  7727,  7728,  7732,  7736,  7737,  7747,  7748,
-    7749,  7753,  7757,  7764,  7770,  7782,  7783,  7787,  7789,  7798,
-    7812,  7797,  7832,  7831,  7845,  7854,  7853,  7869,  7868,  7884,
-    7883,  7896,  7890,  7903,  7902,  7937,  7942,  7947,  7952,  7958,
-    7957,  7964,  7971,  7981,  7970,  8001,  8002,  8003,  8004,  8008,
-    8009,  8021,  8022,  8026,  8027,  8030,  8032,  8040,  8048,  8050,
-    8052,  8053,  8061,  8062,  8068,  8077,  8075,  8088,  8101,  8100,
-    8113,  8111,  8124,  8131,  8141,  8142,  8166,  8173,  8177,  8183,
-    8181,  8198,  8200,  8205,  8213,  8212,  8226,  8230,  8229,  8241,
-    8242,  8246,  8259,  8260,  8264,  8268,  8275,  8280,  8284,  8291,
-    8295,  8300,  8308,  8316,  8326,  8337,  8347,  8358,  8368,  8374,
-    8380,  8385,  8391,  8405,  8419,  8424,  8428,  8433,  8434,  8435,
-    8440,  8445,  8451,  8453,  8454,  8455,  8456,  8459,  8464,  8472,
-    8477,  8485,  8486,  8490,  8491,  8495,  8495,  8498,  8500,  8504,
-    8505,  8509,  8510,  8518,  8519,  8520,  8524,  8525,  8530,  8539,
-    8540,  8541,  8542,  8547,  8546,  8556,  8555,  8563,  8570,  8580,
-    8597,  8600,  8607,  8611,  8618,  8622,  8626,  8633,  8633,  8639,
-    8640,  8644,  8645,  8646,  8650,  8651,  8660,  8667,  8668,  8673,
-    8672,  8684,  8685,  8686,  8690,  8692,  8691,  8698,  8697,  8718,
-    8719,  8723,  8724,  8728,  8729,  8730,  8734,  8735,  8740,  8739,
-    8760,  8761,  8765,  8770,  8771,  8778,  8780,  8784,  8786,  8785,
-    8797,  8799,  8798,  8811,  8812,  8817,  8826,  8827,  8828,  8832,
-    8839,  8849,  8857,  8866,  8868,  8867,  8873,  8872,  8895,  8896,
-    8900,  8901,  8905,  8906,  8907,  8908,  8909,  8910,  8914,  8915,
-    8920,  8919,  8940,  8941,  8942,  8947,  8946,  8952,  8959,  8965,
-    8974,  8975,  8979,  8995,  8994,  9007,  9008,  9012,  9013,  9017,
-    9028,  9039,  9040,  9045,  9044,  9055,  9056,  9060,  9061,  9065,
-    9076,  9088,  9087,  9095,  9095,  9104,  9105,  9110,  9111,  9120,
-    9129,  9130,  9131,  9132,  9133,  9134,  9135,  9139,  9140,  9141,
-    9142,  9143,  9144,  9145,  9149,  9149,  9157,  9157,  9169,  9173,
-    9175,  9179,  9179,  9190,  9194,  9196,  9200,  9200,  9211,  9216,
-    9216,  9225,  9225,  9237,  9243,  9241,  9248,  9260,  9258,  9265,
-    9275,  9280,  9279,  9284,  9288,  9299,  9300,  9304,  9305,  9309,
-    9310,  9311,  9315,  9316,  9317,  9321,  9322,  9323,  9324,  9325,
-    9329,  9329,  9347,  9354,  9356,  9360,  9364,  9370,  9377,  9379,
-    9388,  9392,  9396,  9403,  9411,  9415,  9423,  9426,  9433,  9437,
-    9441,  9445,  9452,  9453,  9457,  9458,  9475,  9494,  9496,  9503,
-    9514,  9515,  9516,  9530,  9535,  9557,  9563,  9569,  9575,  9581,
-    9590,  9591,  9592,  9593,  9594,  9598,  9599,  9600,  9604,  9605,
-    9606,  9610,  9611,  9616,  9667,  9674,  9717,  9723,  9729,  9735,
-    9741,  9747,  9753,  9759,  9763,  9769,  9775,  9781,  9787,  9793,
-    9797,  9803,  9812,  9818,  9826,  9832,  9841,  9847,  9855,  9865,
-    9872,  9880,  9886,  9895,  9899,  9905,  9911,  9917,  9923,  9930,
-    9936,  9942,  9948,  9954,  9961,  9967,  9973,  9979,  9985,  9991,
-    9997, 10003, 10009, 10013, 10014, 10018, 10019, 10023, 10024, 10028,
-   10029, 10033, 10034, 10035, 10036, 10037, 10038, 10042, 10043, 10048,
-   10052, 10056, 10057, 10058, 10062, 10063, 10064, 10065, 10066, 10067,
-   10071, 10072, 10073, 10078, 10077, 10083, 10091, 10113, 10120, 10129,
-   10130, 10131, 10132, 10136, 10145, 10146, 10147, 10148, 10149, 10150,
-   10151, 10152, 10184, 10185, 10186, 10187, 10188, 10189, 10190, 10191,
-   10192, 10193, 10194, 10195, 10202, 10208, 10213, 10223, 10228, 10233,
-   10239, 10244, 10250, 10261, 10268, 10273, 10278, 10283, 10288, 10293,
-   10298, 10306, 10307, 10308, 10312, 10313, 10321, 10322, 10328, 10332,
-   10338, 10344, 10353, 10354, 10363, 10370, 10384, 10390, 10396, 10405,
-   10414, 10420, 10426, 10432, 10438, 10453, 10464, 10470, 10476, 10482,
-   10488, 10494, 10502, 10509, 10513, 10518, 10526, 10547, 10554, 10560,
-   10567, 10574, 10580, 10586, 10592, 10598, 10604, 10610, 10616, 10622,
-   10629, 10635, 10642, 10648, 10653, 10658, 10663, 10668, 10686, 10692,
-   10698, 10703, 10710, 10717, 10725, 10732, 10739, 10746, 10753, 10770,
-   10776, 10782, 10788, 10794, 10801, 10807, 10813, 10822, 10833, 10840,
-   10846, 10852, 10859, 10867, 10873, 10879, 10884, 10890, 10898, 10904,
-   10910, 10916, 10922, 10930, 10942, 10949, 10964, 10970, 10977, 10984,
-   10991, 10998, 11005, 11009, 11016, 11034, 11033, 11101, 11109, 11111,
-   11116, 11117, 11121, 11122, 11126, 11127, 11131, 11138, 11146, 11173,
-   11179, 11185, 11191, 11197, 11203, 11212, 11219, 11221, 11218, 11228,
-   11239, 11245, 11251, 11257, 11263, 11269, 11275, 11281, 11287, 11294,
-   11293, 11318, 11327, 11345, 11347, 11354, 11361, 11368, 11375, 11382,
-   11389, 11396, 11403, 11410, 11417, 11428, 11435, 11446, 11457, 11477,
-   11476, 11482, 11499, 11505, 11514, 11523, 11533, 11532, 11544, 11554,
-   11562, 11567, 11575, 11576, 11581, 11586, 11589, 11591, 11595, 11600,
-   11608, 11609, 11613, 11617, 11624, 11631, 11638, 11651, 11650, 11667,
-   11670, 11669, 11674, 11673, 11678, 11677, 11681, 11686, 11687, 11691,
-   11692, 11693, 11694, 11695, 11696, 11697, 11698, 11702, 11703, 11704,
-   11708, 11709, 11713, 11720, 11728, 11729, 11733, 11740, 11748, 11757,
-   11767, 11768, 11777, 11786, 11798, 11799, 11811, 11822, 11823, 11829,
-   11830, 11848, 11857, 11855, 11873, 11871, 11882, 11892, 11890, 11908,
-   11907, 11917, 11928, 11926, 11945, 11944, 11955, 11967, 11968, 11969,
-   11973, 11974, 11982, 11983, 11987, 12002, 12003, 12007, 12007, 12047,
-   12113, 12156, 12157, 12166, 12165, 12174, 12175, 12176, 12180, 12181,
-   12182, 12182, 12186, 12192, 12200, 12200, 12215, 12232, 12233, 12241,
-   12251, 12250, 12264, 12281, 12264, 12288, 12292, 12301, 12312, 12313,
-   12318, 12321, 12322, 12323, 12327, 12328, 12333, 12332, 12338, 12337,
-   12345, 12346, 12349, 12351, 12351, 12355, 12355, 12360, 12361, 12365,
-   12367, 12372, 12373, 12377, 12388, 12402, 12403, 12404, 12405, 12406,
-   12407, 12408, 12409, 12410, 12411, 12412, 12413, 12417, 12418, 12419,
-   12420, 12421, 12422, 12423, 12424, 12425, 12429, 12430, 12431, 12432,
-   12435, 12437, 12438, 12442, 12443, 12451, 12453, 12457, 12459, 12458,
-   12472, 12475, 12474, 12489, 12494, 12509, 12511, 12515, 12520, 12528,
-   12529, 12546, 12569, 12570, 12576, 12577, 12581, 12594, 12593, 12601,
-   12602, 12610, 12611, 12615, 12616, 12620, 12621, 12635, 12636, 12640,
-   12650, 12659, 12666, 12673, 12683, 12684, 12691, 12701, 12702, 12704,
-   12706, 12708, 12710, 12719, 12723, 12724, 12728, 12740, 12742, 12747,
-   12746, 12796, 12801, 12809, 12810, 12811, 12815, 12816, 12820, 12833,
-   12840, 12845, 12852, 12859, 12866, 12876, 12881, 12886, 12890, 12896,
-   12902, 12911, 12919, 12923, 12930, 12931, 12934, 12936, 12940, 12941,
-   12944, 12945, 12946, 12947, 12948, 12949, 12953, 12954, 12955, 12956,
-   12957, 12961, 12962, 12963, 12964, 12968, 12969, 12970, 12971, 12972,
-   12976, 12977, 12978, 12979, 12980, 12984, 12989, 12990, 12994, 12995,
-   12999, 13000, 13001, 13006, 13005, 13039, 13040, 13044, 13045, 13049,
-   13059, 13059, 13071, 13072, 13075, 13095, 13099, 13104, 13112, 13117,
-   13128, 13116, 13130, 13145, 13157, 13156, 13174, 13173, 13182, 13199,
-   13205, 13213, 13221, 13235, 13250, 13258, 13262, 13267, 13266, 13275,
-   13280, 13286, 13291, 13296, 13303, 13301, 13315, 13316, 13320, 13331,
-   13344, 13345, 13349, 13363, 13367, 13376, 13379, 13386, 13387, 13395,
-   13403, 13394, 13413, 13420, 13412, 13430, 13438, 13439, 13446, 13450,
-   13451, 13460, 13461, 13465, 13474, 13475, 13476, 13478, 13477, 13489,
-   13491, 13495, 13496, 13497, 13501, 13502, 13506, 13507, 13511, 13521,
-   13522, 13526, 13527, 13531, 13532, 13536, 13537, 13542, 13541, 13557,
-   13556, 13571, 13572, 13576, 13577, 13581, 13586, 13594, 13602, 13613,
-   13614, 13620, 13628, 13630, 13632, 13630, 13645, 13653, 13644, 13675,
-   13676, 13680, 13689, 13690, 13694, 13704, 13705, 13712, 13711, 13727,
-   13730, 13737, 13738, 13745, 13760, 13766, 13765, 13777, 13776, 13789,
-   13791, 13795, 13796, 13800, 13815, 13833, 13834, 13838, 13839, 13843,
-   13844, 13845, 13850, 13861, 13849, 13871, 13873, 13874, 13877, 13879,
-   13882, 13884, 13887, 13888, 13891, 13895, 13899, 13903, 13907, 13911,
-   13915, 13919, 13923, 13931, 13934, 13944, 13943, 13959, 13966, 13974,
-   13982, 13990, 13998, 14006, 14013, 14020, 14026, 14028, 14030, 14039,
-   14043, 14048, 14047, 14054, 14053, 14058, 14067, 14074, 14079, 14084,
-   14089, 14094, 14099, 14101, 14103, 14105, 14112, 14120, 14122, 14130,
-   14137, 14144, 14152, 14158, 14163, 14171, 14179, 14187, 14191, 14196,
-   14203, 14208, 14215, 14222, 14228, 14234, 14240, 14248, 14253, 14260,
-   14267, 14274, 14281, 14286, 14291, 14296, 14301, 14308, 14330, 14332,
-   14334, 14339, 14340, 14343, 14345, 14349, 14350, 14354, 14355, 14359,
-   14360, 14364, 14365, 14369, 14370, 14374, 14375, 14383, 14395, 14394,
-   14410, 14409, 14419, 14420, 14421, 14422, 14423, 14427, 14428, 14432,
-   14439, 14440, 14441, 14445, 14446, 14459, 14460, 14461, 14476, 14475,
-   14488, 14487, 14499, 14503, 14504, 14519, 14522, 14521, 14534, 14535,
-   14540, 14542, 14544, 14546, 14548, 14550, 14558, 14560, 14562, 14564,
-   14569, 14571, 14579, 14581, 14583, 14585, 14602, 14603, 14607, 14608,
-   14611, 14613, 14614, 14618, 14634, 14635, 14639, 14638, 14648, 14649,
-   14653, 14653, 14657, 14656, 14662, 14666, 14667, 14671, 14672, 14680,
-   14679, 14690, 14694, 14698, 14711, 14710, 14725, 14726, 14727, 14730,
-   14731, 14732, 14733, 14741, 14745, 14754, 14760, 14772, 14783, 14794,
-   14807, 14771, 14815, 14816, 14820, 14821, 14825, 14826, 14834, 14838,
-   14839, 14840, 14843, 14845, 14849, 14850, 14854, 14859, 14866, 14871,
-   14878, 14880, 14884, 14885, 14889, 14894, 14902, 14903, 14906, 14908,
-   14916, 14917, 14921, 14922, 14923, 14927, 14929, 14934, 14935, 14944,
-   14945, 14949, 14950, 14954, 14967, 14972, 14977, 14982, 14990, 14998,
-   15003, 15016, 15025, 15041, 15048, 15054, 15064, 15065, 15073, 15074,
-   15075, 15076, 15090, 15096, 15102, 15108, 15114, 15120, 15139, 15149,
-   15159, 15165, 15172, 15182, 15190, 15198, 15210, 15211, 15220, 15219,
-   15238, 15239, 15244, 15245, 15252, 15250, 15277, 15278, 15284, 15289,
-   15298, 15313, 15314, 15318, 15323, 15331, 15336, 15344, 15349, 15354,
-   15359, 15365, 15370, 15378, 15383, 15388, 15393, 15399, 15407, 15408,
-   15419, 15427, 15431, 15437, 15443, 15453, 15459, 15468, 15478, 15479,
-   15483, 15484, 15485, 15489, 15497, 15505, 15513, 15521, 15522, 15530,
-   15531, 15539, 15540, 15545, 15554, 15555, 15563, 15564, 15573, 15574,
-   15582, 15583, 15587, 15596, 15597, 15598, 15602, 15615, 15645, 15655,
-   15655, 15657, 15667, 15668, 15669, 15670, 15671, 15672, 15673, 15674,
-   15675, 15680, 15681, 15682, 15683, 15684, 15685, 15686, 15687, 15688,
-   15689, 15697, 15698, 15699, 15700, 15701, 15702, 15706, 15707, 15708,
-   15709, 15710, 15711, 15712, 15713, 15714, 15718, 15719, 15720, 15721,
-   15722, 15723, 15724, 15728, 15729, 15730, 15731, 15732, 15733, 15734,
-   15735, 15736, 15740, 15741, 15742, 15743, 15744, 15745, 15746, 15759,
-   15760, 15761, 15762, 15763, 15764, 15765, 15766, 15767, 15768, 15769,
-   15770, 15771, 15772, 15773, 15774, 15775, 15776, 15777, 15778, 15779,
-   15780, 15781, 15782, 15783, 15784, 15785, 15786, 15787, 15788, 15789,
-   15790, 15791, 15792, 15793, 15794, 15795, 15796, 15797, 15798, 15799,
-   15800, 15801, 15802, 15803, 15804, 15805, 15806, 15807, 15808, 15809,
-   15810, 15811, 15812, 15813, 15854, 15855, 15856, 15857, 15858, 15859,
-   15870, 15871, 15872, 15873, 15874, 15875, 15876, 15877, 15878, 15879,
-   15883, 15884, 15885, 15892, 15893, 15894, 15898, 15899, 15900, 15909,
-   15910, 15911, 15912, 15913, 15914, 15915, 15916, 15917, 15918, 15919,
-   15920, 15921, 15922, 15923, 15924, 15925, 15926, 15927, 15928, 15929,
-   15930, 15931, 15932, 15933, 15934, 15935, 15936, 15937, 15938, 15939,
-   15940, 15941, 15942, 15950, 15951, 15952, 15953, 15954, 15955, 15956,
-   15957, 15958, 15959, 15960, 15961, 15962, 15963, 15964, 15965, 15966,
-   15967, 15968, 15969, 15970, 15971, 15972, 15973, 15974, 15975, 15976,
-   15977, 15978, 15979, 15980, 15981, 15982, 15983, 15984, 15985, 15986,
-   15987, 15988, 15989, 15990, 15991, 15992, 15993, 15994, 15995, 16000,
-   16001, 16002, 16003, 16004, 16005, 16006, 16007, 16008, 16009, 16010,
-   16011, 16012, 16013, 16014, 16015, 16016, 16017, 16018, 16019, 16020,
-   16021, 16022, 16023, 16024, 16025, 16026, 16027, 16028, 16029, 16030,
-   16031, 16032, 16033, 16034, 16035, 16036, 16037, 16038, 16039, 16040,
-   16041, 16042, 16043, 16044, 16045, 16046, 16047, 16048, 16049, 16050,
-   16051, 16052, 16053, 16054, 16055, 16056, 16057, 16058, 16059, 16060,
-   16061, 16062, 16063, 16064, 16065, 16066, 16067, 16068, 16069, 16070,
-   16071, 16072, 16073, 16074, 16075, 16076, 16077, 16078, 16079, 16080,
-   16081, 16082, 16083, 16084, 16085, 16086, 16087, 16088, 16089, 16090,
-   16091, 16092, 16093, 16094, 16095, 16096, 16097, 16098, 16099, 16100,
-   16101, 16102, 16103, 16104, 16105, 16106, 16107, 16108, 16109, 16110,
-   16111, 16112, 16113, 16114, 16115, 16116, 16117, 16118, 16119, 16120,
-   16121, 16122, 16123, 16124, 16125, 16126, 16127, 16128, 16129, 16130,
-   16131, 16132, 16133, 16134, 16135, 16136, 16137, 16138, 16139, 16140,
-   16141, 16142, 16143, 16144, 16145, 16146, 16147, 16148, 16149, 16150,
-   16151, 16152, 16153, 16154, 16155, 16156, 16157, 16158, 16159, 16160,
-   16161, 16162, 16163, 16164, 16165, 16166, 16167, 16168, 16169, 16170,
-   16171, 16172, 16173, 16174, 16175, 16176, 16177, 16178, 16179, 16180,
-   16181, 16182, 16183, 16184, 16185, 16186, 16187, 16188, 16189, 16190,
-   16191, 16192, 16193, 16194, 16195, 16196, 16197, 16198, 16199, 16200,
-   16201, 16202, 16203, 16204, 16205, 16206, 16207, 16208, 16209, 16210,
-   16211, 16212, 16213, 16214, 16215, 16216, 16217, 16218, 16219, 16220,
-   16221, 16222, 16223, 16224, 16225, 16226, 16227, 16228, 16229, 16230,
-   16231, 16232, 16233, 16234, 16235, 16236, 16237, 16238, 16239, 16240,
-   16241, 16242, 16243, 16244, 16245, 16246, 16247, 16248, 16249, 16250,
-   16251, 16252, 16253, 16254, 16255, 16256, 16257, 16258, 16259, 16260,
-   16261, 16262, 16263, 16264, 16265, 16277, 16276, 16286, 16290, 16285,
-   16303, 16302, 16316, 16315, 16331, 16330, 16357, 16358, 16364, 16363,
-   16370, 16369, 16379, 16378, 16389, 16388, 16394, 16402, 16404, 16409,
-   16409, 16418, 16417, 16431, 16430, 16435, 16439, 16440, 16441, 16445,
-   16446, 16447, 16448, 16452, 16453, 16454, 16455, 16460, 16465, 16470,
-   16479, 16484, 16489, 16494, 16499, 16504, 16509, 16514, 16528, 16539,
-   16558, 16576, 16588, 16596, 16601, 16617, 16618, 16619, 16620, 16624,
-   16643, 16661, 16662, 16666, 16667, 16668, 16669, 16673, 16688, 16692,
-   16693, 16694, 16704, 16705, 16706, 16712, 16718, 16730, 16729, 16743,
-   16744, 16750, 16759, 16760, 16764, 16765, 16769, 16788, 16789, 16790,
-   16795, 16796, 16801, 16800, 16817, 16827, 16838, 16837, 16869, 16870,
-   16874, 16875, 16879, 16880, 16881, 16882, 16884, 16883, 16896, 16897,
-   16898, 16899, 16900, 16906, 16911, 16917, 16923, 16929, 16936, 16943,
-   16947, 16954, 16963, 16965, 16970, 16975, 16982, 16989, 16996, 17003,
-   17010, 17017, 17029, 17030, 17033, 17034, 17037, 17042, 17050, 17060,
-   17079, 17082, 17084, 17088, 17089, 17096, 17098, 17102, 17103, 17108,
-   17107, 17111, 17110, 17114, 17113, 17117, 17116, 17119, 17120, 17121,
-   17122, 17123, 17124, 17125, 17126, 17127, 17128, 17129, 17130, 17131,
-   17132, 17133, 17134, 17135, 17136, 17137, 17138, 17139, 17140, 17141,
-   17142, 17143, 17144, 17145, 17149, 17150, 17154, 17155, 17159, 17166,
-   17173, 17183, 17193, 17202, 17211, 17224, 17229, 17237, 17242, 17250,
-   17255, 17262, 17262, 17263, 17263, 17266, 17273, 17278, 17284, 17290,
-   17296, 17300, 17304, 17305, 17309, 17337, 17339, 17343, 17347, 17351,
-   17358, 17364, 17370, 17376, 17382, 17391, 17392, 17396, 17397, 17402,
-   17403, 17407, 17408, 17412, 17413, 17417, 17418, 17423, 17422, 17432,
-   17441, 17442, 17446, 17447, 17452, 17453, 17454, 17459, 17460, 17461,
-   17465, 17477, 17486, 17492, 17501, 17510, 17523, 17525, 17527, 17532,
-   17533, 17538, 17537, 17554, 17553, 17565, 17565, 17586, 17587, 17594,
-   17602, 17603, 17604, 17608, 17609, 17614, 17613, 17635, 17642, 17643,
-   17647, 17648, 17652, 17653, 17654, 17659, 17667, 17688, 17715, 17717,
-   17721, 17722, 17726, 17727, 17735, 17736, 17737, 17738, 17739, 17745,
-   17751, 17761, 17762, 17767, 17780, 17796, 17797, 17798, 17802, 17803,
-   17807, 17808, 17813, 17814, 17818, 17824, 17833, 17833, 17858, 17859,
-   17860, 17861, 17862, 17863, 17864, 17868, 17869, 17870, 17871, 17881,
-   17883, 17889, 17895, 17905, 17914, 17920, 17925, 17929, 17903, 17983,
-   18001, 18000, 18018, 18027, 18016, 18049, 18057, 18048, 18070, 18080,
-   18090, 18091, 18095, 18096, 18102, 18106, 18110, 18114, 18118, 18122,
-   18130, 18131, 18147, 18154, 18161, 18171, 18172, 18173, 18177, 18178,
-   18179, 18183, 18184, 18189, 18191, 18190, 18196, 18197, 18201, 18208,
-   18218, 18224, 18235
+    7127,  7128,  7129,  7133,  7134,  7135,  7136,  7140,  7141,  7145,
+    7146,  7168,  7169,  7173,  7174,  7178,  7179,  7184,  7185,  7189,
+    7190,  7191,  7198,  7199,  7205,  7212,  7216,  7217,  7221,  7222,
+    7226,  7234,  7242,  7251,  7255,  7261,  7265,  7266,  7275,  7284,
+    7290,  7296,  7309,  7315,  7325,  7339,  7352,  7353,  7357,  7362,
+    7366,  7367,  7371,  7372,  7376,  7383,  7387,  7388,  7392,  7400,
+    7401,  7405,  7406,  7410,  7411,  7415,  7416,  7417,  7425,  7426,
+    7430,  7431,  7432,  7433,  7437,  7438,  7443,  7442,  7455,  7456,
+    7460,  7463,  7464,  7465,  7466,  7470,  7478,  7485,  7486,  7490,
+    7500,  7501,  7505,  7506,  7509,  7511,  7515,  7527,  7528,  7532,
+    7539,  7552,  7553,  7555,  7557,  7563,  7568,  7574,  7580,  7587,
+    7597,  7598,  7599,  7600,  7601,  7605,  7606,  7610,  7611,  7615,
+    7616,  7620,  7621,  7622,  7626,  7627,  7631,  7635,  7647,  7648,
+    7652,  7653,  7657,  7658,  7662,  7663,  7667,  7668,  7672,  7673,
+    7677,  7678,  7683,  7684,  7685,  7689,  7691,  7696,  7701,  7703,
+    7711,  7719,  7725,  7734,  7735,  7739,  7743,  7744,  7754,  7755,
+    7756,  7760,  7764,  7771,  7777,  7789,  7790,  7794,  7796,  7806,
+    7820,  7805,  7841,  7840,  7854,  7863,  7862,  7878,  7877,  7893,
+    7892,  7905,  7899,  7912,  7911,  7946,  7951,  7956,  7961,  7967,
+    7966,  7973,  7980,  7990,  7979,  8010,  8011,  8012,  8013,  8017,
+    8018,  8030,  8031,  8035,  8036,  8039,  8041,  8049,  8057,  8059,
+    8061,  8062,  8070,  8071,  8077,  8086,  8084,  8097,  8110,  8109,
+    8122,  8120,  8133,  8140,  8150,  8151,  8175,  8182,  8186,  8192,
+    8190,  8207,  8209,  8214,  8222,  8221,  8235,  8239,  8238,  8250,
+    8251,  8255,  8268,  8269,  8273,  8277,  8284,  8289,  8293,  8300,
+    8304,  8309,  8317,  8325,  8335,  8346,  8356,  8367,  8377,  8383,
+    8389,  8394,  8400,  8414,  8428,  8433,  8437,  8442,  8443,  8444,
+    8449,  8454,  8460,  8462,  8463,  8464,  8465,  8469,  8474,  8482,
+    8487,  8495,  8496,  8500,  8501,  8505,  8505,  8508,  8510,  8514,
+    8515,  8519,  8520,  8529,  8530,  8531,  8535,  8536,  8541,  8550,
+    8551,  8552,  8553,  8558,  8557,  8567,  8566,  8574,  8581,  8591,
+    8608,  8611,  8618,  8622,  8629,  8633,  8637,  8644,  8644,  8650,
+    8651,  8655,  8656,  8657,  8661,  8662,  8671,  8678,  8679,  8684,
+    8683,  8695,  8696,  8697,  8701,  8703,  8702,  8709,  8708,  8729,
+    8730,  8734,  8735,  8739,  8740,  8741,  8745,  8746,  8751,  8750,
+    8771,  8772,  8776,  8781,  8782,  8789,  8791,  8796,  8798,  8797,
+    8809,  8811,  8810,  8823,  8824,  8829,  8838,  8839,  8840,  8844,
+    8851,  8861,  8869,  8878,  8880,  8879,  8885,  8884,  8907,  8908,
+    8912,  8913,  8917,  8918,  8919,  8920,  8921,  8922,  8926,  8927,
+    8932,  8931,  8952,  8953,  8954,  8959,  8958,  8964,  8971,  8977,
+    8986,  8987,  8991,  9007,  9006,  9019,  9020,  9024,  9025,  9029,
+    9040,  9051,  9052,  9057,  9056,  9067,  9068,  9072,  9073,  9077,
+    9088,  9100,  9099,  9107,  9107,  9116,  9117,  9122,  9123,  9132,
+    9141,  9142,  9143,  9144,  9145,  9146,  9147,  9151,  9152,  9153,
+    9154,  9155,  9156,  9157,  9161,  9161,  9169,  9169,  9181,  9185,
+    9187,  9191,  9191,  9202,  9206,  9208,  9212,  9212,  9223,  9228,
+    9228,  9237,  9237,  9249,  9255,  9253,  9260,  9272,  9270,  9277,
+    9287,  9292,  9291,  9296,  9300,  9311,  9312,  9316,  9317,  9321,
+    9322,  9323,  9327,  9328,  9329,  9333,  9334,  9335,  9336,  9337,
+    9341,  9341,  9359,  9366,  9368,  9372,  9376,  9382,  9389,  9391,
+    9400,  9404,  9408,  9415,  9423,  9427,  9435,  9438,  9445,  9449,
+    9453,  9457,  9464,  9465,  9469,  9470,  9487,  9506,  9508,  9515,
+    9526,  9527,  9528,  9542,  9547,  9569,  9575,  9581,  9587,  9593,
+    9602,  9603,  9604,  9605,  9606,  9610,  9611,  9612,  9616,  9617,
+    9618,  9622,  9623,  9628,  9679,  9686,  9729,  9735,  9741,  9747,
+    9753,  9759,  9765,  9771,  9775,  9781,  9787,  9793,  9799,  9805,
+    9809,  9815,  9824,  9830,  9838,  9844,  9853,  9859,  9867,  9877,
+    9884,  9892,  9898,  9907,  9911,  9917,  9923,  9929,  9935,  9942,
+    9948,  9954,  9960,  9966,  9973,  9979,  9985,  9991,  9997, 10003,
+   10009, 10015, 10021, 10025, 10026, 10030, 10031, 10035, 10036, 10040,
+   10041, 10045, 10046, 10047, 10048, 10049, 10050, 10054, 10055, 10060,
+   10064, 10068, 10069, 10070, 10074, 10075, 10076, 10077, 10078, 10079,
+   10083, 10084, 10085, 10090, 10089, 10095, 10103, 10126, 10133, 10142,
+   10143, 10144, 10145, 10149, 10158, 10159, 10160, 10161, 10162, 10163,
+   10164, 10165, 10197, 10198, 10199, 10200, 10201, 10202, 10203, 10204,
+   10205, 10206, 10207, 10208, 10215, 10221, 10226, 10236, 10241, 10246,
+   10252, 10257, 10263, 10274, 10281, 10286, 10291, 10296, 10301, 10306,
+   10311, 10319, 10320, 10321, 10325, 10326, 10334, 10335, 10341, 10345,
+   10351, 10357, 10366, 10367, 10376, 10383, 10397, 10403, 10409, 10418,
+   10427, 10433, 10439, 10445, 10451, 10466, 10477, 10483, 10489, 10495,
+   10501, 10507, 10515, 10522, 10526, 10531, 10539, 10560, 10567, 10573,
+   10580, 10587, 10593, 10599, 10605, 10611, 10617, 10623, 10629, 10635,
+   10642, 10648, 10655, 10661, 10666, 10671, 10676, 10681, 10699, 10705,
+   10711, 10716, 10723, 10730, 10738, 10745, 10752, 10759, 10766, 10783,
+   10789, 10795, 10801, 10807, 10814, 10820, 10826, 10835, 10846, 10853,
+   10859, 10865, 10872, 10880, 10886, 10892, 10897, 10903, 10911, 10917,
+   10923, 10929, 10935, 10943, 10955, 10962, 10977, 10983, 10990, 10997,
+   11004, 11011, 11018, 11022, 11029, 11047, 11046, 11114, 11122, 11124,
+   11129, 11130, 11134, 11135, 11139, 11140, 11144, 11151, 11159, 11186,
+   11192, 11198, 11204, 11210, 11216, 11225, 11232, 11234, 11231, 11241,
+   11252, 11258, 11264, 11270, 11276, 11282, 11288, 11294, 11300, 11307,
+   11306, 11331, 11340, 11358, 11360, 11367, 11374, 11381, 11388, 11395,
+   11402, 11409, 11416, 11423, 11430, 11441, 11448, 11459, 11470, 11490,
+   11489, 11495, 11512, 11518, 11527, 11536, 11546, 11545, 11557, 11567,
+   11575, 11580, 11588, 11589, 11594, 11599, 11602, 11604, 11608, 11613,
+   11621, 11622, 11626, 11630, 11637, 11644, 11651, 11664, 11663, 11680,
+   11683, 11682, 11687, 11686, 11691, 11690, 11694, 11699, 11700, 11704,
+   11705, 11706, 11707, 11708, 11709, 11710, 11711, 11715, 11716, 11717,
+   11721, 11722, 11726, 11733, 11741, 11742, 11746, 11753, 11761, 11770,
+   11780, 11781, 11790, 11799, 11811, 11812, 11824, 11835, 11836, 11842,
+   11843, 11861, 11870, 11868, 11886, 11884, 11895, 11905, 11903, 11921,
+   11920, 11930, 11941, 11939, 11958, 11957, 11968, 11980, 11981, 11982,
+   11986, 11987, 11995, 11996, 12000, 12015, 12016, 12020, 12020, 12060,
+   12126, 12169, 12170, 12179, 12178, 12187, 12188, 12189, 12193, 12194,
+   12195, 12195, 12199, 12205, 12213, 12213, 12228, 12245, 12246, 12254,
+   12264, 12263, 12277, 12294, 12277, 12301, 12305, 12314, 12325, 12326,
+   12331, 12334, 12335, 12336, 12340, 12341, 12346, 12345, 12351, 12350,
+   12358, 12359, 12362, 12364, 12364, 12368, 12368, 12373, 12374, 12378,
+   12380, 12385, 12386, 12390, 12401, 12415, 12416, 12417, 12418, 12419,
+   12420, 12421, 12422, 12423, 12424, 12425, 12426, 12430, 12431, 12432,
+   12433, 12434, 12435, 12436, 12437, 12438, 12442, 12443, 12444, 12445,
+   12448, 12450, 12451, 12455, 12456, 12464, 12466, 12470, 12472, 12471,
+   12485, 12488, 12487, 12502, 12507, 12522, 12524, 12528, 12533, 12541,
+   12542, 12559, 12582, 12583, 12589, 12590, 12594, 12607, 12606, 12614,
+   12615, 12624, 12625, 12629, 12630, 12634, 12635, 12649, 12650, 12654,
+   12664, 12673, 12680, 12687, 12697, 12698, 12705, 12715, 12716, 12718,
+   12720, 12722, 12724, 12733, 12737, 12738, 12742, 12754, 12756, 12761,
+   12760, 12810, 12815, 12823, 12824, 12825, 12829, 12830, 12834, 12847,
+   12854, 12859, 12866, 12873, 12880, 12890, 12895, 12900, 12904, 12910,
+   12916, 12925, 12934, 12938, 12945, 12946, 12949, 12951, 12955, 12956,
+   12960, 12961, 12962, 12963, 12964, 12965, 12969, 12970, 12971, 12972,
+   12973, 12977, 12978, 12979, 12980, 12984, 12985, 12986, 12987, 12988,
+   12992, 12993, 12994, 12995, 12996, 13000, 13005, 13006, 13010, 13011,
+   13015, 13016, 13017, 13022, 13021, 13055, 13056, 13060, 13061, 13065,
+   13075, 13075, 13087, 13088, 13091, 13111, 13115, 13120, 13128, 13133,
+   13144, 13132, 13146, 13161, 13173, 13172, 13190, 13189, 13198, 13215,
+   13221, 13229, 13237, 13251, 13266, 13274, 13278, 13283, 13282, 13291,
+   13296, 13302, 13307, 13312, 13319, 13317, 13331, 13332, 13336, 13347,
+   13360, 13361, 13365, 13379, 13383, 13392, 13395, 13402, 13403, 13411,
+   13419, 13410, 13431, 13438, 13430, 13450, 13458, 13459, 13466, 13470,
+   13471, 13480, 13481, 13485, 13495, 13496, 13497, 13499, 13498, 13510,
+   13512, 13516, 13517, 13518, 13522, 13523, 13527, 13528, 13532, 13542,
+   13543, 13547, 13548, 13552, 13553, 13557, 13558, 13563, 13562, 13578,
+   13577, 13592, 13593, 13597, 13598, 13602, 13607, 13615, 13623, 13634,
+   13635, 13641, 13649, 13651, 13653, 13651, 13666, 13674, 13665, 13696,
+   13697, 13701, 13710, 13711, 13715, 13725, 13726, 13733, 13732, 13748,
+   13751, 13758, 13759, 13766, 13781, 13787, 13786, 13798, 13797, 13810,
+   13812, 13816, 13817, 13821, 13836, 13854, 13855, 13859, 13860, 13864,
+   13865, 13866, 13871, 13882, 13870, 13892, 13894, 13895, 13898, 13900,
+   13903, 13905, 13908, 13909, 13912, 13916, 13920, 13924, 13928, 13932,
+   13936, 13940, 13944, 13952, 13955, 13965, 13964, 13980, 13987, 13995,
+   14003, 14011, 14019, 14027, 14034, 14041, 14047, 14049, 14051, 14060,
+   14064, 14069, 14068, 14075, 14074, 14079, 14088, 14095, 14100, 14105,
+   14110, 14115, 14120, 14122, 14124, 14126, 14133, 14141, 14143, 14151,
+   14158, 14165, 14173, 14179, 14184, 14192, 14200, 14208, 14212, 14217,
+   14224, 14229, 14236, 14243, 14249, 14255, 14261, 14269, 14274, 14281,
+   14288, 14295, 14302, 14307, 14312, 14317, 14322, 14329, 14351, 14353,
+   14355, 14360, 14361, 14364, 14366, 14370, 14371, 14375, 14376, 14380,
+   14381, 14385, 14386, 14390, 14391, 14395, 14396, 14404, 14416, 14415,
+   14431, 14430, 14440, 14441, 14442, 14443, 14444, 14448, 14449, 14453,
+   14460, 14461, 14462, 14466, 14467, 14480, 14481, 14482, 14497, 14496,
+   14509, 14508, 14520, 14524, 14525, 14540, 14543, 14542, 14555, 14556,
+   14561, 14563, 14565, 14567, 14569, 14571, 14579, 14581, 14583, 14585,
+   14590, 14592, 14600, 14602, 14604, 14606, 14623, 14624, 14628, 14629,
+   14632, 14634, 14635, 14639, 14655, 14656, 14661, 14660, 14670, 14671,
+   14675, 14675, 14679, 14678, 14684, 14688, 14689, 14693, 14694, 14702,
+   14701, 14712, 14716, 14720, 14733, 14732, 14747, 14748, 14749, 14753,
+   14754, 14755, 14756, 14764, 14768, 14777, 14783, 14795, 14806, 14817,
+   14830, 14794, 14840, 14841, 14845, 14846, 14850, 14851, 14859, 14863,
+   14864, 14865, 14868, 14870, 14874, 14875, 14879, 14884, 14891, 14896,
+   14903, 14905, 14909, 14910, 14914, 14919, 14927, 14928, 14932, 14934,
+   14942, 14943, 14947, 14948, 14949, 14953, 14955, 14960, 14961, 14970,
+   14971, 14975, 14976, 14980, 14993, 14998, 15003, 15008, 15016, 15024,
+   15029, 15042, 15051, 15067, 15074, 15080, 15090, 15091, 15099, 15100,
+   15101, 15102, 15116, 15122, 15128, 15134, 15140, 15146, 15165, 15175,
+   15185, 15191, 15198, 15208, 15216, 15224, 15236, 15237, 15246, 15245,
+   15264, 15265, 15270, 15271, 15278, 15276, 15303, 15304, 15310, 15315,
+   15324, 15339, 15340, 15344, 15349, 15357, 15362, 15370, 15375, 15380,
+   15385, 15391, 15396, 15404, 15409, 15414, 15419, 15425, 15433, 15434,
+   15445, 15453, 15457, 15463, 15469, 15479, 15485, 15494, 15504, 15505,
+   15509, 15510, 15511, 15515, 15523, 15531, 15539, 15547, 15548, 15556,
+   15557, 15565, 15566, 15571, 15580, 15581, 15589, 15590, 15599, 15600,
+   15608, 15609, 15613, 15622, 15623, 15624, 15628, 15641, 15671, 15681,
+   15681, 15683, 15693, 15694, 15695, 15696, 15697, 15698, 15699, 15700,
+   15701, 15706, 15707, 15708, 15709, 15710, 15711, 15712, 15713, 15714,
+   15715, 15723, 15724, 15725, 15726, 15727, 15728, 15732, 15733, 15734,
+   15735, 15736, 15737, 15738, 15739, 15740, 15744, 15745, 15746, 15747,
+   15748, 15749, 15750, 15754, 15755, 15756, 15757, 15758, 15759, 15760,
+   15761, 15762, 15766, 15767, 15768, 15769, 15770, 15771, 15772, 15785,
+   15786, 15787, 15788, 15789, 15790, 15791, 15792, 15793, 15794, 15795,
+   15796, 15797, 15798, 15799, 15800, 15801, 15802, 15803, 15804, 15805,
+   15806, 15807, 15808, 15809, 15810, 15811, 15812, 15813, 15814, 15815,
+   15816, 15817, 15818, 15819, 15820, 15821, 15822, 15823, 15824, 15825,
+   15826, 15827, 15828, 15829, 15830, 15831, 15832, 15833, 15834, 15835,
+   15836, 15837, 15838, 15839, 15880, 15881, 15882, 15883, 15884, 15885,
+   15896, 15897, 15898, 15899, 15900, 15901, 15902, 15903, 15904, 15905,
+   15909, 15910, 15911, 15918, 15919, 15920, 15924, 15925, 15926, 15935,
+   15936, 15937, 15938, 15939, 15940, 15941, 15942, 15943, 15944, 15945,
+   15946, 15947, 15948, 15949, 15950, 15951, 15952, 15953, 15954, 15955,
+   15956, 15957, 15958, 15959, 15960, 15961, 15962, 15963, 15964, 15965,
+   15966, 15967, 15968, 15976, 15977, 15978, 15979, 15980, 15981, 15982,
+   15983, 15984, 15985, 15986, 15987, 15988, 15989, 15990, 15991, 15992,
+   15993, 15994, 15995, 15996, 15997, 15998, 15999, 16000, 16001, 16002,
+   16003, 16004, 16005, 16006, 16007, 16008, 16009, 16010, 16011, 16012,
+   16013, 16014, 16015, 16016, 16017, 16018, 16019, 16020, 16021, 16026,
+   16027, 16028, 16029, 16030, 16031, 16032, 16033, 16034, 16035, 16036,
+   16037, 16038, 16039, 16040, 16041, 16042, 16043, 16044, 16045, 16046,
+   16047, 16048, 16049, 16050, 16051, 16052, 16053, 16054, 16055, 16056,
+   16057, 16058, 16059, 16060, 16061, 16062, 16063, 16064, 16065, 16066,
+   16067, 16068, 16069, 16070, 16071, 16072, 16073, 16074, 16075, 16076,
+   16077, 16078, 16079, 16080, 16081, 16082, 16083, 16084, 16085, 16086,
+   16087, 16088, 16089, 16090, 16091, 16092, 16093, 16094, 16095, 16096,
+   16097, 16098, 16099, 16100, 16101, 16102, 16103, 16104, 16105, 16106,
+   16107, 16108, 16109, 16110, 16111, 16112, 16113, 16114, 16115, 16116,
+   16117, 16118, 16119, 16120, 16121, 16122, 16123, 16124, 16125, 16126,
+   16127, 16128, 16129, 16130, 16131, 16132, 16133, 16134, 16135, 16136,
+   16137, 16138, 16139, 16140, 16141, 16142, 16143, 16144, 16145, 16146,
+   16147, 16148, 16149, 16150, 16151, 16152, 16153, 16154, 16155, 16156,
+   16157, 16158, 16159, 16160, 16161, 16162, 16163, 16164, 16165, 16166,
+   16167, 16168, 16169, 16170, 16171, 16172, 16173, 16174, 16175, 16176,
+   16177, 16178, 16179, 16180, 16181, 16182, 16183, 16184, 16185, 16186,
+   16187, 16188, 16189, 16190, 16191, 16192, 16193, 16194, 16195, 16196,
+   16197, 16198, 16199, 16200, 16201, 16202, 16203, 16204, 16205, 16206,
+   16207, 16208, 16209, 16210, 16211, 16212, 16213, 16214, 16215, 16216,
+   16217, 16218, 16219, 16220, 16221, 16222, 16223, 16224, 16225, 16226,
+   16227, 16228, 16229, 16230, 16231, 16232, 16233, 16234, 16235, 16236,
+   16237, 16238, 16239, 16240, 16241, 16242, 16243, 16244, 16245, 16246,
+   16247, 16248, 16249, 16250, 16251, 16252, 16253, 16254, 16255, 16256,
+   16257, 16258, 16259, 16260, 16261, 16262, 16263, 16264, 16265, 16266,
+   16267, 16268, 16269, 16270, 16271, 16272, 16273, 16274, 16275, 16276,
+   16277, 16278, 16279, 16280, 16281, 16282, 16283, 16284, 16285, 16286,
+   16287, 16288, 16289, 16290, 16291, 16303, 16302, 16312, 16316, 16311,
+   16329, 16328, 16342, 16341, 16357, 16356, 16383, 16384, 16390, 16389,
+   16396, 16395, 16405, 16404, 16415, 16414, 16420, 16428, 16430, 16435,
+   16435, 16444, 16443, 16457, 16456, 16461, 16465, 16466, 16467, 16471,
+   16472, 16473, 16474, 16478, 16479, 16480, 16481, 16486, 16491, 16496,
+   16505, 16510, 16515, 16520, 16525, 16530, 16535, 16540, 16554, 16565,
+   16584, 16602, 16614, 16622, 16627, 16643, 16644, 16645, 16646, 16650,
+   16669, 16687, 16688, 16692, 16693, 16694, 16695, 16699, 16714, 16718,
+   16719, 16720, 16730, 16731, 16732, 16738, 16744, 16756, 16755, 16769,
+   16770, 16776, 16785, 16786, 16790, 16791, 16795, 16814, 16815, 16816,
+   16821, 16822, 16827, 16826, 16843, 16853, 16864, 16863, 16895, 16896,
+   16900, 16901, 16905, 16906, 16907, 16908, 16910, 16909, 16922, 16923,
+   16924, 16925, 16926, 16932, 16937, 16943, 16949, 16955, 16962, 16969,
+   16973, 16980, 16989, 16991, 16996, 17001, 17008, 17015, 17022, 17029,
+   17036, 17043, 17055, 17056, 17060, 17061, 17065, 17070, 17078, 17088,
+   17107, 17110, 17112, 17116, 17117, 17124, 17126, 17130, 17131, 17136,
+   17135, 17139, 17138, 17142, 17141, 17145, 17144, 17147, 17148, 17149,
+   17150, 17151, 17152, 17153, 17154, 17155, 17156, 17157, 17158, 17159,
+   17160, 17161, 17162, 17163, 17164, 17165, 17166, 17167, 17168, 17169,
+   17170, 17171, 17172, 17173, 17177, 17178, 17182, 17183, 17187, 17194,
+   17201, 17211, 17221, 17230, 17239, 17252, 17257, 17265, 17270, 17278,
+   17283, 17290, 17290, 17291, 17291, 17294, 17301, 17306, 17312, 17318,
+   17324, 17328, 17332, 17333, 17337, 17365, 17367, 17371, 17375, 17379,
+   17386, 17392, 17398, 17404, 17410, 17419, 17420, 17424, 17425, 17430,
+   17431, 17435, 17436, 17440, 17441, 17445, 17446, 17451, 17450, 17460,
+   17469, 17470, 17474, 17475, 17480, 17481, 17482, 17487, 17488, 17489,
+   17493, 17505, 17514, 17520, 17529, 17538, 17551, 17553, 17555, 17560,
+   17561, 17566, 17565, 17582, 17581, 17593, 17593, 17614, 17615, 17622,
+   17630, 17631, 17632, 17636, 17637, 17642, 17641, 17663, 17670, 17671,
+   17675, 17676, 17680, 17681, 17682, 17687, 17695, 17716, 17743, 17745,
+   17749, 17750, 17754, 17755, 17763, 17764, 17765, 17766, 17767, 17773,
+   17779, 17789, 17790, 17795, 17808, 17824, 17825, 17826, 17830, 17831,
+   17835, 17836, 17841, 17842, 17846, 17852, 17861, 17861, 17886, 17887,
+   17888, 17889, 17890, 17891, 17892, 17896, 17897, 17898, 17899, 17909,
+   17911, 17917, 17923, 17933, 17942, 17948, 17953, 17957, 17931, 18011,
+   18029, 18028, 18046, 18055, 18044, 18077, 18085, 18076, 18098, 18108,
+   18118, 18119, 18123, 18124, 18130, 18134, 18138, 18142, 18146, 18150,
+   18158, 18159, 18175, 18182, 18189, 18199, 18200, 18201, 18205, 18206,
+   18207, 18211, 18212, 18217, 18219, 18218, 18224, 18225, 18229, 18236,
+   18246, 18252, 18263
 };
 #endif
 
@@ -25650,58 +25650,56 @@
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
             Lex->server_options.host= (yyvsp[0].lex_str);
-            my_casedn_str(system_charset_info,
-		         (char*) Lex->server_options.host.str);
           }
-#line 25657 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25655 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 227:
-#line 2722 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2720 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.db.str == 0);
             Lex->server_options.db= (yyvsp[0].lex_str);
           }
-#line 25666 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25664 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 228:
-#line 2727 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2725 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.owner.str == 0);
             Lex->server_options.owner= (yyvsp[0].lex_str);
           }
-#line 25675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25673 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 229:
-#line 2732 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.password.str == 0);
             Lex->server_options.password= (yyvsp[0].lex_str);
           }
-#line 25684 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25682 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 230:
-#line 2737 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2735 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS(Lex->server_options.socket.str == 0);
             Lex->server_options.socket= (yyvsp[0].lex_str);
           }
-#line 25693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25691 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 231:
-#line 2742 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2740 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->server_options.port= (yyvsp[0].ulong_num);
           }
-#line 25701 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25699 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 232:
-#line 2749 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2747 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -25718,11 +25716,11 @@
             lex->sql_command= SQLCOM_CREATE_EVENT;
             /* We need that for disallowing subqueries */
           }
-#line 25722 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25720 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 233:
-#line 2770 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2768 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               sql_command is set here because some rules in ev_sql_stmt
@@ -25730,123 +25728,123 @@
             */
             Lex->sql_command= SQLCOM_CREATE_EVENT;
           }
-#line 25734 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 234:
-#line 2781 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2779 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->item_expression= (yyvsp[-1].item);
             Lex->event_parse_data->interval= (yyvsp[0].interval);
           }
-#line 25743 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25741 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 236:
-#line 2788 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2786 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->item_execute_at= (yyvsp[0].item);
           }
-#line 25751 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25749 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 237:
-#line 2794 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2792 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 25757 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25755 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 238:
-#line 2796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2794 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->status= Event_parse_data::ENABLED;
             Lex->event_parse_data->status_changed= true;
             (yyval.num)= 1;
           }
-#line 25767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25765 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 239:
-#line 2802 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2800 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->status= Event_parse_data::SLAVESIDE_DISABLED;
             Lex->event_parse_data->status_changed= true; 
             (yyval.num)= 1;
           }
-#line 25777 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25775 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 240:
-#line 2808 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2806 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->status= Event_parse_data::DISABLED;
             Lex->event_parse_data->status_changed= true;
             (yyval.num)= 1;
           }
-#line 25787 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 241:
-#line 2817 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2815 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_func_now_local(thd, 0);
             if (unlikely(item == NULL))
               MYSQL_YYABORT;
             Lex->event_parse_data->item_starts= item;
           }
-#line 25798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25796 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 242:
-#line 2824 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2822 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->item_starts= (yyvsp[0].item);
           }
-#line 25806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25804 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 244:
-#line 2832 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2830 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->item_ends= (yyvsp[0].item);
           }
-#line 25814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25812 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 245:
-#line 2838 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2836 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 25820 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25818 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 247:
-#line 2844 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2842 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->event_parse_data->on_completion= (yyvsp[-1].num)
                                     ? Event_parse_data::ON_COMPLETION_DROP
                                     : Event_parse_data::ON_COMPLETION_PRESERVE;
             (yyval.num)= 1;
           }
-#line 25831 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25829 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 248:
-#line 2853 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2851 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 25837 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25835 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 249:
-#line 2855 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2853 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->comment= Lex->event_parse_data->comment= (yyvsp[0].lex_str);
             (yyval.num)= 1;
           }
-#line 25846 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25844 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 250:
-#line 2862 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -25878,11 +25876,11 @@
 
             lex->sphead->set_body_start(thd, lip->get_cpp_ptr());
           }
-#line 25882 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25880 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 251:
-#line 2894 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2892 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
 
@@ -25892,11 +25890,11 @@
 
             lex->event_parse_data->body_changed= TRUE;
           }
-#line 25896 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25894 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 252:
-#line 2907 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
            LEX *lex=Lex;
            lex->users_list.empty();
@@ -25908,516 +25906,516 @@
            lex->ssl_cipher= lex->x509_subject= lex->x509_issuer= 0;
            bzero((char *)&(lex->mqh),sizeof(lex->mqh));
          }
-#line 25912 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25910 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 253:
-#line 2922 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2920 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 25921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 254:
-#line 2927 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2925 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.spname)= Lex->make_sp_name(thd, &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 25930 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25928 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 255:
-#line 2934 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2932 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spname)= NULL; }
-#line 25936 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25934 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 256:
-#line 2935 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2933 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spname)= (yyvsp[0].spname); }
-#line 25942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25940 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 257:
-#line 2939 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2937 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 25948 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25946 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 258:
-#line 2940 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2938 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 25954 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 259:
-#line 2944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2942 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 25960 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25958 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 260:
-#line 2945 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2943 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 25966 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25964 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 261:
-#line 2951 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
-#line 25972 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 262:
-#line 2953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2951 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* Just parse it, we only have one language for now. */ }
-#line 25978 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25976 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 263:
-#line 2955 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_NO_SQL; }
-#line 25984 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 264:
-#line 2957 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2955 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_CONTAINS_SQL; }
-#line 25990 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25988 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 265:
-#line 2959 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2957 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_READS_SQL_DATA; }
-#line 25996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 25994 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 266:
-#line 2961 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2959 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.daccess= SP_MODIFIES_SQL_DATA; }
-#line 26002 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26000 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 267:
-#line 2963 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2961 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.suid= (yyvsp[0].sp_suid); }
-#line 26008 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26006 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 268:
-#line 2968 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2966 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.comment= (yyvsp[0].lex_str); }
-#line 26014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 269:
-#line 2970 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2968 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.suid= (yyvsp[0].sp_suid); }
-#line 26020 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26018 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 270:
-#line 2974 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2972 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 26026 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26024 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 271:
-#line 2975 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2973 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 26032 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26030 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 273:
-#line 2980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2978 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 26038 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26036 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 274:
-#line 2984 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2982 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.init(); }
-#line 26044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 276:
-#line 2990 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2988 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 26050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 277:
-#line 2991 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2989 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sp_chistics.detistic= ! (yyvsp[-1].num); }
-#line 26056 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 278:
-#line 2995 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2993 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.sp_suid)= SP_IS_SUID; }
-#line 26062 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 279:
-#line 2996 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2994 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.sp_suid)= SP_IS_NOT_SUID; }
-#line 26068 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26066 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 280:
-#line 3001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 2999 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->call_statement_start(thd, (yyvsp[0].spname))))
               MYSQL_YYABORT;
           }
-#line 26077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26075 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 281:
-#line 3005 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3003 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 26083 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26081 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 286:
-#line 3021 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3019 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
            Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
           }
-#line 26091 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26089 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 287:
-#line 3025 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3023 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->value_list.push_back((yyvsp[0].item), thd->mem_root);
           }
-#line 26099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26097 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 292:
-#line 3043 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3041 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.spvar)= Lex->sp_param_init(&(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 26108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26106 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 293:
-#line 3051 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3049 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_param_fill_definition((yyval.spvar)= (yyvsp[-1].spvar))))
               MYSQL_YYABORT;
           }
-#line 26117 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 294:
-#line 3056 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3054 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26124 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 295:
-#line 3061 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3059 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyval.spvar)= (yyvsp[-7].spvar), (yyvsp[-6].ident_sys), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26135 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 296:
-#line 3066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3064 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-3].spvar), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26142 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 297:
-#line 3071 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3069 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyval.spvar)= (yyvsp[-5].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26153 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26151 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 298:
-#line 3076 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3074 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->spvar_fill_row(thd, (yyval.spvar)= (yyvsp[-2].spvar), (yyvsp[0].spvar_definition_list))))
               MYSQL_YYABORT;
           }
-#line 26162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26160 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 303:
-#line 3095 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3093 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-2].spvar)->mode= (yyvsp[-1].spvar_mode);
             if (unlikely(Lex->sp_param_fill_definition((yyvsp[-2].spvar))))
               MYSQL_YYABORT;
           }
-#line 26172 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26170 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 304:
-#line 3101 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3099 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-6].spvar)->mode= (yyvsp[-5].spvar_mode);
             if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyvsp[-6].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26182 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 305:
-#line 3107 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3105 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-8].spvar)->mode= (yyvsp[-7].spvar_mode);
             if (unlikely(Lex->sphead->spvar_fill_type_reference(thd, (yyvsp[-8].spvar), (yyvsp[-6].ident_sys), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26190 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 306:
-#line 3113 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3111 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-4].spvar)->mode= (yyvsp[-3].spvar_mode);
             if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyvsp[-4].spvar), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26202 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26200 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 307:
-#line 3119 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3117 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-6].spvar)->mode= (yyvsp[-5].spvar_mode);
             if (unlikely(Lex->sphead->spvar_fill_table_rowtype_reference(thd, (yyvsp[-6].spvar), (yyvsp[-4].ident_sys), (yyvsp[-2].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 26212 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 308:
-#line 3125 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-3].spvar)->mode= (yyvsp[-2].spvar_mode);
             if (unlikely(Lex->sphead->spvar_fill_row(thd, (yyvsp[-3].spvar), (yyvsp[0].spvar_definition_list))))
               MYSQL_YYABORT;
           }
-#line 26222 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26220 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 309:
-#line 3133 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_IN; }
-#line 26228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26226 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 310:
-#line 3134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3132 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_IN; }
-#line 26234 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26232 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 311:
-#line 3135 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3133 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_OUT; }
-#line 26240 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26238 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 312:
-#line 3136 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
-#line 26246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26244 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 313:
-#line 3137 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3135 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spvar_mode)= sp_variable::MODE_INOUT; }
-#line 26252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26250 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 314:
-#line 3142 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
           }
-#line 26260 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 315:
-#line 3147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
           }
-#line 26268 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26266 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 316:
-#line 3154 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3152 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sphead->m_param_begin= YYLIP->get_cpp_tok_start() + 1;
           }
-#line 26276 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26274 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 317:
-#line 3159 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3157 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sphead->m_param_end= YYLIP->get_cpp_tok_start();
           }
-#line 26284 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26282 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 318:
-#line 3166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3164 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sphead->m_param_begin= Lex->sphead->m_param_end=
               YYLIP->get_cpp_tok_start() + 1;
           }
-#line 26293 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26291 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 323:
-#line 3183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3181 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 26299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26297 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 325:
-#line 3188 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3186 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 26305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26303 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 327:
-#line 3193 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3191 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sp_block_init(thd);
           }
-#line 26313 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26311 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 328:
-#line 3197 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3195 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_block_finalize(thd)))
               MYSQL_YYABORT;
           }
-#line 26322 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26320 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 329:
-#line 3205 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3203 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spblock).init();
           }
-#line 26330 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26328 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 330:
-#line 3208 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3206 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spblock)= (yyvsp[0].spblock); }
-#line 26336 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26334 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 331:
-#line 3213 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3211 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->sp_add_instr_cpush_for_cursors(thd, Lex->spcont)))
               MYSQL_YYABORT;
           }
-#line 26345 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26343 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 332:
-#line 3218 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[0].spblock));
           }
-#line 26353 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26351 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 334:
-#line 3225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3223 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spblock)= (yyvsp[-1].spblock); }
-#line 26359 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26357 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 335:
-#line 3227 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[-1].spblock));
           }
-#line 26367 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26365 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 336:
-#line 3233 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3231 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spblock)= (yyvsp[-1].spblock); }
-#line 26373 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26371 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 337:
-#line 3235 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3233 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spblock).join((yyvsp[-2].spblock), (yyvsp[-1].spblock));
           }
-#line 26381 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26379 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 338:
-#line 3241 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3239 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spblock).init(); }
-#line 26387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26385 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 340:
-#line 3247 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3245 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
                          Qualified_column_ident(&(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 26397 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26395 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 341:
-#line 3253 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
                            Qualified_column_ident(&(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 26407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 342:
-#line 3259 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3257 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.qualified_column_ident)= new (thd->mem_root)
                            Qualified_column_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 26417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26415 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 343:
-#line 3268 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3266 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(check_string_char_length(&(yyvsp[0].ident_sys), 0, NAME_CHAR_LEN,
                                                   system_charset_info, 1)))
@@ -26426,21 +26424,21 @@
               MYSQL_YYABORT;
             Lex->init_last_field((yyval.spvar_definition), &(yyvsp[0].ident_sys), thd->variables.collation_database);
           }
-#line 26430 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26428 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 345:
-#line 3284 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3282 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.spvar_definition_list)= new (thd->mem_root) Row_definition_list())) ||
                 unlikely((yyval.spvar_definition_list)->push_back((yyvsp[0].spvar_definition), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 26440 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26438 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 346:
-#line 3290 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3288 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             uint unused;
             if (unlikely((yyvsp[-2].spvar_definition_list)->find_row_field_by_name(&(yyvsp[0].spvar_definition)->field_name, &unused)))
@@ -26449,25 +26447,25 @@
             if (unlikely((yyval.spvar_definition_list)->push_back((yyvsp[0].spvar_definition), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 26453 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26451 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 347:
-#line 3301 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3299 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spvar_definition_list)= (yyvsp[-1].spvar_definition_list); }
-#line 26459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26457 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 348:
-#line 3306 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3304 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sp_variable_declarations_init(thd, (yyvsp[0].num));
           }
-#line 26467 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 349:
-#line 3315 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3313 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_variable_declarations_finalize(thd, (yyvsp[-2].num),
                                                                 &Lex->last_field[0],
@@ -26475,52 +26473,52 @@
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-2].num));
           }
-#line 26479 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26477 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 350:
-#line 3325 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3323 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_variable_declarations_with_ref_finalize(thd, (yyvsp[-4].num), (yyvsp[-3].qualified_column_ident), (yyvsp[0].item))))
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-4].num));
           }
-#line 26489 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26487 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 351:
-#line 3333 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3331 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_variable_declarations_rowtype_finalize(thd, (yyvsp[-4].num), (yyvsp[-3].qualified_column_ident), (yyvsp[0].item))))
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-4].num));
           }
-#line 26499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26497 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 352:
-#line 3341 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3339 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_variable_declarations_row_finalize(thd, (yyvsp[-3].num), (yyvsp[-1].spvar_definition_list), (yyvsp[0].item))))
               MYSQL_YYABORT;
             (yyval.spblock).init_using_vars((yyvsp[-3].num));
           }
-#line 26509 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 354:
-#line 3351 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3349 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->spcont->declare_condition(thd, &(yyvsp[-3].ident_sys), (yyvsp[0].spcondvalue))))
               MYSQL_YYABORT;
             (yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
             (yyval.spblock).conds= 1;
           }
-#line 26520 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26518 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 355:
-#line 3358 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3356 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             sp_condition_value *spcond= new (thd->mem_root)
                                         sp_condition_value_user_defined();
@@ -26530,19 +26528,19 @@
             (yyval.spblock).vars= (yyval.spblock).hndlrs= (yyval.spblock).curs= 0;
             (yyval.spblock).conds= 1;
           }
-#line 26534 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26532 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 356:
-#line 3368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3366 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sp_block_init(thd);
           }
-#line 26542 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26540 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 357:
-#line 3373 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3371 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             sp_pcontext *param_ctx= Lex->spcont;
             if (unlikely(Lex->sp_block_finalize(thd)))
@@ -26552,51 +26550,51 @@
             (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).hndlrs= 0;
             (yyval.spblock).curs= 1;
           }
-#line 26556 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 358:
-#line 3386 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_handler_declaration_init(thd, (yyvsp[-2].num))))
               MYSQL_YYABORT;
           }
-#line 26565 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26563 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 359:
-#line 3391 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_handler_declaration_finalize(thd, (yyvsp[-5].num))))
               MYSQL_YYABORT;
             (yyval.spblock).vars= (yyval.spblock).conds= (yyval.spblock).curs= 0;
             (yyval.spblock).hndlrs= 1;
           }
-#line 26576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26574 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 362:
-#line 3406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3404 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(thd->lex->sphead);
             if (unlikely(!((yyval.sp_cursor_stmt)= new (thd->mem_root)
                            sp_lex_cursor(thd, thd->lex))))
               MYSQL_YYABORT;
           }
-#line 26587 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26585 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 363:
-#line 3416 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3414 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(thd->free_list == NULL);
             Lex->sphead->reset_lex(thd, (yyvsp[0].sp_cursor_stmt));
           }
-#line 26596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26594 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 364:
-#line 3421 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex == (yyvsp[-2].sp_cursor_stmt));
             if (unlikely((yyvsp[-2].sp_cursor_stmt)->stmt_finalize(thd)) ||
@@ -26604,47 +26602,47 @@
               MYSQL_YYABORT;
             (yyval.sp_cursor_stmt)= (yyvsp[-2].sp_cursor_stmt);
           }
-#line 26608 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26606 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 365:
-#line 3431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3429 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::EXIT; }
-#line 26614 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26612 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 366:
-#line 3432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3430 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::CONTINUE; }
-#line 26620 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 367:
-#line 3433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::EXIT; }
-#line 26626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26624 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 368:
-#line 3434 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= sp_handler::CONTINUE; }
-#line 26632 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26630 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 369:
-#line 3440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 26638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 370:
-#line 3442 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)+= 1; }
-#line 26644 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26642 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 371:
-#line 3447 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3445 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -26656,11 +26654,11 @@
             sp_instr_hpush_jump *i= (sp_instr_hpush_jump *)sp->last_instruction();
             i->add_condition((yyvsp[0].spcondvalue));
           }
-#line 26660 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26658 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 372:
-#line 3462 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* mysql errno */
             if (unlikely((yyvsp[0].ulong_num) == 0))
               my_yyabort_error((ER_WRONG_VALUE, MYF(0), "CONDITION", "0"));
@@ -26668,11 +26666,11 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 26672 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 374:
-#line 3474 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3472 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* SQLSTATE */
 
             /*
@@ -26689,108 +26687,108 @@
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 26693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26691 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 375:
-#line 3493 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3491 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 26699 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 376:
-#line 3494 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3492 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 26705 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 377:
-#line 3499 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3497 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spcondvalue)= (yyvsp[0].spcondvalue);
           }
-#line 26713 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26711 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 378:
-#line 3503 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3501 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spcondvalue)= Lex->spcont->find_declared_or_predefined_condition(thd, &(yyvsp[0].ident_sys));
             if (unlikely((yyval.spcondvalue) == NULL))
               my_yyabort_error((ER_SP_COND_MISMATCH, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 26723 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26721 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 379:
-#line 3509 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3507 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::WARNING);
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 26733 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26731 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 380:
-#line 3515 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3513 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::NOT_FOUND);
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 26743 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26741 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 381:
-#line 3521 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3519 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 26753 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26751 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 382:
-#line 3527 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3525 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.spcondvalue)= new (thd->mem_root) sp_condition_value(sp_condition_value::EXCEPTION);
             if (unlikely((yyval.spcondvalue) == NULL))
               MYSQL_YYABORT;
           }
-#line 26763 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26761 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 383:
-#line 3537 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3535 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_resignal_statement(thd, NULL)))
               MYSQL_YYABORT;
           }
-#line 26772 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26770 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 384:
-#line 3542 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue))))
               MYSQL_YYABORT;
           }
-#line 26781 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 385:
-#line 3550 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3548 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_signal_statement(thd, (yyvsp[-1].spcondvalue))))
               MYSQL_YYABORT;
           }
-#line 26790 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26788 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 386:
-#line 3558 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3556 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_condition_value *cond;
@@ -26805,37 +26803,37 @@
               my_yyabort_error((ER_SIGNAL_BAD_CONDITION_TYPE, MYF(0)));
             (yyval.spcondvalue)= cond;
           }
-#line 26809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26807 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 387:
-#line 3573 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3571 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
-#line 26815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26813 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 388:
-#line 3578 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3576 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spcondvalue)= NULL; }
-#line 26821 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26819 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 389:
-#line 3580 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3578 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.spcondvalue)= (yyvsp[0].spcondvalue); }
-#line 26827 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26825 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 390:
-#line 3585 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3583 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             thd->m_parser_state->m_yacc.m_set_signal_info.clear();
           }
-#line 26835 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26833 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 392:
-#line 3593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3591 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Set_signal_information *info;
             info= &thd->m_parser_state->m_yacc.m_set_signal_info;
@@ -26843,11 +26841,11 @@
             info->clear();
             info->m_item[index]= (yyvsp[0].item);
           }
-#line 26847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 393:
-#line 3602 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3600 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Set_signal_information *info;
             info= &thd->m_parser_state->m_yacc.m_set_signal_info;
@@ -26857,17 +26855,17 @@
                                 Diag_condition_item_names[index].str));
             info->m_item[index]= (yyvsp[0].item);
           }
-#line 26861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26859 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 394:
-#line 3618 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3616 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 26867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26865 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 395:
-#line 3620 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3618 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if ((yyvsp[0].item)->type() == Item::FUNC_ITEM)
             {
@@ -26885,98 +26883,98 @@
             }
             (yyval.item)= (yyvsp[0].item);
           }
-#line 26889 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26887 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 396:
-#line 3638 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 26895 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26893 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 397:
-#line 3644 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3642 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CLASS_ORIGIN; }
-#line 26901 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 398:
-#line 3646 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3644 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_SUBCLASS_ORIGIN; }
-#line 26907 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26905 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 399:
-#line 3648 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3646 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_CATALOG; }
-#line 26913 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26911 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 400:
-#line 3650 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3648 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_SCHEMA; }
-#line 26919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26917 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 401:
-#line 3652 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3650 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CONSTRAINT_NAME; }
-#line 26925 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 402:
-#line 3654 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3652 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CATALOG_NAME; }
-#line 26931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26929 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 403:
-#line 3656 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3654 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_SCHEMA_NAME; }
-#line 26937 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26935 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 404:
-#line 3658 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3656 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_TABLE_NAME; }
-#line 26943 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 405:
-#line 3660 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3658 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_COLUMN_NAME; }
-#line 26949 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26947 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 406:
-#line 3662 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3660 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_CURSOR_NAME; }
-#line 26955 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26953 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 407:
-#line 3664 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3662 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_MESSAGE_TEXT; }
-#line 26961 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26959 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 408:
-#line 3666 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3664 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_condition_item_name)= DIAG_MYSQL_ERRNO; }
-#line 26967 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26965 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 409:
-#line 3671 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3669 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_resignal_statement(thd, (yyvsp[-1].spcondvalue))))
               MYSQL_YYABORT;
           }
-#line 26976 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26974 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 410:
-#line 3679 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3677 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Diagnostics_information *info= (yyvsp[0].diag_info);
 
@@ -26988,222 +26986,222 @@
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 26992 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26990 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 411:
-#line 3694 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
-#line 26998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 26996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 412:
-#line 3696 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3694 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.diag_area)= Diagnostics_information::CURRENT_AREA; }
-#line 27004 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27002 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 413:
-#line 3701 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3699 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.diag_info)= new (thd->mem_root) Statement_information((yyvsp[0].stmt_info_list));
             if (unlikely((yyval.diag_info) == NULL))
               MYSQL_YYABORT;
           }
-#line 27014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 414:
-#line 3707 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.diag_info)= new (thd->mem_root) Condition_information((yyvsp[-1].item), (yyvsp[0].cond_info_list));
             if (unlikely((yyval.diag_info) == NULL))
               MYSQL_YYABORT;
           }
-#line 27024 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27022 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 415:
-#line 3716 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3714 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.stmt_info_list)= new (thd->mem_root) List;
             if (unlikely((yyval.stmt_info_list) == NULL) ||
                 unlikely((yyval.stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 27035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27033 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 416:
-#line 3723 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3721 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-2].stmt_info_list)->push_back((yyvsp[0].stmt_info_item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.stmt_info_list)= (yyvsp[-2].stmt_info_list);
           }
-#line 27045 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27043 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 417:
-#line 3732 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.stmt_info_item)= new (thd->mem_root) Statement_information_item((yyvsp[0].stmt_info_item_name), (yyvsp[-2].item));
             if (unlikely((yyval.stmt_info_item) == NULL))
               MYSQL_YYABORT;
           }
-#line 27055 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27053 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 418:
-#line 3740 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3739 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= thd->lex->create_item_for_sp_var(&(yyvsp[0].ident_cli), NULL))))
               MYSQL_YYABORT;
           }
-#line 27064 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27062 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 419:
-#line 3745 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3744 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 27074 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27072 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 420:
-#line 3754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3753 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
-#line 27080 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27078 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 421:
-#line 3756 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3755 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.stmt_info_item_name)= Statement_information_item::NUMBER; }
-#line 27086 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27084 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 422:
-#line 3758 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3757 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.stmt_info_item_name)= Statement_information_item::ROW_COUNT; }
-#line 27092 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27090 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 423:
-#line 3767 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3766 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 27098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27096 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 424:
-#line 3772 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3771 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.cond_info_list)= new (thd->mem_root) List;
             if (unlikely((yyval.cond_info_list) == NULL) ||
                 unlikely((yyval.cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 27109 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27107 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 425:
-#line 3779 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3778 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-2].cond_info_list)->push_back((yyvsp[0].cond_info_item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.cond_info_list)= (yyvsp[-2].cond_info_list);
           }
-#line 27119 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27117 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 426:
-#line 3788 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 3787 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.cond_info_item)= new (thd->mem_root) Condition_information_item((yyvsp[0].cond_info_item_name), (yyvsp[-2].item));
             if (unlikely((yyval.cond_info_item) == NULL))
               MYSQL_YYABORT;
           }
-#line 27129 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 427:
 #line 3796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CLASS_ORIGIN; }
-#line 27135 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 428:
 #line 3798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::SUBCLASS_ORIGIN; }
-#line 27141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 429:
 #line 3800 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_CATALOG; }
-#line 27147 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27145 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 430:
 #line 3802 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_SCHEMA; }
-#line 27153 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27151 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 431:
 #line 3804 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CONSTRAINT_NAME; }
-#line 27159 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27157 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 432:
 #line 3806 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CATALOG_NAME; }
-#line 27165 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27163 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 433:
 #line 3808 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::SCHEMA_NAME; }
-#line 27171 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 434:
 #line 3810 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::TABLE_NAME; }
-#line 27177 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 435:
 #line 3812 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::COLUMN_NAME; }
-#line 27183 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 436:
 #line 3814 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::CURSOR_NAME; }
-#line 27189 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 437:
 #line 3816 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::MESSAGE_TEXT; }
-#line 27195 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 438:
 #line 3818 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::MYSQL_ERRNO; }
-#line 27201 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 439:
 #line 3820 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.cond_info_item_name)= Condition_information_item::RETURNED_SQLSTATE; }
-#line 27207 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 441:
@@ -27212,7 +27210,7 @@
             if (unlikely((yyval.ident_sys).copy_ident_cli(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 27216 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27214 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 442:
@@ -27228,7 +27226,7 @@
             spc->add_variable(thd, &(yyvsp[0].ident_sys));
             (yyval.num)= 1;
           }
-#line 27232 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 443:
@@ -27244,37 +27242,37 @@
             spc->add_variable(thd, &(yyvsp[0].ident_sys));
             (yyval.num)= (yyvsp[-2].num) + 1;
           }
-#line 27248 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 444:
 #line 3860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item) = NULL; }
-#line 27254 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 445:
 #line 3861 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item); }
-#line 27260 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 446:
 #line 3862 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item); }
-#line 27266 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27264 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 452:
 #line 3871 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 27272 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 465:
 #line 3887 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 27278 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27276 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 470:
@@ -27284,13 +27282,13 @@
               MYSQL_YYABORT;
             Lex->sphead->new_cont_backpatch(NULL);
           }
-#line 27288 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27286 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 471:
 #line 3905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sphead->do_cont_backpatch(); }
-#line 27294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27292 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 473:
@@ -27300,7 +27298,7 @@
             if (unlikely(Lex->call_statement_start(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27304 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27302 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 475:
@@ -27309,7 +27307,7 @@
             if (unlikely(Lex->call_statement_start(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27313 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27311 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 477:
@@ -27321,7 +27319,7 @@
             lex->sphead->reset_lex(thd);
             lex->sphead->m_tmp_query= lip->get_tok_start();
           }
-#line 27325 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27323 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 478:
@@ -27367,13 +27365,13 @@
             if (unlikely(sp->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27371 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27369 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 481:
 #line 3985 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 27377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27375 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 482:
@@ -27386,7 +27384,7 @@
                 unlikely(sp->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27390 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27388 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 483:
@@ -27398,19 +27396,19 @@
                                                                lex->spcont)))
               MYSQL_YYABORT;
           }
-#line 27402 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27400 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 484:
 #line 4006 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 27408 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27406 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 485:
 #line 4006 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 27414 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27412 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 486:
@@ -27419,7 +27417,7 @@
             if (unlikely(Lex->sp_exit_statement(thd, NULL)))
               MYSQL_YYABORT;
           }
-#line 27423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27421 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 487:
@@ -27428,7 +27426,7 @@
             if (unlikely(Lex->sp_exit_statement(thd, &(yyvsp[0].ident_sys), NULL)))
               MYSQL_YYABORT;
           }
-#line 27432 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27430 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 488:
@@ -27438,7 +27436,7 @@
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27442 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27440 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 489:
@@ -27448,7 +27446,7 @@
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27452 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27450 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 490:
@@ -27457,7 +27455,7 @@
             if (unlikely(Lex->sp_continue_statement(thd, NULL)))
               MYSQL_YYABORT;
           }
-#line 27461 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 491:
@@ -27466,7 +27464,7 @@
             if (unlikely(Lex->sp_continue_statement(thd, &(yyvsp[0].ident_sys), NULL)))
               MYSQL_YYABORT;
           }
-#line 27470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27468 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 492:
@@ -27476,7 +27474,7 @@
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27478 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 493:
@@ -27486,7 +27484,7 @@
                 unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27488 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 494:
@@ -27495,7 +27493,7 @@
             if (unlikely(Lex->sp_leave_statement(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27497 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 495:
@@ -27504,7 +27502,7 @@
             if (unlikely(Lex->sp_iterate_statement(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27508 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27506 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 496:
@@ -27513,7 +27511,7 @@
             if (unlikely(Lex->sp_goto_statement(thd, &(yyvsp[0].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27517 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 497:
@@ -27521,7 +27519,7 @@
     {
             (yyval.lex)= thd->lex;
           }
-#line 27525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 498:
@@ -27532,7 +27530,7 @@
                            sp_assignment_lex(thd, thd->lex))))
               MYSQL_YYABORT;
           }
-#line 27536 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27534 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 499:
@@ -27541,7 +27539,7 @@
             DBUG_ASSERT(thd->free_list == NULL);
             Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
           }
-#line 27545 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27543 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 500:
@@ -27555,7 +27553,7 @@
             if (unlikely((yyval.assignment_lex)->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27559 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27557 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 501:
@@ -27563,7 +27561,7 @@
     {
             Lex->sphead->reset_lex(thd, (yyvsp[0].assignment_lex));
           }
-#line 27567 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27565 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 502:
@@ -27576,7 +27574,7 @@
             if (unlikely((yyval.assignment_lex)->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27580 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 503:
@@ -27586,7 +27584,7 @@
               MYSQL_YYABORT;
             (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
           }
-#line 27590 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27588 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 504:
@@ -27595,19 +27593,19 @@
             (yyval.sp_assignment_lex_list)= (yyvsp[-2].sp_assignment_lex_list);
             (yyval.sp_assignment_lex_list)->push_back((yyvsp[0].assignment_lex), thd->mem_root);
           }
-#line 27599 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27597 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 505:
 #line 4149 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.sp_assignment_lex_list)= NULL; }
-#line 27605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27603 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 506:
 #line 4150 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.sp_assignment_lex_list)= (yyvsp[-1].sp_assignment_lex_list); }
-#line 27611 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27609 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 507:
@@ -27616,7 +27614,7 @@
             if (unlikely(Lex->sp_open_cursor(thd, &(yyvsp[-1].ident_sys), (yyvsp[0].sp_assignment_lex_list))))
               MYSQL_YYABORT;
           }
-#line 27620 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 508:
@@ -27625,7 +27623,7 @@
             if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27629 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27627 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 509:
@@ -27634,7 +27632,7 @@
             if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 510:
@@ -27643,13 +27641,13 @@
             if (unlikely(Lex->sp_add_cfetch(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
           }
-#line 27647 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 511:
 #line 4180 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 27653 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27651 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 512:
@@ -27668,7 +27666,7 @@
                 unlikely(sp->add_instr(i)))
               MYSQL_YYABORT;
           }
-#line 27672 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 513:
@@ -27686,7 +27684,7 @@
             sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
             i->add_to_varlist(spv);
           }
-#line 27690 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 514:
@@ -27704,13 +27702,13 @@
             sp_instr_cfetch *i= (sp_instr_cfetch *)sp->last_instruction();
             i->add_to_varlist(spv);
           }
-#line 27708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27706 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 515:
 #line 4233 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 27714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27712 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 516:
@@ -27730,7 +27728,7 @@
             if (unlikely(sp->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27734 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 517:
@@ -27746,7 +27744,7 @@
             sp->backpatch(ctx->pop_label());
             sp->push_backpatch(thd, i, ctx->push_label(thd, &empty_clex_str, 0));
           }
-#line 27750 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 518:
@@ -27756,7 +27754,7 @@
 
             lex->sphead->backpatch(lex->spcont->pop_label());
           }
-#line 27760 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27758 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 522:
@@ -27810,7 +27808,7 @@
             */
             Lex->spcont->push_label(thd, &empty_clex_str, Lex->sphead->instructions());
           }
-#line 27814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27812 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 523:
@@ -27828,13 +27826,13 @@
 
             Lex->sphead->do_cont_backpatch();
           }
-#line 27832 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 524:
 #line 4347 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); /* For expr $2 */ }
-#line 27838 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 525:
@@ -27845,19 +27843,19 @@
             if (unlikely(Lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27849 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 526:
 #line 4356 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 27855 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27853 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 527:
 #line 4358 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 27861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27859 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 532:
@@ -27865,7 +27863,7 @@
     {
             Lex->sphead->reset_lex(thd); /* For expr $3 */
           }
-#line 27869 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 533:
@@ -27880,7 +27878,7 @@
             if (unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27884 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27882 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 534:
@@ -27889,7 +27887,7 @@
             if (unlikely(Lex->case_stmt_action_then()))
               MYSQL_YYABORT;
           }
-#line 27893 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27891 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 535:
@@ -27897,7 +27895,7 @@
     {
             Lex->sphead->reset_lex(thd); /* For expr $3 */
           }
-#line 27901 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 536:
@@ -27910,7 +27908,7 @@
             if (unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 27914 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27912 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 537:
@@ -27919,7 +27917,7 @@
             if (unlikely(Lex->case_stmt_action_then()))
               MYSQL_YYABORT;
           }
-#line 27923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 538:
@@ -27934,19 +27932,19 @@
                 unlikely(sp->add_instr(i)))
               MYSQL_YYABORT;
           }
-#line 27938 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27936 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 540:
 #line 4433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 27944 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 541:
 #line 4434 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 27950 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27948 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 542:
@@ -27956,7 +27954,7 @@
               MYSQL_YYABORT;
             (yyval.lex_str)= (yyvsp[0].lex_str);
           }
-#line 27960 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27958 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 543:
@@ -27966,7 +27964,7 @@
             if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
               MYSQL_YYABORT;
           }
-#line 27970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27968 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 544:
@@ -27975,7 +27973,7 @@
             if (unlikely(Lex->sp_block_finalize(thd, Lex_spblock((yyvsp[-2].spblock_handlers)), &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 27979 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27977 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 545:
@@ -27983,7 +27981,7 @@
     {
             Lex->sp_block_init(thd, &(yyvsp[-1].lex_str));
           }
-#line 27987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27985 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 546:
@@ -27992,7 +27990,7 @@
             if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
               MYSQL_YYABORT;
           }
-#line 27996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 27994 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 547:
@@ -28002,7 +28000,7 @@
             if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-5].spblock), &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28006 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28004 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 550:
@@ -28014,7 +28012,7 @@
             if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
               MYSQL_YYABORT;
           }
-#line 28018 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28016 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 551:
@@ -28023,7 +28021,7 @@
             if (unlikely(Lex->sp_block_finalize(thd, Lex_spblock((yyvsp[-1].spblock_handlers)))))
               MYSQL_YYABORT;
           }
-#line 28027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28025 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 552:
@@ -28033,7 +28031,7 @@
               MYSQL_YYABORT;
             Lex->sp_block_init(thd);
           }
-#line 28037 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 553:
@@ -28042,7 +28040,7 @@
             if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
               MYSQL_YYABORT;
           }
-#line 28046 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 554:
@@ -28052,13 +28050,13 @@
             if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-4].spblock))))
               MYSQL_YYABORT;
           }
-#line 28056 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 555:
 #line 4524 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.sp_instr_addr)= Lex->sphead->instructions(); }
-#line 28062 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 556:
@@ -28066,7 +28064,7 @@
     {
             Lex->sp_block_init(thd);
           }
-#line 28070 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28068 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 557:
@@ -28075,7 +28073,7 @@
             if (unlikely(Lex->sp_block_with_exceptions_finalize_declarations(thd)))
               MYSQL_YYABORT;
           }
-#line 28079 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 558:
@@ -28085,7 +28083,7 @@
             if (unlikely(Lex->sp_block_finalize(thd, (yyvsp[-3].spblock))))
               MYSQL_YYABORT;
           }
-#line 28089 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 560:
@@ -28094,7 +28092,7 @@
             if (unlikely(Lex->sp_block_with_exceptions_finalize_executable_section(thd, (yyvsp[-1].sp_instr_addr))))
               MYSQL_YYABORT;
           }
-#line 28098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28096 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 561:
@@ -28104,31 +28102,31 @@
               MYSQL_YYABORT;
             (yyval.spblock_handlers).init((yyvsp[0].num));
           }
-#line 28108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28106 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 562:
 #line 4562 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 28114 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28112 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 563:
 #line 4563 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[0].num); }
-#line 28120 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28118 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 564:
 #line 4567 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 28126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28124 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 565:
 #line 4568 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].num) + 1; }
-#line 28132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28130 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 566:
@@ -28137,7 +28135,7 @@
             if (unlikely(Lex->sp_handler_declaration_init(thd, sp_handler::EXIT)))
               MYSQL_YYABORT;
           }
-#line 28141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 567:
@@ -28146,19 +28144,19 @@
             if (unlikely(Lex->sp_handler_declaration_finalize(thd, sp_handler::EXIT)))
               MYSQL_YYABORT;
           }
-#line 28150 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28148 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 568:
 #line 4588 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 28156 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 569:
 #line 4589 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= -1; }
-#line 28162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28160 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 570:
@@ -28167,7 +28165,7 @@
             if (unlikely(Lex->sp_for_loop_declarations(thd, &(yyval.for_loop), &(yyvsp[-1].ident_sys), (yyvsp[0].for_loop_bounds))))
               MYSQL_YYABORT;
           }
-#line 28171 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 571:
@@ -28175,7 +28173,7 @@
     {
             (yyval.for_loop_bounds)= Lex_for_loop_bounds_intrange((yyvsp[-3].num), (yyvsp[-2].assignment_lex), (yyvsp[0].assignment_lex));
           }
-#line 28179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28177 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 572:
@@ -28186,7 +28184,7 @@
             (yyval.for_loop_bounds).m_target_bound= NULL;
             (yyval.for_loop_bounds).m_implicit_cursor= false;
           }
-#line 28190 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28188 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 573:
@@ -28196,7 +28194,7 @@
                                                                     (yyvsp[-1].sp_cursor_stmt))))
               MYSQL_YYABORT;
           }
-#line 28200 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28198 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 574:
@@ -28211,7 +28209,7 @@
                 unlikely(lex->sphead->add_instr(i)))
               MYSQL_YYABORT;
           }
-#line 28215 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28213 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 575:
@@ -28223,7 +28221,7 @@
             if (unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 28227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28225 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 576:
@@ -28232,13 +28230,13 @@
             if (unlikely(Lex->sp_while_loop_finalize(thd)))
               MYSQL_YYABORT;
           }
-#line 28236 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28234 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 577:
 #line 4653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sphead->reset_lex(thd); }
-#line 28242 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28240 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 578:
@@ -28257,7 +28255,7 @@
             /* We can shortcut the cont_backpatch here */
             i->m_cont_dest= ip+1;
           }
-#line 28261 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 579:
@@ -28266,7 +28264,7 @@
             if (unlikely(Lex->sp_pop_loop_label(thd, &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28268 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 580:
@@ -28275,13 +28273,13 @@
             if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28279 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28277 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 581:
 #line 4686 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 28285 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28283 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 582:
@@ -28291,13 +28289,13 @@
               MYSQL_YYABORT;
             Lex->sphead->reset_lex(thd);
           }
-#line 28295 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28293 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 583:
 #line 4694 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 28301 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 584:
@@ -28306,7 +28304,7 @@
             // See "The FOR LOOP statement" comments in sql_lex.cc
             Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
           }
-#line 28310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28308 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 585:
@@ -28317,7 +28315,7 @@
             if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28319 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 586:
@@ -28326,7 +28324,7 @@
             if (unlikely(Lex->sp_for_loop_finalize(thd, (yyvsp[-5].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28330 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28328 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 587:
@@ -28335,7 +28333,7 @@
             if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-7].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28339 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28337 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 588:
@@ -28344,13 +28342,13 @@
             if (unlikely(Lex->sp_push_loop_label(thd, &(yyvsp[-1].lex_str))))
               MYSQL_YYABORT;
           }
-#line 28348 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28346 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 589:
 #line 4725 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 28354 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28352 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 590:
@@ -28359,7 +28357,7 @@
             if (unlikely(Lex->sp_push_loop_empty_label(thd)))
               MYSQL_YYABORT;
           }
-#line 28363 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28361 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 591:
@@ -28367,7 +28365,7 @@
     {
             Lex->sp_pop_loop_empty_label(thd);
           }
-#line 28371 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28369 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 592:
@@ -28377,7 +28375,7 @@
               MYSQL_YYABORT;
             Lex->sphead->reset_lex(thd);
           }
-#line 28381 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28379 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 593:
@@ -28385,7 +28383,7 @@
     {
             Lex->sp_pop_loop_empty_label(thd);
           }
-#line 28389 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 594:
@@ -28396,7 +28394,7 @@
               MYSQL_YYABORT;
             Lex->sp_block_init(thd); // The outer DECLARE..BEGIN..END block
           }
-#line 28400 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 595:
@@ -28407,7 +28405,7 @@
             if (unlikely(Lex->sp_for_loop_condition_test(thd, (yyvsp[0].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28411 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28409 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 596:
@@ -28419,7 +28417,7 @@
             if (unlikely(Lex->sp_for_loop_outer_block_finalize(thd, (yyvsp[-5].for_loop))))
               MYSQL_YYABORT;
           }
-#line 28423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28421 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 597:
@@ -28428,7 +28426,7 @@
             if (unlikely(Lex->sp_push_loop_empty_label(thd)))
               MYSQL_YYABORT;
           }
-#line 28432 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28430 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 598:
@@ -28436,43 +28434,43 @@
     {
             Lex->sp_pop_loop_empty_label(thd);
           }
-#line 28440 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28438 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 599:
 #line 4785 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.action_time= TRG_ACTION_BEFORE; }
-#line 28446 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28444 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 600:
 #line 4787 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.action_time= TRG_ACTION_AFTER; }
-#line 28452 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28450 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 601:
 #line 4792 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.event= TRG_EVENT_INSERT; }
-#line 28458 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28456 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 602:
 #line 4794 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.event= TRG_EVENT_UPDATE; }
-#line 28464 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28462 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 603:
 #line 4796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->trg_chistics.event= TRG_EVENT_DELETE; }
-#line 28470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28468 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 607:
 #line 4830 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28476 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28474 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 608:
@@ -28481,7 +28479,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->logfile_group_name= (yyvsp[0].ident_sys).str;
           }
-#line 28485 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28483 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 609:
@@ -28489,7 +28487,7 @@
     { 
             Lex->alter_tablespace_info->ts_alter_tablespace_type= ALTER_TABLESPACE_ADD_FILE; 
           }
-#line 28493 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28491 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 610:
@@ -28497,13 +28495,13 @@
     { 
             Lex->alter_tablespace_info->ts_alter_tablespace_type= ALTER_TABLESPACE_DROP_FILE; 
           }
-#line 28501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 615:
 #line 4871 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28505 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 662:
@@ -28512,7 +28510,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->data_file_name= (yyvsp[0].lex_str).str;
           }
-#line 28516 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28514 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 663:
@@ -28521,7 +28519,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->undo_file_name= (yyvsp[0].lex_str).str;
           }
-#line 28525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 664:
@@ -28530,7 +28528,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->redo_file_name= (yyvsp[0].lex_str).str;
           }
-#line 28534 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28532 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 665:
@@ -28544,7 +28542,7 @@
             lex->alter_tablespace_info->tablespace_name= (yyvsp[0].ident_sys).str;
             lex->sql_command= SQLCOM_ALTER_TABLESPACE;
           }
-#line 28548 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28546 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 666:
@@ -28558,7 +28556,7 @@
             lex->alter_tablespace_info->logfile_group_name= (yyvsp[0].ident_sys).str;
             lex->sql_command= SQLCOM_ALTER_TABLESPACE;
           }
-#line 28562 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 667:
@@ -28567,7 +28565,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_access_mode= TS_READ_ONLY;
           }
-#line 28571 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28569 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 668:
@@ -28576,7 +28574,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_access_mode= TS_READ_WRITE;
           }
-#line 28580 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 669:
@@ -28585,7 +28583,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_access_mode= TS_NOT_ACCESSIBLE;
           }
-#line 28589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28587 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 670:
@@ -28594,7 +28592,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->initial_size= (yyvsp[0].ulonglong_number);
           }
-#line 28598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 671:
@@ -28603,7 +28601,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->autoextend_size= (yyvsp[0].ulonglong_number);
           }
-#line 28607 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 672:
@@ -28612,7 +28610,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->max_size= (yyvsp[0].ulonglong_number);
           }
-#line 28616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28614 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 673:
@@ -28621,7 +28619,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->extent_size= (yyvsp[0].ulonglong_number);
           }
-#line 28625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28623 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 674:
@@ -28630,7 +28628,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->undo_buffer_size= (yyvsp[0].ulonglong_number);
           }
-#line 28634 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28632 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 675:
@@ -28639,7 +28637,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->redo_buffer_size= (yyvsp[0].ulonglong_number);
           }
-#line 28643 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28641 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 676:
@@ -28650,7 +28648,7 @@
               my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"NODEGROUP"));
             lex->alter_tablespace_info->nodegroup_id= (yyvsp[0].ulong_num);
           }
-#line 28654 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28652 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 677:
@@ -28661,7 +28659,7 @@
               my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"COMMENT"));
             lex->alter_tablespace_info->ts_comment= (yyvsp[0].lex_str).str;
           }
-#line 28665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28663 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 678:
@@ -28673,7 +28671,7 @@
                                 "STORAGE ENGINE"));
             lex->alter_tablespace_info->storage_engine= (yyvsp[0].db_type);
           }
-#line 28677 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 681:
@@ -28682,7 +28680,7 @@
             LEX *lex= Lex;
             lex->alter_tablespace_info->wait_until_completed= TRUE;
           }
-#line 28686 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28684 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 682:
@@ -28693,13 +28691,13 @@
               my_yyabort_error((ER_FILEGROUP_OPTION_ONLY_ONCE,MYF(0),"NO_WAIT"));
             lex->alter_tablespace_info->wait_until_completed= FALSE;
           }
-#line 28697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28695 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 683:
 #line 5131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulonglong_number)= (yyvsp[0].ulonglong_number);}
-#line 28703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28701 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 684:
@@ -28708,49 +28706,49 @@
             if ((yyvsp[0].ident_sys).to_size_number(&(yyval.ulonglong_number)))
               MYSQL_YYABORT;
           }
-#line 28712 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28710 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 685:
 #line 5145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->create_info.option_list= NULL; }
-#line 28718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28716 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 686:
 #line 5146 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28722 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 687:
 #line 5147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 689:
 #line 5155 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 28736 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28734 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 690:
 #line 5155 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28740 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 691:
 #line 5157 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 28748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 692:
 #line 5157 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28754 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28752 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 693:
@@ -28765,25 +28763,25 @@
             /* CREATE TABLE ... LIKE is not allowed for views. */
             src_table->required_type= TABLE_TYPE_NORMAL;
           }
-#line 28769 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 694:
 #line 5172 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table)= (yyvsp[0].table); }
-#line 28775 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 695:
 #line 5173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table)= (yyvsp[-1].table); }
-#line 28781 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 696:
 #line 5177 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28787 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 698:
@@ -28792,7 +28790,7 @@
             Select->set_braces(0);
             Select->set_with_clause((yyvsp[-4].with_clause));
           }
-#line 28796 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28794 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 700:
@@ -28800,31 +28798,31 @@
     {
             Select->set_with_clause((yyvsp[-4].with_clause));
           }
-#line 28804 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28802 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 702:
 #line 5196 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 28810 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28808 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 703:
 #line 5196 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28816 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 704:
 #line 5198 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->set_braces(1);}
-#line 28822 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28820 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 705:
 #line 5198 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28828 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28826 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 706:
@@ -28838,13 +28836,13 @@
             last_non_sel_table->next_global= 0;
             Lex->query_tables_last= &last_non_sel_table->next_global;
           }
-#line 28842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28840 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 707:
 #line 5239 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28846 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 709:
@@ -28859,7 +28857,7 @@
               lex->alter_info.partition_flags|= ALTER_PARTITION_INFO;
             }
           }
-#line 28863 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 711:
@@ -28875,7 +28873,7 @@
                               "--with-plugin-partition"));
 #endif
           }
-#line 28879 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28877 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 712:
@@ -28892,19 +28890,19 @@
               partition info string into part_info data structure.
             */
           }
-#line 28896 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28894 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 713:
 #line 5287 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28902 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28900 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 714:
 #line 5292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->safe_to_cache_query= 1; }
-#line 28908 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28906 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 716:
@@ -28915,31 +28913,31 @@
             part_info->column_list= FALSE;
             part_info->part_type= HASH_PARTITION;
           }
-#line 28919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28917 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 717:
 #line 5305 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= HASH_PARTITION; }
-#line 28925 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 718:
 #line 5306 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28929 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 719:
 #line 5308 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= RANGE_PARTITION; }
-#line 28937 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28935 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 720:
 #line 5310 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= RANGE_PARTITION; }
-#line 28943 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 721:
@@ -28947,7 +28945,7 @@
     {
 	    Select->parsing_place= IN_PART_FUNC;
           }
-#line 28951 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28949 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 722:
@@ -28956,13 +28954,13 @@
 	    Lex->part_info->part_type= LIST_PARTITION; 
 	    Select->parsing_place= NO_MATTER;
 	  }
-#line 28960 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28958 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 723:
 #line 5321 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->part_type= LIST_PARTITION; }
-#line 28966 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28964 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 724:
@@ -28971,25 +28969,25 @@
              if (unlikely(Lex->part_info->vers_init_info(thd)))
                MYSQL_YYABORT;
           }
-#line 28975 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28973 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 726:
 #line 5331 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 28981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28979 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 727:
 #line 5333 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->linear_hash_ind= TRUE;}
-#line 28987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28985 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 728:
 #line 5338 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->key_algorithm= partition_info::KEY_ALGORITHM_NONE;}
-#line 28993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 28991 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 729:
@@ -29007,31 +29005,31 @@
               MYSQL_YYABORT;
             }
           }
-#line 29011 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29009 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 730:
 #line 5356 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29015 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 731:
 #line 5357 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 732:
 #line 5361 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 733:
 #line 5362 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29033 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 734:
@@ -29046,7 +29044,7 @@
               my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
                                 "list of partition fields"));
           }
-#line 29050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 735:
@@ -29056,7 +29054,7 @@
             part_info->column_list= TRUE;
             part_info->list_of_part_fields= TRUE;
           }
-#line 29060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29058 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 736:
@@ -29068,7 +29066,7 @@
             part_info->num_columns= 1;
             part_info->column_list= FALSE;
           }
-#line 29072 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29070 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 737:
@@ -29077,13 +29075,13 @@
             if (unlikely(Lex->part_info->set_part_expr(thd, (yyvsp[-1].item), TRUE)))
               MYSQL_YYABORT;
           }
-#line 29081 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29079 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 738:
 #line 5410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29085 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 739:
@@ -29097,25 +29095,25 @@
             part_info->num_parts= num_parts;
             part_info->use_default_num_partitions= FALSE;
           }
-#line 29101 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 740:
 #line 5424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29107 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29105 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 741:
 #line 5426 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->subpart_type= HASH_PARTITION; }
-#line 29113 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 742:
 #line 5427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29119 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29117 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 743:
@@ -29125,25 +29123,25 @@
             part_info->subpart_type= HASH_PARTITION;
             part_info->list_of_subpart_fields= TRUE;
           }
-#line 29129 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 744:
 #line 5435 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29135 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 745:
 #line 5439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 746:
 #line 5440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29147 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29145 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 747:
@@ -29158,7 +29156,7 @@
               my_yyabort_error((ER_TOO_MANY_PARTITION_FUNC_FIELDS_ERROR, MYF(0),
                                 "list of subpartition fields"));
           }
-#line 29162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29160 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 748:
@@ -29171,13 +29169,13 @@
             }
             (yyval.item)=(yyvsp[0].item);
           }
-#line 29175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29173 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 749:
 #line 5470 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 750:
@@ -29190,7 +29188,7 @@
             lex->part_info->num_subparts= num_parts;
             lex->part_info->use_default_num_subpartitions= FALSE;
           }
-#line 29194 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 751:
@@ -29204,7 +29202,7 @@
               my_yyabort_error((ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0),
                                 "LIST"));
           }
-#line 29208 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29206 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 752:
@@ -29227,19 +29225,19 @@
             }
             part_info->count_curr_subparts= 0;
           }
-#line 29231 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 753:
 #line 5515 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29237 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29235 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 754:
 #line 5516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29243 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 755:
@@ -29259,13 +29257,13 @@
             part_info->use_default_partitions= FALSE;
             part_info->use_default_num_partitions= FALSE;
           }
-#line 29263 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29261 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 756:
 #line 5540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29267 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 757:
@@ -29277,7 +29275,7 @@
               MYSQL_YYABORT;
             p_elem->partition_name= (yyvsp[0].ident_sys).str;
           }
-#line 29281 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29279 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 758:
@@ -29297,7 +29295,7 @@
             else
               part_info->part_type= HASH_PARTITION;
           }
-#line 29301 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 759:
@@ -29314,13 +29312,13 @@
             else
               part_info->part_type= RANGE_PARTITION;
           }
-#line 29318 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29316 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 760:
 #line 5584 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29324 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29322 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 761:
@@ -29337,13 +29335,13 @@
             else
               part_info->part_type= LIST_PARTITION;
           }
-#line 29341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29339 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 762:
 #line 5598 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29347 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29345 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 763:
@@ -29352,7 +29350,7 @@
             if (Lex->part_values_current(thd))
               MYSQL_YYABORT;
           }
-#line 29356 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29354 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 764:
@@ -29361,7 +29359,7 @@
             if (Lex->part_values_history(thd))
               MYSQL_YYABORT;
           }
-#line 29365 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29363 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 765:
@@ -29382,7 +29380,7 @@
             if (unlikely(part_info->add_max_value(thd)))
               MYSQL_YYABORT;
          }
-#line 29386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29384 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 766:
@@ -29404,13 +29402,13 @@
             if (unlikely(part_info->add_max_value(thd)))
               MYSQL_YYABORT;
           }
-#line 29408 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29406 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 767:
 #line 5647 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29414 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29412 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 768:
@@ -29441,7 +29439,7 @@
                 MYSQL_YYABORT;
             }
           }
-#line 29445 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29443 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 769:
@@ -29454,19 +29452,19 @@
               MYSQL_YYABORT;
             }
           }
-#line 29458 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29456 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 770:
 #line 5690 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29464 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29462 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 771:
 #line 5691 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29468 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 772:
@@ -29480,13 +29478,13 @@
                            part_info->init_column_part(thd)))
               MYSQL_YYABORT;
           }
-#line 29484 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29482 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 773:
 #line 5705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29488 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 774:
@@ -29511,19 +29509,19 @@
             }
             part_info->curr_list_object= 0;
           }
-#line 29515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29513 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 775:
 #line 5730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29521 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29519 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 776:
 #line 5731 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29527 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 777:
@@ -29538,7 +29536,7 @@
             if (unlikely(part_info->add_max_value(thd)))
               MYSQL_YYABORT;
           }
-#line 29542 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29540 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 778:
@@ -29556,7 +29554,7 @@
             if (unlikely(part_info->add_column_list_value(thd, part_expr)))
               MYSQL_YYABORT;
           }
-#line 29560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29558 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 779:
@@ -29574,7 +29572,7 @@
               MYSQL_YYABORT;
             }
           }
-#line 29578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 780:
@@ -29601,19 +29599,19 @@
             }
             part_info->count_curr_subparts= 0;
           }
-#line 29605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29603 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 781:
 #line 5804 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29611 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29609 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 782:
 #line 5805 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29617 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29615 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 783:
@@ -29650,13 +29648,13 @@
             part_info->use_default_num_subpartitions= FALSE;
             part_info->count_curr_subparts++;
           }
-#line 29654 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29652 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 784:
 #line 5842 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29660 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29658 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 785:
@@ -29666,37 +29664,37 @@
               MYSQL_YYABORT;
             Lex->part_info->curr_part_elem->partition_name= (yyvsp[0].lex_str).str;
           }
-#line 29670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 786:
 #line 5855 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29676 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29674 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 787:
 #line 5856 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29682 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29680 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 788:
 #line 5860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29686 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 789:
 #line 5861 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29692 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 790:
 #line 5866 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->tablespace_name= (yyvsp[0].lex_str).str; }
-#line 29700 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29698 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 791:
@@ -29706,7 +29704,7 @@
             part_info->curr_part_elem->engine_type= (yyvsp[0].db_type);
             part_info->default_engine_type= (yyvsp[0].db_type);
           }
-#line 29710 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 792:
@@ -29716,49 +29714,49 @@
             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 29720 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 793:
 #line 5880 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->nodegroup_id= (uint16) (yyvsp[0].ulong_num); }
-#line 29726 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 794:
 #line 5882 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->part_max_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
-#line 29732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 795:
 #line 5884 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->part_min_rows= (ha_rows) (yyvsp[0].ulonglong_number); }
-#line 29738 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29736 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 796:
 #line 5886 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->data_file_name= (yyvsp[0].lex_str).str; }
-#line 29744 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 797:
 #line 5888 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->index_file_name= (yyvsp[0].lex_str).str; }
-#line 29750 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 798:
 #line 5890 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->part_info->curr_part_elem->part_comment= (yyvsp[0].lex_str).str; }
-#line 29756 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29754 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 799:
 #line 5894 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29760 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 800:
@@ -29768,7 +29766,7 @@
            if (unlikely(part_info->vers_set_interval(thd, (yyvsp[-2].item), (yyvsp[-1].interval), (yyvsp[0].ulong_num))))
              MYSQL_YYABORT;
          }
-#line 29772 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29770 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 801:
@@ -29783,7 +29781,7 @@
            MYSQL_YYABORT;
          }
        }
-#line 29787 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 802:
@@ -29791,7 +29789,7 @@
     {
            (yyval.ulong_num)= thd->query_start();
          }
-#line 29795 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29793 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 803:
@@ -29805,7 +29803,7 @@
            }
            (yyval.ulong_num)= (ulong)(yyvsp[0].ulong_num);
          }
-#line 29809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29807 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 804:
@@ -29813,7 +29811,7 @@
     {
             Select->set_with_clause((yyvsp[-4].with_clause));
           }
-#line 29817 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 805:
@@ -29832,7 +29830,7 @@
             mysql_init_select(lex);
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 29836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29834 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 806:
@@ -29840,7 +29838,7 @@
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 29844 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 811:
@@ -29852,55 +29850,55 @@
             */
             Lex->current_select->table_list.push_front(&Lex->save_list);
           }
-#line 29856 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 812:
 #line 5987 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29862 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 813:
 #line 5988 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29868 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29866 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 814:
 #line 5992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29874 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29872 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 815:
 #line 5993 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29880 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 816:
 #line 5997 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29886 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29884 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 817:
 #line 5998 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29892 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29890 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 818:
 #line 6002 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29898 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29896 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 819:
 #line 6003 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 29904 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29902 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 820:
@@ -29908,7 +29906,7 @@
     {
             Lex->check_exists= FALSE;
           }
-#line 29912 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29910 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 821:
@@ -29916,7 +29914,7 @@
     {
             Lex->check_exists= TRUE;
           }
-#line 29920 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29918 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 822:
@@ -29924,7 +29922,7 @@
     {
             (yyval.object_ddl_options).init();
           }
-#line 29928 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29926 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 823:
@@ -29932,7 +29930,7 @@
     {
             (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_NOT_EXISTS);
           }
-#line 29936 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29934 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 824:
@@ -29940,7 +29938,7 @@
     {
             (yyval.object_ddl_options).init();
           }
-#line 29944 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 825:
@@ -29948,7 +29946,7 @@
     {
             (yyval.object_ddl_options).set(DDL_options_st::OPT_OR_REPLACE);
           }
-#line 29952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29950 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 833:
@@ -29967,7 +29965,7 @@
             *opt= Storage_engine_name((yyvsp[0].lex_str));
             lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
           }
-#line 29971 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29969 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 834:
@@ -29976,7 +29974,7 @@
             Lex->create_info.max_rows= (yyvsp[0].ulonglong_number);
             Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;
           }
-#line 29980 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29978 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 835:
@@ -29985,7 +29983,7 @@
             Lex->create_info.min_rows= (yyvsp[0].ulonglong_number);
             Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;
           }
-#line 29989 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 836:
@@ -29994,7 +29992,7 @@
             Lex->create_info.avg_row_length=(yyvsp[0].ulong_num);
             Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;
           }
-#line 29998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 29996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 837:
@@ -30003,7 +30001,7 @@
             Lex->create_info.password=(yyvsp[0].lex_str).str;
             Lex->create_info.used_fields|= HA_CREATE_USED_PASSWORD;
           }
-#line 30007 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30005 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 838:
@@ -30012,7 +30010,7 @@
             Lex->create_info.comment=(yyvsp[0].lex_str);
             Lex->create_info.used_fields|= HA_CREATE_USED_COMMENT;
           }
-#line 30016 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 839:
@@ -30021,7 +30019,7 @@
             Lex->create_info.auto_increment_value=(yyvsp[0].ulonglong_number);
             Lex->create_info.used_fields|= HA_CREATE_USED_AUTO;
           }
-#line 30025 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 840:
@@ -30040,7 +30038,7 @@
             }
             Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
           }
-#line 30044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 841:
@@ -30050,7 +30048,7 @@
               ~(HA_OPTION_PACK_KEYS | HA_OPTION_NO_PACK_KEYS);
             Lex->create_info.used_fields|= HA_CREATE_USED_PACK_KEYS;
           }
-#line 30054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30052 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 842:
@@ -30069,7 +30067,7 @@
             }
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
           }
-#line 30073 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30071 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 843:
@@ -30078,7 +30076,7 @@
             Lex->create_info.stats_auto_recalc= HA_STATS_AUTO_RECALC_DEFAULT;
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_AUTO_RECALC;
           }
-#line 30082 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30080 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 844:
@@ -30097,7 +30095,7 @@
             }
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
           }
-#line 30101 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 845:
@@ -30107,7 +30105,7 @@
               ~(HA_OPTION_STATS_PERSISTENT | HA_OPTION_NO_STATS_PERSISTENT);
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_PERSISTENT;
           }
-#line 30111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30109 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 846:
@@ -30129,7 +30127,7 @@
             Lex->create_info.stats_sample_pages=(yyvsp[0].ulong_num);
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
           }
-#line 30133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30131 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 847:
@@ -30138,7 +30136,7 @@
             Lex->create_info.stats_sample_pages=0;
             Lex->create_info.used_fields|= HA_CREATE_USED_STATS_SAMPLE_PAGES;
           }
-#line 30142 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 848:
@@ -30147,7 +30145,7 @@
             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 30151 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 849:
@@ -30156,7 +30154,7 @@
              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 30160 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30158 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 850:
@@ -30165,7 +30163,7 @@
             Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM;
             Lex->create_info.page_checksum= (yyvsp[0].choice);
           }
-#line 30169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30167 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 851:
@@ -30174,7 +30172,7 @@
             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 30178 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30176 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 852:
@@ -30183,7 +30181,7 @@
             Lex->create_info.row_type= (yyvsp[0].row_type);
             Lex->create_info.used_fields|= HA_CREATE_USED_ROW_FORMAT;
           }
-#line 30187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 853:
@@ -30191,7 +30189,7 @@
     {
             Lex->select_lex.table_list.save_and_clear(&Lex->save_list);
           }
-#line 30195 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 854:
@@ -30217,7 +30215,7 @@
 
             lex->create_info.used_fields|= HA_CREATE_USED_UNION;
           }
-#line 30221 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30219 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 857:
@@ -30226,7 +30224,7 @@
             Lex->create_info.merge_insert_method= (yyvsp[0].ulong_num);
             Lex->create_info.used_fields|= HA_CREATE_USED_INSERT_METHOD;
           }
-#line 30230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 858:
@@ -30235,7 +30233,7 @@
             Lex->create_info.data_file_name= (yyvsp[0].lex_str).str;
             Lex->create_info.used_fields|= HA_CREATE_USED_DATADIR;
           }
-#line 30239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30237 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 859:
@@ -30244,25 +30242,25 @@
             Lex->create_info.index_file_name= (yyvsp[0].lex_str).str;
             Lex->create_info.used_fields|= HA_CREATE_USED_INDEXDIR;
           }
-#line 30248 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 860:
 #line 6255 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {Lex->create_info.tablespace= (yyvsp[0].ident_sys).str;}
-#line 30254 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 861:
 #line 6257 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {Lex->create_info.storage_media= HA_SM_DISK;}
-#line 30260 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 862:
 #line 6259 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {Lex->create_info.storage_media= HA_SM_MEMORY;}
-#line 30266 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30264 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 863:
@@ -30272,7 +30270,7 @@
             Lex->create_info.connect_string.length= (yyvsp[0].lex_str).length;
             Lex->create_info.used_fields|= HA_CREATE_USED_CONNECTION;
           }
-#line 30276 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30274 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 864:
@@ -30281,7 +30279,7 @@
             Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
             Lex->create_info.key_block_size= (yyvsp[0].ulong_num);
           }
-#line 30285 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30283 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 865:
@@ -30290,7 +30288,7 @@
 	    Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
             Lex->create_info.transactional= (yyvsp[0].choice);
           }
-#line 30294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30292 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 866:
@@ -30303,7 +30301,7 @@
                                        &Lex->create_info.option_list,
                                        &Lex->option_list_last);
           }
-#line 30307 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 867:
@@ -30316,7 +30314,7 @@
                                        &Lex->create_info.option_list,
                                        &Lex->option_list_last);
           }
-#line 30320 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30318 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 868:
@@ -30326,7 +30324,7 @@
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->create_info.option_list,
                                        &Lex->option_list_last, thd->mem_root);
           }
-#line 30330 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30328 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 869:
@@ -30336,7 +30334,7 @@
                    engine_option_value((yyvsp[-2].ident_sys), &Lex->create_info.option_list,
                                        &Lex->option_list_last);
           }
-#line 30340 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30338 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 870:
@@ -30345,7 +30343,7 @@
 	    Lex->create_info.used_fields|= HA_CREATE_USED_SEQUENCE;
             Lex->create_info.sequence= ((yyvsp[0].choice) == HA_CHOICE_YES);
 	  }
-#line 30349 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30347 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 874:
@@ -30365,7 +30363,7 @@
               Lex->create_info.options|= HA_VERSIONED_TABLE;
             }
           }
-#line 30369 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30367 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 875:
@@ -30374,7 +30372,7 @@
             if (unlikely(Lex->create_info.add_table_option_default_charset((yyvsp[0].charset))))
               MYSQL_YYABORT;
           }
-#line 30378 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30376 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 876:
@@ -30390,7 +30388,7 @@
             Lex->create_info.default_table_charset= (yyvsp[0].charset);
             Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
           }
-#line 30394 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 877:
@@ -30401,7 +30399,7 @@
                                             thd->lex->create_info.tmp_table()))
               MYSQL_YYABORT;
           }
-#line 30405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30403 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 878:
@@ -30413,91 +30411,91 @@
             else
               my_yyabort_error((ER_UNKNOWN_STORAGE_ENGINE, MYF(0), (yyvsp[0].lex_str).str));
           }
-#line 30417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30415 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 879:
 #line 6383 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_DEFAULT; }
-#line 30423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30421 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 880:
 #line 6384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_FIXED; }
-#line 30429 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30427 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 881:
 #line 6385 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_DYNAMIC; }
-#line 30435 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30433 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 882:
 #line 6386 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_COMPRESSED; }
-#line 30441 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30439 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 883:
 #line 6387 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_REDUNDANT; }
-#line 30447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30445 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 884:
 #line 6388 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_COMPACT; }
-#line 30453 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30451 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 885:
 #line 6389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.row_type)= ROW_TYPE_PAGE; }
-#line 30459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30457 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 886:
 #line 6393 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= MERGE_INSERT_DISABLED; }
-#line 30465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30463 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 887:
 #line 6394 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= MERGE_INSERT_TO_FIRST; }
-#line 30471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30469 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 888:
 #line 6395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= MERGE_INSERT_TO_LAST; }
-#line 30477 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30475 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 889:
 #line 6399 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) STRING_RESULT; }
-#line 30483 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 890:
 #line 6400 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) REAL_RESULT; }
-#line 30489 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30487 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 891:
 #line 6401 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) DECIMAL_RESULT; }
-#line 30495 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30493 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 892:
 #line 6402 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.num) = (int) INT_RESULT; }
-#line 30501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 893:
@@ -30505,25 +30503,25 @@
     {
           Lex->create_last_non_select_table= Lex->last_table();
         }
-#line 30509 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 896:
 #line 6419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30513 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 900:
 #line 6427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.create_field)= (yyvsp[0].create_field); }
-#line 30521 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30519 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 901:
 #line 6429 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.create_field)= (yyvsp[-1].create_field); }
-#line 30527 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 902:
@@ -30533,13 +30531,13 @@
             if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-1].lex_str), (yyvsp[0].key_alg), (yyvsp[-2].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 30537 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30535 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 903:
 #line 6439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30543 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30541 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 904:
@@ -30549,13 +30547,13 @@
             if (unlikely(Lex->add_key(Key::MULTIPLE, &(yyvsp[-2].ident_sys), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 30553 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30551 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 905:
 #line 6446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30559 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30557 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 906:
@@ -30565,13 +30563,13 @@
             if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 30569 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30567 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 907:
 #line 6453 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30575 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30573 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 908:
@@ -30581,13 +30579,13 @@
             if (unlikely(Lex->add_key((yyvsp[-3].key_type), &(yyvsp[0].lex_str), HA_KEY_ALG_UNDEF, (yyvsp[-1].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 30585 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30583 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 909:
 #line 6460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30591 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 910:
@@ -30597,13 +30595,13 @@
             if (unlikely(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 30601 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30599 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 911:
 #line 6469 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30607 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 912:
@@ -30613,13 +30611,13 @@
             if (unlikely(Lex->add_key((yyvsp[-4].key_type), (yyvsp[-2].ident_sys).str ? &(yyvsp[-2].ident_sys) : &(yyvsp[-5].lex_str), (yyvsp[0].key_alg), (yyvsp[-3].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 30617 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30615 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 913:
 #line 6477 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30623 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30621 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 914:
@@ -30633,7 +30631,7 @@
               MYSQL_YYABORT;
             Lex->option_list= NULL;
           }
-#line 30637 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30635 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 915:
@@ -30663,7 +30661,7 @@
             /* Only used for ALTER TABLE. Ignored otherwise. */
             lex->alter_info.flags|= ALTER_ADD_FOREIGN_KEY;
           }
-#line 30667 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 916:
@@ -30671,7 +30669,7 @@
     {
            Lex->add_constraint(&(yyvsp[-1].lex_str), (yyvsp[0].virtual_column), FALSE);
          }
-#line 30675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30673 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 917:
@@ -30680,19 +30678,19 @@
             Vers_parse_info &info= Lex->vers_get_info();
             info.set_system_time((yyvsp[-3].ident_sys), (yyvsp[-1].ident_sys));
           }
-#line 30684 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30682 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 918:
 #line 6533 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.virtual_column)= (Virtual_column_info*) 0; }
-#line 30690 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 919:
 #line 6534 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.virtual_column)= (yyvsp[0].virtual_column);}
-#line 30696 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 920:
@@ -30703,37 +30701,37 @@
               MYSQL_YYABORT;
             (yyval.virtual_column)= v;
           }
-#line 30707 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30705 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 921:
 #line 6548 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30713 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30711 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 922:
 #line 6549 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30719 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30717 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 923:
 #line 6553 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 30725 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30723 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 924:
 #line 6554 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 30731 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30729 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 925:
 #line 6558 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 30737 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30735 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 926:
@@ -30752,7 +30750,7 @@
             lex->init_last_field(f, &(yyvsp[0].lex_str), NULL);
             (yyval.create_field)= f;
           }
-#line 30756 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30754 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 927:
@@ -30774,13 +30772,13 @@
             else if ((yyval.create_field)->flags & UNIQUE_KEY_FLAG)
               lex->add_key_to_list(&(yyvsp[-3].lex_str), Key::UNIQUE, lex->check_exists);
           }
-#line 30778 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30776 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 928:
 #line 6598 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->set_attributes((yyvsp[0].Lex_field_type), Lex->charset); }
-#line 30784 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30782 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 930:
@@ -30790,49 +30788,49 @@
             Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG
                                      | UNSIGNED_FLAG | UNIQUE_KEY_FLAG;
           }
-#line 30794 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30792 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 932:
 #line 6610 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 933:
 #line 6611 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30804 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 934:
 #line 6615 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30812 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30810 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 936:
 #line 6620 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30818 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30816 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 937:
 #line 6621 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30824 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30822 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 938:
 #line 6625 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30828 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 940:
 #line 6630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 30836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30834 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 944:
@@ -30841,7 +30839,7 @@
            Lex->last_field->vcol_info= (yyvsp[0].virtual_column);
            Lex->last_field->flags&= ~NOT_NULL_FLAG; // undo automatic NOT NULL for timestamps
          }
-#line 30845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30843 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 946:
@@ -30850,7 +30848,7 @@
             if (Lex->last_field_generated_always_as_row_start())
               MYSQL_YYABORT;
           }
-#line 30854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30852 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 947:
@@ -30859,19 +30857,19 @@
             if (Lex->last_field_generated_always_as_row_end())
               MYSQL_YYABORT;
           }
-#line 30863 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 948:
 #line 6653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30869 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 949:
 #line 6654 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30875 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30873 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 950:
@@ -30879,7 +30877,7 @@
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
           }
-#line 30883 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30881 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 951:
@@ -30887,7 +30885,7 @@
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(FALSE);
           }
-#line 30891 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30889 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 952:
@@ -30895,7 +30893,7 @@
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
           }
-#line 30899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30897 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 953:
@@ -30903,25 +30901,25 @@
     {
             Lex->last_field->vcol_info->set_stored_in_db_flag(TRUE);
           }
-#line 30907 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30905 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 954:
 #line 6677 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30913 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30911 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 955:
 #line 6678 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30917 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 956:
 #line 6682 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 30925 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 958:
@@ -30931,7 +30929,7 @@
             lex->last_field->flags|= UNIQUE_KEY_FLAG;
             lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 30935 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30933 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 959:
@@ -30941,13 +30939,13 @@
             lex->last_field->flags|= UNIQUE_KEY_FLAG;
             lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 30945 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30943 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 960:
 #line 6699 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->comment= (yyvsp[0].lex_str); }
-#line 30951 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30949 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 961:
@@ -30955,7 +30953,7 @@
     {
             Lex->last_field->invisible= INVISIBLE_USER;
           }
-#line 30959 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30957 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 962:
@@ -30968,7 +30966,7 @@
             */
             MYSQL_YYABORT_UNLESS(Lex->parse_vcol_expr);
           }
-#line 30972 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 963:
@@ -30979,7 +30977,7 @@
               MYSQL_YYABORT;
             Lex->last_field->vcol_info= v;
           }
-#line 30983 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 964:
@@ -30989,7 +30987,7 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 30993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 30991 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 966:
@@ -31000,7 +30998,7 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 31004 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31002 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 967:
@@ -31012,7 +31010,7 @@
               MYSQL_YYABORT;
             (yyval.virtual_column)= v;
           }
-#line 31016 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 971:
@@ -31021,19 +31019,19 @@
             if (unlikely(!((yyval.virtual_column)= add_virtual_expression(thd, (yyvsp[0].item)))))
               MYSQL_YYABORT;
           }
-#line 31025 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 982:
 #line 6783 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].const_simple_string)); }
-#line 31031 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 983:
 #line 6784 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set((yyvsp[-2].type_handler), (yyvsp[-1].Lex_length_and_dec)); }
-#line 31037 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 984:
@@ -31053,7 +31051,7 @@
                 (yyval.Lex_field_type).set(&type_handler_float);
             }
           }
-#line 31057 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31055 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 985:
@@ -31061,7 +31059,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_bit, (yyvsp[0].const_simple_string));
           }
-#line 31065 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31063 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 986:
@@ -31069,7 +31067,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_tiny, "1");
           }
-#line 31073 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31071 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 987:
@@ -31077,13 +31075,13 @@
     {
             (yyval.Lex_field_type).set(&type_handler_tiny, "1");
           }
-#line 31081 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31079 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 988:
 #line 6814 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
-#line 31087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31085 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 989:
@@ -31094,19 +31092,19 @@
             else
               (yyval.Lex_field_type).set(&type_handler_double);
           }
-#line 31098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31096 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 990:
 #line 6823 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
-#line 31104 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31102 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 991:
 #line 6825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_newdecimal, (yyvsp[-1].Lex_length_and_dec));}
-#line 31110 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 996:
@@ -31114,7 +31112,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].const_simple_string));
           }
-#line 31118 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31116 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 997:
@@ -31123,7 +31121,7 @@
             (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[-1].const_simple_string));
             bincmp_collation(national_charset_info, (yyvsp[0].num));
           }
-#line 31127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31125 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 998:
@@ -31132,7 +31130,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_string, (yyvsp[0].const_simple_string));
           }
-#line 31136 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31134 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 999:
@@ -31140,7 +31138,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31142 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1000:
@@ -31148,7 +31146,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31152 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31150 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1001:
@@ -31157,7 +31155,7 @@
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-2].const_simple_string));
             bincmp_collation(national_charset_info, (yyvsp[0].num));
           }
-#line 31161 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31159 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1002:
@@ -31166,7 +31164,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31170 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31168 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1003:
@@ -31175,7 +31173,7 @@
             Lex->charset= &my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].const_simple_string));
           }
-#line 31179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31177 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1004:
@@ -31183,7 +31181,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec));
           }
-#line 31187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1005:
@@ -31192,7 +31190,7 @@
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec));
             bincmp_collation(national_charset_info, (yyvsp[0].num));
           }
-#line 31196 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31194 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1006:
@@ -31201,7 +31199,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[0].Lex_length_and_dec));
           }
-#line 31205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31203 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1007:
@@ -31209,7 +31207,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec));
           }
-#line 31213 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31211 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1008:
@@ -31217,7 +31215,7 @@
     {
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec));
           }
-#line 31221 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31219 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1009:
@@ -31226,7 +31224,7 @@
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[-1].Lex_length_and_dec));
             bincmp_collation(national_charset_info, (yyvsp[0].num));
           }
-#line 31230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1010:
@@ -31235,7 +31233,7 @@
             Lex->charset= &my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[0].Lex_length_and_dec));
           }
-#line 31239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31237 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1011:
@@ -31244,7 +31242,7 @@
             Lex->charset= &my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_varchar, (yyvsp[0].Lex_length_and_dec));
           }
-#line 31248 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1012:
@@ -31266,13 +31264,13 @@
             }
             (yyval.Lex_field_type).set(&type_handler_year, (yyvsp[-1].const_simple_string));
           }
-#line 31270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31268 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1013:
 #line 6937 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(thd->type_handler_for_date()); }
-#line 31276 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31274 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1014:
@@ -31283,7 +31281,7 @@
                    static_cast(&type_handler_time),
                    (yyvsp[0].const_simple_string));
           }
-#line 31287 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31285 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1015:
@@ -31308,7 +31306,7 @@
                      (yyvsp[0].const_simple_string));
             }
           }
-#line 31312 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1016:
@@ -31319,7 +31317,7 @@
                    static_cast(&type_handler_datetime),
                    (yyvsp[0].const_simple_string));
           }
-#line 31323 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1017:
@@ -31328,7 +31326,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_tiny_blob);
           }
-#line 31332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31330 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1018:
@@ -31337,7 +31335,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string));
           }
-#line 31341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31339 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1019:
@@ -31346,7 +31344,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string));
           }
-#line 31350 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31348 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1020:
@@ -31355,7 +31353,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_long_blob);
           }
-#line 31359 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31357 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1021:
@@ -31370,7 +31368,7 @@
                               sym_group_geom.needed_define));
 #endif
           }
-#line 31374 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31372 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1022:
@@ -31379,7 +31377,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_medium_blob);
           }
-#line 31383 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31381 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1023:
@@ -31388,7 +31386,7 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_long_blob);
           }
-#line 31392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31390 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1024:
@@ -31397,49 +31395,49 @@
             Lex->charset=&my_charset_bin;
             (yyval.Lex_field_type).set(&type_handler_medium_blob);
           }
-#line 31401 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31399 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1025:
 #line 7024 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_medium_blob); }
-#line 31407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1026:
 #line 7026 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_tiny_blob); }
-#line 31413 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31411 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1027:
 #line 7028 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_blob, (yyvsp[-1].const_simple_string)); }
-#line 31419 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1028:
 #line 7030 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_medium_blob); }
-#line 31425 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1029:
 #line 7032 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_long_blob); }
-#line 31431 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31429 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1030:
 #line 7034 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_long_blob); }
-#line 31437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31435 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1031:
 #line 7036 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_medium_blob); }
-#line 31443 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31441 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1032:
@@ -31448,157 +31446,157 @@
             Lex->charset= &my_charset_utf8mb4_bin;
             (yyval.Lex_field_type).set(&type_handler_long_blob);
           }
-#line 31452 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31450 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1033:
 #line 7046 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_enum); }
-#line 31458 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31456 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1034:
 #line 7048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_field_type).set(&type_handler_set); }
-#line 31464 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31462 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1035:
 #line 7052 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_GEOMETRY; }
-#line 31470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31468 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1036:
 #line 7053 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_GEOMETRYCOLLECTION; }
-#line 31476 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31474 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1037:
 #line 7054 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_POINT; }
-#line 31482 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1038:
 #line 7055 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_MULTIPOINT; }
-#line 31488 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31486 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1039:
 #line 7056 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_LINESTRING; }
-#line 31494 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31492 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1040:
 #line 7057 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_MULTILINESTRING; }
-#line 31500 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31498 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1041:
 #line 7058 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_POLYGON; }
-#line 31506 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31504 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1042:
 #line 7059 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.geom_type)= Field::GEOM_MULTIPOLYGON; }
-#line 31512 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31510 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1043:
 #line 7063 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31518 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31516 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1044:
 #line 7067 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31524 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31522 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1045:
 #line 7068 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31530 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31528 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1046:
 #line 7072 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31536 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31534 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1047:
 #line 7073 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31542 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31540 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1048:
 #line 7077 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31548 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31546 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1049:
 #line 7078 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1050:
 #line 7079 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31558 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1051:
 #line 7080 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31566 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31564 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1052:
 #line 7081 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31572 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31570 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1053:
 #line 7085 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_long; }
-#line 31578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1054:
 #line 7086 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_tiny; }
-#line 31584 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31582 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1055:
 #line 7087 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_short; }
-#line 31590 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31588 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1056:
 #line 7088 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_int24; }
-#line 31596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31594 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1057:
 #line 7089 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_longlong; }
-#line 31602 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31600 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1058:
@@ -31608,25 +31606,25 @@
               static_cast(&type_handler_float) :
               static_cast(&type_handler_double);
           }
-#line 31612 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31610 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1059:
 #line 7099 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_double; }
-#line 31618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1060:
 #line 7100 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.type_handler)= &type_handler_double; }
-#line 31624 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31622 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1061:
 #line 7105 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->srid= 0; }
-#line 31630 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31628 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1062:
@@ -31634,281 +31632,281 @@
     {
             Lex->last_field->srid=atoi((yyvsp[0].lex_str).str);
           }
-#line 31638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1063:
 #line 7114 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set(0, 0);  }
-#line 31644 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31642 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1064:
 #line 7115 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), 0); }
-#line 31650 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31648 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1065:
 #line 7116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
-#line 31656 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31654 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1066:
 #line 7120 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set((yyvsp[-3].lex_str).str, (yyvsp[-1].lex_str).str); }
-#line 31662 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31660 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1067:
 #line 7124 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31666 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1068:
 #line 7125 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31674 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31672 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1069:
 #line 7126 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG;}
-#line 31680 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31678 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1070:
 #line 7127 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
-#line 31686 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31684 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1071:
 #line 7128 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
-#line 31692 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31690 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1072:
 #line 7129 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= UNSIGNED_FLAG | ZEROFILL_FLAG; }
-#line 31698 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31696 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1073:
 #line 7133 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 31704 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31702 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1074:
 #line 7134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 31710 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1075:
 #line 7135 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 31716 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1076:
 #line 7136 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[-1].lex_str).str; }
-#line 31722 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31720 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1077:
-#line 7139 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (char*) 0; /* use default length */ }
-#line 31728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31726 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1078:
-#line 7140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7141 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[0].const_simple_string); }
-#line 31734 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1079:
-#line 7143 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (char*) "1"; }
-#line 31740 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31738 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1080:
-#line 7144 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7146 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[0].const_simple_string); }
-#line 31746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31744 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1081:
-#line 7165 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7168 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set("4000", "4000"); }
-#line 31752 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31750 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1082:
-#line 7166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7169 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), NULL); }
-#line 31758 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31756 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1083:
-#line 7169 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set("2000", "2000"); }
-#line 31764 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1084:
-#line 7170 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set((yyvsp[0].const_simple_string), NULL); }
-#line 31770 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31768 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1085:
-#line 7173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7178 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec).set(0, 0); }
-#line 31776 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31774 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1086:
-#line 7174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7179 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_length_and_dec)= (yyvsp[0].Lex_length_and_dec); }
-#line 31782 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31780 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1087:
-#line 7179 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7184 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31788 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1089:
-#line 7184 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7189 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->flags&= ~ NOT_NULL_FLAG; }
-#line 31794 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31792 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1090:
-#line 7185 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7190 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->default_value= (yyvsp[0].virtual_column); }
-#line 31800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1091:
-#line 7187 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7192 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
             if (unlikely(item == NULL))
               MYSQL_YYABORT;
             Lex->last_field->on_update= item;
           }
-#line 31811 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1092:
-#line 7193 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7198 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG; }
-#line 31817 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1093:
-#line 7195 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7200 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->last_field->flags|= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_KEY_FLAG;
             lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 31827 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31825 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1094:
-#line 7201 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7206 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(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 31838 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1096:
-#line 7211 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= NULL; }
-#line 31844 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1097:
-#line 7212 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7217 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.const_simple_string)= (yyvsp[0].ident_sys).str; }
-#line 31850 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1098:
-#line 7216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7221 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 31856 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1099:
-#line 7217 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 31862 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1100:
-#line 7222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7227 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->last_field->set_compressed((yyvsp[0].const_simple_string))))
               MYSQL_YYABORT;
           }
-#line 31871 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31869 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1101:
-#line 7230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7235 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->last_field->set_compressed_deprecated(thd, (yyvsp[0].const_simple_string))))
               MYSQL_YYABORT;
           }
-#line 31880 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1102:
-#line 7238 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7243 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->last_field->
                 set_compressed_deprecated_column_attribute(thd, (yyvsp[-1].kwd).pos(), (yyvsp[0].const_simple_string))))
               MYSQL_YYABORT;
           }
-#line 31890 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31888 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1103:
-#line 7247 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7252 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->last_field->flags|= NOT_NULL_FLAG;
           }
-#line 31898 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31896 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1104:
-#line 7251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7256 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->last_field->flags|= PRI_KEY_FLAG | NOT_NULL_FLAG;
             lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 31908 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31906 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1107:
-#line 7262 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7267 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -31917,11 +31915,11 @@
                                        &Lex->last_field->option_list,
                                        &Lex->option_list_last);
           }
-#line 31921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1108:
-#line 7271 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7276 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -31930,31 +31928,31 @@
                                        &Lex->last_field->option_list,
                                        &Lex->option_list_last);
           }
-#line 31934 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31932 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1109:
-#line 7280 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->last_field->option_list,
                                        &Lex->option_list_last, thd->mem_root);
           }
-#line 31944 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1110:
-#line 7286 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7291 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), &Lex->last_field->option_list,
                                        &Lex->option_list_last);
           }
-#line 31954 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1111:
-#line 7292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7297 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->last_field->versioning= (yyvsp[-1].vers_column_versioning);
             Lex->create_info.options|= HA_VERSIONED_TABLE;
@@ -31964,31 +31962,31 @@
                        Lex->create_last_non_select_table->table_name.str));
             }
           }
-#line 31968 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31966 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1112:
-#line 7305 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7310 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
             Lex->create_info.vers_info.versioned_fields= true;
             (yyval.vers_column_versioning)= Column_definition::WITH_VERSIONING;
           }
-#line 31978 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31976 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1113:
-#line 7311 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7316 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_COLUMN_UNVERSIONED;
             Lex->create_info.vers_info.unversioned_fields= true;
             (yyval.vers_column_versioning)= Column_definition::WITHOUT_VERSIONING;
           }
-#line 31988 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 31986 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1114:
-#line 7321 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7326 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           (yyval.Lex_field_type)= (yyvsp[-1].Lex_field_type);
 
@@ -31999,11 +31997,11 @@
           }
           Lex->last_field->set_attributes((yyvsp[-1].Lex_field_type), Lex->charset);
         }
-#line 32003 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32001 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1115:
-#line 7335 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7340 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           (yyval.Lex_field_type)= (yyvsp[-1].Lex_field_type);
           if ((yyvsp[0].charset))
@@ -32013,205 +32011,205 @@
           }
           Lex->last_field->set_attributes((yyvsp[-1].Lex_field_type), Lex->charset);
         }
-#line 32017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32015 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1116:
-#line 7347 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7352 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1117:
-#line 7348 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7353 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1118:
-#line 7353 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7358 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((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 32038 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32036 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1119:
-#line 7357 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7362 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)= &my_charset_bin; }
-#line 32044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1120:
-#line 7361 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7366 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset);   }
-#line 32050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1121:
-#line 7362 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7367 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32056 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1122:
-#line 7366 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7371 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)= NULL; }
-#line 32062 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1123:
-#line 7367 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7372 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)= (yyvsp[0].charset); }
-#line 32068 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32066 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1124:
-#line 7372 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7377 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((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 32079 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1125:
-#line 7378 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7383 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)= &my_charset_bin; }
-#line 32085 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32083 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1126:
-#line 7382 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7387 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset);   }
-#line 32091 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32089 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1127:
-#line 7383 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7388 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32097 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32095 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1128:
-#line 7388 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7393 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.charset)= mysqld_collation_get_by_name((yyvsp[0].lex_str).str))))
               MYSQL_YYABORT;
           }
-#line 32106 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32104 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1129:
-#line 7395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7400 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32112 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32110 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1130:
-#line 7396 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7401 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset); }
-#line 32118 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32116 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1131:
-#line 7400 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=(yyvsp[0].charset); }
-#line 32124 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32122 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1132:
-#line 7401 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)=NULL; }
-#line 32130 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32128 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1133:
-#line 7405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32136 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32134 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1134:
-#line 7406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7411 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32142 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1135:
-#line 7410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7415 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)= (yyvsp[0].charset); }
-#line 32148 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32146 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1136:
-#line 7411 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7416 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.charset)= &my_charset_latin1; }
-#line 32154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32152 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1137:
-#line 7413 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7418 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.charset)= get_charset_by_csname("ucs2", MY_CS_PRIMARY,MYF(0)))))
               my_yyabort_error((ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2"));
           }
-#line 32163 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32161 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1138:
-#line 7420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7425 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { bincmp_collation(NULL, false); }
-#line 32169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32167 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1139:
-#line 7421 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7426 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32173 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1140:
-#line 7425 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7430 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { bincmp_collation(&my_charset_bin, false); }
-#line 32181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1141:
-#line 7426 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { bincmp_collation((yyvsp[-1].charset), (yyvsp[0].num)); }
-#line 32187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1142:
-#line 7427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { bincmp_collation(NULL, true); }
-#line 32193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32191 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1143:
-#line 7428 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { bincmp_collation((yyvsp[0].charset), true); }
-#line 32199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32197 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1144:
-#line 7432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7437 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= false; }
-#line 32205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32203 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1145:
-#line 7433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= true; }
-#line 32211 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32209 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1146:
-#line 7438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7443 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           if (unlikely((yyvsp[0].ulong_num) == 0))
           {
@@ -32219,148 +32217,148 @@
             MYSQL_YYABORT;
           }
         }
-#line 32223 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32221 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1147:
-#line 7446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7451 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[-2].ulong_num); }
-#line 32229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1148:
-#line 7450 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7455 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 32235 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32233 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1149:
-#line 7451 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7456 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 1 << MY_STRXFRM_DESC_SHIFT; }
-#line 32241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1150:
-#line 7455 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 1 << MY_STRXFRM_REVERSE_SHIFT; }
-#line 32247 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32245 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1151:
-#line 7458 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7463 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 32253 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32251 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1152:
-#line 7459 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7464 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32257 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1153:
-#line 7460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7465 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[-1].ulong_num) | (yyvsp[0].ulong_num); }
-#line 32265 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32263 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1154:
-#line 7461 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num) ; }
-#line 32271 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1155:
-#line 7466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7471 "/home/buildbot/git/sql/sql_yacc_ora.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 32280 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32278 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1156:
-#line 7474 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7479 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           (yyval.ulong_num)= (1 | (yyvsp[0].ulong_num)) << (yyvsp[-1].ulong_num);
         }
-#line 32288 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32286 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1157:
-#line 7480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7485 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32292 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1158:
-#line 7481 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7486 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)|= (yyvsp[0].ulong_num); }
-#line 32300 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32298 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1159:
-#line 7486 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7491 "/home/buildbot/git/sql/sql_yacc_ora.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 32311 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32309 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1160:
-#line 7495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7500 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32317 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32315 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1161:
-#line 7496 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7501 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32323 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1162:
-#line 7500 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7505 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 32329 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32327 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1163:
-#line 7501 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7506 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num); }
-#line 32335 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32333 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1166:
-#line 7515 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7520 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.table)=(yyvsp[-3].table);
           }
-#line 32343 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1167:
-#line 7522 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7527 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ref_list.empty(); }
-#line 32349 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32347 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1169:
-#line 7528 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7533 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
             if (unlikely(key == NULL))
               MYSQL_YYABORT;
             Lex->ref_list.push_back(key, thd->mem_root);
           }
-#line 32360 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32358 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1170:
-#line 7535 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Key_part_spec *key= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
             if (unlikely(key == NULL))
@@ -32369,181 +32367,181 @@
             lex->ref_list.empty();
             lex->ref_list.push_back(key, thd->mem_root);
           }
-#line 32373 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32371 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1171:
-#line 7547 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7552 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_UNDEF; }
-#line 32379 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1172:
-#line 7549 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7554 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_FULL; }
-#line 32385 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32383 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1173:
-#line 7551 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7556 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_PARTIAL; }
-#line 32391 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32389 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1174:
-#line 7553 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7558 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->fk_match_option= Foreign_key::FK_MATCH_SIMPLE; }
-#line 32397 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32395 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1175:
-#line 7558 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7563 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->fk_update_opt= FK_OPTION_UNDEF;
             lex->fk_delete_opt= FK_OPTION_UNDEF;
           }
-#line 32407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1176:
-#line 7564 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7569 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->fk_update_opt= (yyvsp[0].m_fk_option);
             lex->fk_delete_opt= FK_OPTION_UNDEF;
           }
-#line 32417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32415 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1177:
-#line 7570 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7575 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->fk_update_opt= FK_OPTION_UNDEF;
             lex->fk_delete_opt= (yyvsp[0].m_fk_option);
           }
-#line 32427 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32425 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1178:
-#line 7577 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7582 "/home/buildbot/git/sql/sql_yacc_ora.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 32437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32435 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1179:
-#line 7584 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7589 "/home/buildbot/git/sql/sql_yacc_ora.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 32447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32445 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1180:
-#line 7592 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7597 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_RESTRICT; }
-#line 32453 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32451 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1181:
-#line 7593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7598 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_CASCADE; }
-#line 32459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32457 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1182:
-#line 7594 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7599 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_SET_NULL; }
-#line 32465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32463 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1183:
-#line 7595 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7600 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_NO_ACTION; }
-#line 32471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32469 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1184:
-#line 7596 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_fk_option)= FK_OPTION_SET_DEFAULT; }
-#line 32477 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32475 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1185:
-#line 7600 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7605 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::PRIMARY; }
-#line 32483 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1186:
-#line 7601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7606 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::UNIQUE; }
-#line 32489 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32487 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1187:
-#line 7605 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7610 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32495 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32493 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1188:
-#line 7606 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7611 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1189:
-#line 7610 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7615 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32505 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1191:
-#line 7615 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7620 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32513 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32511 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1192:
-#line 7616 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7621 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32519 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32517 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1193:
-#line 7617 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7622 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1194:
-#line 7621 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7626 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::MULTIPLE; }
-#line 32531 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32529 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1195:
-#line 7622 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7627 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::UNIQUE; }
-#line 32537 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32535 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1196:
-#line 7626 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7631 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_type)= Key::FULLTEXT;}
-#line 32543 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32541 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1197:
-#line 7631 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_SPATIAL
             (yyval.key_type)= Key::SPATIAL;
@@ -32552,104 +32550,104 @@
                               sym_group_geom.needed_define));
 #endif
           }
-#line 32556 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1198:
-#line 7642 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7647 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32562 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1199:
-#line 7643 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7648 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_key->option_list= Lex->option_list; }
-#line 32568 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32566 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1200:
-#line 7647 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7652 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32574 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32572 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1201:
-#line 7648 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_key->option_list= Lex->option_list; }
-#line 32580 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1202:
-#line 7652 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7657 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32584 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1203:
-#line 7653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7658 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_key->option_list= Lex->option_list; }
-#line 32592 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32590 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1210:
-#line 7672 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7677 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
-#line 32598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1211:
-#line 7673 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7678 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= (yyvsp[0].key_alg); }
-#line 32604 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32602 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1212:
-#line 7677 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7683 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_UNDEF; }
-#line 32610 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32608 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1213:
-#line 7678 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7684 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= (yyvsp[0].key_alg); }
-#line 32616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32614 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1214:
-#line 7679 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7685 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= (yyvsp[0].key_alg); }
-#line 32622 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32620 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1215:
-#line 7683 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7690 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
-#line 32628 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1216:
-#line 7685 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_key->key_create_info.algorithm= (yyvsp[0].key_alg); }
-#line 32634 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32632 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1217:
-#line 7690 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7697 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->last_key->key_create_info.block_size= (yyvsp[0].ulong_num);
             Lex->last_key->key_create_info.flags|= HA_USES_BLOCK_SIZE;
          }
-#line 32643 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32641 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1218:
-#line 7695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7702 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_key->key_create_info.comment= (yyvsp[0].lex_str); }
-#line 32649 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32647 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1219:
-#line 7697 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7704 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].lex_str).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -32657,11 +32655,11 @@
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].lex_str), true, &Lex->option_list,
                                        &Lex->option_list_last);
           }
-#line 32661 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32659 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1220:
-#line 7705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7712 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].ident_sys).length > ENGINE_OPTION_MAX_LENGTH))
               my_yyabort_error((ER_VALUE_TOO_LONG, MYF(0), (yyvsp[-2].ident_sys).str));
@@ -32669,86 +32667,86 @@
                    engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ident_sys), false, &Lex->option_list,
                                        &Lex->option_list_last);
           }
-#line 32673 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32671 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1221:
-#line 7713 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7720 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                   engine_option_value((yyvsp[-2].ident_sys), (yyvsp[0].ulonglong_number), &Lex->option_list,
                                       &Lex->option_list_last, thd->mem_root);
           }
-#line 32683 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32681 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1222:
-#line 7719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7726 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (void) new (thd->mem_root)
                    engine_option_value((yyvsp[-2].ident_sys), &Lex->option_list,
                                        &Lex->option_list_last);
           }
-#line 32693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32691 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1227:
-#line 7738 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7745 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (likely(plugin_is_ready(&(yyvsp[0].ident_sys), MYSQL_FTPARSER_PLUGIN)))
               Lex->last_key->key_create_info.parser_name= (yyvsp[0].ident_sys);
             else
               my_yyabort_error((ER_FUNCTION_NOT_DEFINED, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 32704 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32702 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1228:
-#line 7747 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_BTREE; }
-#line 32710 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1229:
-#line 7748 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7755 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_RTREE; }
-#line 32716 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1230:
-#line 7749 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7756 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.key_alg)= HA_KEY_ALG_HASH; }
-#line 32722 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32720 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1231:
-#line 7754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7761 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
           }
-#line 32730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1232:
-#line 7758 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7765 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->last_key->columns.push_back((yyvsp[-1].key_part), thd->mem_root);
           }
-#line 32738 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32736 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1233:
-#line 7765 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7772 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.key_part)= new (thd->mem_root) Key_part_spec(&(yyvsp[0].ident_sys), 0);
             if (unlikely((yyval.key_part) == NULL))
               MYSQL_YYABORT;
           }
-#line 32748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1234:
-#line 7771 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7778 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             int key_part_len= atoi((yyvsp[-1].lex_str).str);
             if (unlikely(!key_part_len))
@@ -32757,35 +32755,35 @@
             if (unlikely((yyval.key_part) == NULL))
               MYSQL_YYABORT;
           }
-#line 32761 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32759 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1235:
-#line 7782 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7789 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 32767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32765 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1236:
-#line 7783 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7790 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 32773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32771 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1237:
-#line 7788 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7795 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
-#line 32779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32777 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1238:
-#line 7790 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7797 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->last_field->interval_list.push_back((yyvsp[0].string), thd->mem_root); }
-#line 32785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32783 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1239:
-#line 7798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7806 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->name= null_clex_str;
             Lex->table_type= TABLE_TYPE_UNKNOWN;
@@ -32799,11 +32797,11 @@
             Lex->create_info.storage_media= HA_SM_DEFAULT;
             DBUG_ASSERT(!Lex->m_sql_cmd);
           }
-#line 32803 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32801 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1240:
-#line 7812 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7820 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Lex->select_lex.add_table_to_list(thd, (yyvsp[-1].table), NULL,
                                                             TL_OPTION_UPDATING,
@@ -32812,12 +32810,13 @@
               MYSQL_YYABORT;
             Lex->select_lex.db= (Lex->select_lex.table_list.first)->db;
             Lex->create_last_non_select_table= Lex->last_table();
+            Lex->mark_first_table_as_inserting();
           }
-#line 32817 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32816 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1241:
-#line 7822 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7831 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (likely(!Lex->m_sql_cmd))
             {
@@ -32827,20 +32826,20 @@
                 MYSQL_YYABORT;
             }
           }
-#line 32831 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1242:
-#line 7832 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7841 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->create_info.default_table_charset= NULL;
             Lex->create_info.used_fields= 0;
           }
-#line 32840 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32839 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1243:
-#line 7837 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7846 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_ALTER_DB;
@@ -32849,11 +32848,11 @@
                 unlikely(lex->copy_db_to(&lex->name)))
               MYSQL_YYABORT;
           }
-#line 32853 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32852 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1244:
-#line 7846 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7855 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sphead))
@@ -32861,11 +32860,11 @@
             lex->sql_command= SQLCOM_ALTER_DB_UPGRADE;
             lex->name= (yyvsp[-4].ident_sys);
           }
-#line 32865 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32864 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1245:
-#line 7854 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7863 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -32873,22 +32872,22 @@
               my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PROCEDURE"));
             lex->sp_chistics.init();
           }
-#line 32877 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32876 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1246:
-#line 7862 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7871 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
             lex->sql_command= SQLCOM_ALTER_PROCEDURE;
             lex->spname= (yyvsp[-2].spname);
           }
-#line 32888 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32887 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1247:
-#line 7869 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7878 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -32896,52 +32895,52 @@
               my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "FUNCTION"));
             lex->sp_chistics.init();
           }
-#line 32900 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1248:
-#line 7877 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7886 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
             lex->sql_command= SQLCOM_ALTER_FUNCTION;
             lex->spname= (yyvsp[-2].spname);
           }
-#line 32911 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32910 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1249:
-#line 7884 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7893 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_view(thd, (yyvsp[-4].num), (yyvsp[-2].view_suid), (yyvsp[0].table))))
               MYSQL_YYABORT;
           }
-#line 32920 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1250:
-#line 7889 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7898 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32926 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32925 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1251:
-#line 7896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_view(thd, VIEW_ALGORITHM_INHERIT, (yyvsp[-2].view_suid), (yyvsp[0].table))))
               MYSQL_YYABORT;
           }
-#line 32935 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32934 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1252:
-#line 7901 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7910 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 32941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32940 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1253:
-#line 7903 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* 
               It is safe to use Lex->spname because
@@ -32958,11 +32957,11 @@
             Lex->sql_command= SQLCOM_ALTER_EVENT;
             Lex->stmt_definition_begin= (yyvsp[-2].simple_string);
           }
-#line 32962 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32961 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1254:
-#line 7924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7933 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyvsp[-4].num) || (yyvsp[-3].num) || (yyvsp[-2].num) || (yyvsp[-1].num) || (yyvsp[0].num))))
             {
@@ -32976,72 +32975,72 @@
             Lex->sql_command= SQLCOM_ALTER_EVENT;
             Lex->stmt_definition_end= (char*)YYLIP->get_cpp_ptr();
           }
-#line 32980 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32979 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1255:
-#line 7938 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7947 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_TABLESPACE;
           }
-#line 32989 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32988 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1256:
-#line 7943 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7952 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_LOGFILE_GROUP;
           }
-#line 32998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 32997 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1257:
-#line 7948 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7957 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= CHANGE_FILE_TABLESPACE;
           }
-#line 33007 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33006 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1258:
-#line 7953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= ALTER_ACCESS_MODE_TABLESPACE;
           }
-#line 33016 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33015 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1259:
-#line 7958 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7967 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_ALTER_SERVER;
             lex->server_options.reset((yyvsp[0].lex_str));
           }
-#line 33026 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33025 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1260:
-#line 7962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 33032 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33031 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1261:
-#line 7966 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7975 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->create_info.set((yyvsp[-5].object_ddl_options));
             Lex->sql_command= SQLCOM_ALTER_USER;
           }
-#line 33041 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33040 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1262:
-#line 7971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->name= null_clex_str;
@@ -33051,11 +33050,11 @@
             lex->no_write_to_binlog= 0;
             DBUG_ASSERT(!lex->m_sql_cmd);
           }
-#line 33055 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1263:
-#line 7981 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 7990 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!(lex->create_info.seq_create_info=
@@ -33066,52 +33065,52 @@
                                                             MDL_EXCLUSIVE)))
               MYSQL_YYABORT;
           }
-#line 33070 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33069 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1264:
-#line 7992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Create a generic ALTER SEQUENCE statment. */
             Lex->m_sql_cmd= new (thd->mem_root) Sql_cmd_alter_sequence((yyvsp[-4].object_ddl_options));
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33081 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33080 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1265:
-#line 8001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8010 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;}
-#line 33087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33086 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1266:
-#line 8002 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8011 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33093 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33092 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1267:
-#line 8003 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8012 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1268:
-#line 8004 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8013 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33105 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33104 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1269:
-#line 8008 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8017 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;}
-#line 33111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33110 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1270:
-#line 8010 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8019 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               Use lex's spname to hold the new name.
@@ -33120,29 +33119,29 @@
             Lex->spname= (yyvsp[0].spname); 
             (yyval.num)= 1;
           }
-#line 33124 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33123 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1271:
-#line 8021 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8030 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;}
-#line 33130 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33129 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1272:
-#line 8022 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8031 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 33136 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33135 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1273:
-#line 8026 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8035 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ident_sys)= Lex_ident_sys(); }
-#line 33142 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1276:
-#line 8033 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8042 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->m_sql_cmd= new (thd->mem_root)
               Sql_cmd_discard_import_tablespace(
@@ -33150,11 +33149,11 @@
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33153 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1277:
-#line 8041 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8050 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->m_sql_cmd= new (thd->mem_root)
               Sql_cmd_discard_import_tablespace(
@@ -33162,31 +33161,31 @@
             if (unlikely(Lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33166 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33165 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1283:
-#line 8063 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8072 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_DROP;
             DBUG_ASSERT(!Lex->if_exists());
             Lex->create_info.add((yyvsp[-1].object_ddl_options));
           }
-#line 33176 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1284:
-#line 8070 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8079 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_info.partition_flags|= ALTER_PARTITION_REBUILD;
             lex->no_write_to_binlog= (yyvsp[-1].num);
           }
-#line 33186 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1285:
-#line 8077 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8086 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[-1].num);
@@ -33197,11 +33196,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33201 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33200 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1287:
-#line 8090 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8099 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[-1].num);
@@ -33212,11 +33211,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
                MYSQL_YYABORT;
           }
-#line 33216 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33215 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1288:
-#line 8101 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8110 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->check_opt.init();
@@ -33226,11 +33225,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1290:
-#line 8113 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8122 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->no_write_to_binlog= (yyvsp[-1].num);
@@ -33241,22 +33240,22 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33245 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33244 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1292:
-#line 8125 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_info.partition_flags|= ALTER_PARTITION_COALESCE;
             lex->no_write_to_binlog= (yyvsp[-1].num);
             lex->alter_info.num_parts= (yyvsp[0].ulong_num);
           }
-#line 33256 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33255 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1293:
-#line 8132 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8141 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->check_opt.init();
@@ -33266,11 +33265,11 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1295:
-#line 8144 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8153 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->select_lex.db= (yyvsp[-1].table)->db;
@@ -33290,27 +33289,27 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 33294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33293 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1296:
-#line 8167 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8176 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_REMOVE;
           }
-#line 33302 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33301 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1297:
-#line 8174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_ALL;
           }
-#line 33310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33309 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1299:
-#line 8183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8192 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info= new (thd->mem_root) partition_info();
@@ -33322,34 +33321,34 @@
             lex->create_info.set((yyvsp[-1].object_ddl_options));
             lex->no_write_to_binlog= (yyvsp[0].num);
           }
-#line 33326 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33325 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1300:
-#line 8195 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8204 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33331 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1302:
-#line 8201 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8210 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info->num_parts= lex->part_info->partitions.elements;
           }
-#line 33341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33340 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1303:
-#line 8206 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8215 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->part_info->num_parts= (yyvsp[0].ulong_num);
           }
-#line 33349 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33348 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1304:
-#line 8213 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->part_info= new (thd->mem_root) partition_info();
@@ -33358,136 +33357,136 @@
 
             lex->no_write_to_binlog= (yyvsp[0].num);
           }
-#line 33362 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33361 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1306:
-#line 8226 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8235 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_TABLE_REORG;
           }
-#line 33370 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33369 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1307:
-#line 8230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8239 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_REORGANIZE;
           }
-#line 33378 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1308:
-#line 8234 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8243 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             partition_info *part_info= Lex->part_info;
             part_info->num_parts= part_info->partitions.elements;
           }
-#line 33387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1309:
-#line 8241 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8250 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33393 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1310:
-#line 8242 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33399 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1311:
-#line 8247 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8256 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->alter_info.partition_names.push_back((yyvsp[0].ident_sys).str,
                                                                    thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 33409 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33408 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1315:
-#line 8269 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8278 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->create_last_non_select_table= lex->last_table();
             lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
             (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
           }
-#line 33420 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33419 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1316:
-#line 8276 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->create_last_non_select_table= Lex->last_table();
             Lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 33429 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33428 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1317:
-#line 8281 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8290 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_ADD_PERIOD;
           }
-#line 33437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33436 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1318:
-#line 8285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8294 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_PARSER_ADD_COLUMN;
             if (!lex->alter_info.key_list.is_empty())
               lex->alter_info.flags|= ALTER_ADD_INDEX;
           }
-#line 33448 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1319:
-#line 8292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8301 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
 	  }
-#line 33456 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33455 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1320:
-#line 8296 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8305 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
            Lex->alter_info.flags|= ALTER_ADD_CHECK_CONSTRAINT;
            Lex->add_constraint(&(yyvsp[-1].lex_str), (yyvsp[0].virtual_column), TRUE);
          }
-#line 33465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33464 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1321:
-#line 8302 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8311 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_CHANGE_COLUMN | ALTER_RENAME_COLUMN;
             Lex->create_last_non_select_table= Lex->last_table();
             (yyvsp[-1].create_field)->change= (yyvsp[-2].lex_str);
             (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
           }
-#line 33476 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33475 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1322:
-#line 8310 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8319 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
             Lex->create_last_non_select_table= Lex->last_table();
             (yyvsp[-1].create_field)->change= (yyvsp[-1].create_field)->field_name;
             (yyvsp[-1].create_field)->after= (yyvsp[0].lex_str);
           }
-#line 33487 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33486 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1323:
-#line 8317 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8326 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -33497,11 +33496,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_PARSER_DROP_COLUMN;
           }
-#line 33501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33500 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1324:
-#line 8327 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8336 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -33512,11 +33511,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_CHECK_CONSTRAINT;
           }
-#line 33516 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1325:
-#line 8338 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8347 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -33526,11 +33525,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_FOREIGN_KEY;
           }
-#line 33530 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33529 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1326:
-#line 8348 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8357 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -33541,11 +33540,11 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_INDEX;
           }
-#line 33545 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33544 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1327:
-#line 8359 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -33555,50 +33554,50 @@
             lex->alter_info.drop_list.push_back(ad, thd->mem_root);
             lex->alter_info.flags|= ALTER_DROP_INDEX;
           }
-#line 33559 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33558 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1328:
-#line 8369 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8378 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.keys_onoff= Alter_info::DISABLE;
             lex->alter_info.flags|= ALTER_KEYS_ONOFF;
           }
-#line 33569 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33568 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1329:
-#line 8375 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.keys_onoff= Alter_info::ENABLE;
             lex->alter_info.flags|= ALTER_KEYS_ONOFF;
           }
-#line 33579 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1330:
-#line 8381 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8390 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_list((yyvsp[-3].lex_str).str, (yyvsp[0].virtual_column), (yyvsp[-4].num))))
               MYSQL_YYABORT;
           }
-#line 33588 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33587 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1331:
-#line 8386 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_alter_list((yyvsp[-2].lex_str).str, (Virtual_column_info*) 0,
                                              (yyvsp[-3].num))))
               MYSQL_YYABORT;
           }
-#line 33598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33597 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1332:
-#line 8392 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8401 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->select_lex.db= (yyvsp[0].table)->db;
@@ -33612,11 +33611,11 @@
             lex->name= (yyvsp[0].table)->table;
             lex->alter_info.flags|= ALTER_RENAME;
           }
-#line 33616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33615 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1333:
-#line 8406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8415 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (!(yyvsp[-1].charset))
             {
@@ -33630,267 +33629,267 @@
               MYSQL_YYABORT;
             Lex->alter_info.flags|= ALTER_OPTIONS;
           }
-#line 33634 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33633 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1334:
-#line 8420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8429 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_OPTIONS;
           }
-#line 33643 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33642 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1335:
-#line 8425 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8434 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_RECREATE;
           }
-#line 33651 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33650 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1336:
-#line 8429 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->alter_info.flags|= ALTER_ORDER;
           }
-#line 33660 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33659 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1339:
-#line 8436 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8445 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_ADD_SYSTEM_VERSIONING;
             Lex->create_info.options|= HA_VERSIONED_TABLE;
           }
-#line 33669 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1340:
-#line 8441 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8450 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_DROP_SYSTEM_VERSIONING;
             Lex->create_info.options&= ~HA_VERSIONED_TABLE;
           }
-#line 33678 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33677 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1341:
-#line 8446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8455 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.flags|= ALTER_DROP_PERIOD;
           }
-#line 33686 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33685 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1347:
-#line 8460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8470 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.requested_algorithm=
               Alter_info::ALTER_TABLE_ALGORITHM_DEFAULT;
           }
-#line 33695 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1348:
-#line 8465 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8475 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->alter_info.set_requested_algorithm(&(yyvsp[0].ident_sys))))
               my_yyabort_error((ER_UNKNOWN_ALTER_ALGORITHM, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 33704 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1349:
-#line 8473 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8483 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.requested_lock=
               Alter_info::ALTER_TABLE_LOCK_DEFAULT;
           }
-#line 33713 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33712 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1350:
-#line 8478 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8488 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->alter_info.set_requested_lock(&(yyvsp[0].ident_sys))))
               my_yyabort_error((ER_UNKNOWN_ALTER_LOCK, MYF(0), (yyvsp[0].ident_sys).str));
           }
-#line 33722 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33721 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1351:
-#line 8485 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33727 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1352:
-#line 8486 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8496 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33734 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33733 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1353:
-#line 8490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8500 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ignore= 0;}
-#line 33740 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33739 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1354:
-#line 8491 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8501 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ignore= 1;}
-#line 33746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33745 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1355:
-#line 8495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8505 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ignore= 0;}
-#line 33752 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33751 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1361:
-#line 8509 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8519 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ignore= 1;}
-#line 33758 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33757 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1362:
-#line 8511 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8521 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.requested_lock=
               Alter_info::ALTER_TABLE_LOCK_NONE;
           }
-#line 33767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33766 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1363:
-#line 8518 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8529 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->drop_mode= DROP_DEFAULT; }
-#line 33773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33772 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1364:
-#line 8519 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8530 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->drop_mode= DROP_RESTRICT; }
-#line 33779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33778 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1365:
-#line 8520 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8531 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->drop_mode= DROP_CASCADE; }
-#line 33785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33784 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1366:
-#line 8524 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8535 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 33791 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33790 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1367:
-#line 8526 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8537 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str)= (yyvsp[0].ident_sys);
             Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
           }
-#line 33800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33799 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1368:
-#line 8531 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8542 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str).str=    first_keyword;
 	    (yyval.lex_str).length= 5; /* Length of "first" */
             Lex->alter_info.flags |= ALTER_COLUMN_ORDER;
           }
-#line 33810 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1369:
-#line 8539 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8550 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33816 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1370:
-#line 8540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8551 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33822 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33821 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1371:
-#line 8541 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8552 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33828 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33827 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1372:
-#line 8542 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8553 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33834 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33833 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1373:
-#line 8547 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8558 "/home/buildbot/git/sql/sql_yacc_ora.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 33845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33844 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1374:
-#line 8554 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8565 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33851 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33850 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1375:
-#line 8556 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8567 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_SLAVE_ALL_START;
             lex->type = 0;
             /* If you change this code don't forget to update STOP SLAVE too */
           }
-#line 33862 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1376:
-#line 8562 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8573 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33868 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1377:
-#line 8564 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8575 "/home/buildbot/git/sql/sql_yacc_ora.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 33879 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1378:
-#line 8571 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8582 "/home/buildbot/git/sql/sql_yacc_ora.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 33890 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33889 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1379:
-#line 8581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8592 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_BEGIN;
@@ -33903,103 +33902,103 @@
             }
             lex->start_transaction_opt= (yyvsp[0].num);
           }
-#line 33907 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33906 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1380:
-#line 8597 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8608 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= 0;
           }
-#line 33915 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33914 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1381:
-#line 8601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8612 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (yyvsp[0].num);
           }
-#line 33923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33922 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1382:
-#line 8608 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8619 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (yyvsp[0].num);
           }
-#line 33931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33930 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1383:
-#line 8612 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (yyvsp[-2].num) | (yyvsp[0].num);
           }
-#line 33939 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33938 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1384:
-#line 8619 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_WITH_CONS_SNAPSHOT;
           }
-#line 33947 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33946 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1385:
-#line 8623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8634 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_READ_ONLY;
           }
-#line 33955 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33954 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1386:
-#line 8627 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8638 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= MYSQL_START_TRANS_OPT_READ_WRITE;
           }
-#line 33963 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33962 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1387:
-#line 8633 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8644 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->slave_thd_opt= 0; }
-#line 33969 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33968 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1388:
-#line 8635 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8646 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33975 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33974 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1391:
-#line 8644 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8655 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33980 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1392:
-#line 8645 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8656 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->slave_thd_opt|=SLAVE_SQL; }
-#line 33987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33986 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1393:
-#line 8646 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8657 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->slave_thd_opt|=SLAVE_IO; }
-#line 33993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33992 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1394:
-#line 8650 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8661 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 33999 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 33998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1395:
-#line 8652 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8663 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(((lex->mi.log_file_name || lex->mi.pos) &&
@@ -34008,60 +34007,60 @@
                            (lex->mi.relay_log_name && lex->mi.relay_log_pos))))
                my_yyabort_error((ER_BAD_SLAVE_UNTIL_COND, MYF(0)));
           }
-#line 34012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34011 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1396:
-#line 8661 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8672 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->mi.gtid_pos_str = (yyvsp[0].lex_str);
           }
-#line 34020 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34019 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1399:
-#line 8673 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8684 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_CHECKSUM;
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34031 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34030 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1400:
-#line 8680 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8691 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34037 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34036 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1401:
-#line 8684 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags= 0; }
-#line 34043 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1402:
-#line 8685 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8696 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags= T_QUICK; }
-#line 34049 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1403:
-#line 8686 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8697 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags= T_EXTEND; }
-#line 34055 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1405:
-#line 8692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8703 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->table_type= TABLE_TYPE_VIEW; }
-#line 34061 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1407:
-#line 8698 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8709 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_REPAIR;
@@ -34071,11 +34070,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34075 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34074 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1408:
-#line 8708 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -34083,65 +34082,65 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34086 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1409:
-#line 8718 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8729 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags = T_MEDIUM; }
-#line 34093 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34092 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1410:
-#line 8719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1411:
-#line 8723 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8734 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34105 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34104 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1412:
-#line 8724 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8735 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34110 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1413:
-#line 8728 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8739 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_QUICK; }
-#line 34117 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34116 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1414:
-#line 8729 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8740 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_EXTEND; }
-#line 34123 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34122 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1415:
-#line 8730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8741 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_USEFRM; }
-#line 34129 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34128 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1416:
-#line 8734 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8745 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 34135 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34134 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1417:
-#line 8735 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8746 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_FROM_MYSQL; }
-#line 34141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1418:
-#line 8740 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8751 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_ANALYZE;
@@ -34151,11 +34150,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34155 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1419:
-#line 8750 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8761 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -34163,149 +34162,149 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34167 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34166 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1423:
-#line 8770 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8781 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34173 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34172 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1424:
-#line 8772 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8783 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             thd->lex->with_persistent_for_clause= TRUE;
           }
-#line 34181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1425:
-#line 8779 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8790 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34186 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1426:
-#line 8781 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8792 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1427:
-#line 8784 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34198 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1428:
-#line 8786 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             LEX* lex= thd->lex;
             lex->column_list= new (thd->mem_root) List;
             if (unlikely(lex->column_list == NULL))
               MYSQL_YYABORT;
           }
-#line 34210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34209 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1430:
-#line 8797 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8809 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34216 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34215 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1431:
-#line 8799 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             LEX* lex= thd->lex;
             lex->index_list= new (thd->mem_root) List;
             if (unlikely(lex->index_list == NULL))
               MYSQL_YYABORT;
           }
-#line 34227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34226 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1433:
-#line 8811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8823 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34233 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34232 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1434:
-#line 8813 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->column_list->push_back((LEX_STRING*)
                 thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
           }
-#line 34242 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1435:
-#line 8818 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8830 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->column_list->push_back((LEX_STRING*)
                 thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)), thd->mem_root);
           }
-#line 34251 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34250 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1436:
-#line 8826 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8838 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34257 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34256 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1439:
-#line 8833 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8845 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->index_list->push_back((LEX_STRING*)
                                        thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_STRING)),
                                        thd->mem_root);
           }
-#line 34267 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34266 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1440:
-#line 8840 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8852 "/home/buildbot/git/sql/sql_yacc_ora.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 34278 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34277 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1441:
-#line 8850 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8862 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
             Lex->comment= (yyvsp[0].lex_str);
             Lex->ident.str=    NULL;
             Lex->ident.length= 0;
           }
-#line 34289 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34288 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1442:
-#line 8858 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8870 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
             Lex->comment= (yyvsp[-3].lex_str);
             Lex->ident=   (yyvsp[0].lex_str);
           }
-#line 34299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34298 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1444:
-#line 8868 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8880 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->table_type= TABLE_TYPE_VIEW; }
-#line 34305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34304 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1446:
-#line 8873 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8885 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -34315,11 +34314,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34319 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34318 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1447:
-#line 8883 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8895 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             if (unlikely(lex->sphead))
@@ -34329,83 +34328,83 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34333 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1448:
-#line 8895 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8907 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags = T_MEDIUM; }
-#line 34339 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34338 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1449:
-#line 8896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8908 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34345 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34344 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1450:
-#line 8900 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34351 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34350 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1451:
-#line 8901 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8913 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34357 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34356 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1452:
-#line 8905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8917 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_QUICK; }
-#line 34363 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34362 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1453:
-#line 8906 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_FAST; }
-#line 34369 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34368 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1454:
-#line 8907 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8919 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_MEDIUM; }
-#line 34375 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34374 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1455:
-#line 8908 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8920 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_EXTEND; }
-#line 34381 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34380 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1456:
-#line 8909 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8921 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.flags|= T_CHECK_ONLY_CHANGED; }
-#line 34387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1457:
-#line 8910 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8922 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
-#line 34393 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1458:
-#line 8914 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8926 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 34399 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1459:
-#line 8915 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8927 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->check_opt.sql_flags|= TT_FOR_UPGRADE; }
-#line 34405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34404 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1460:
-#line 8920 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8932 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_OPTIMIZE;
@@ -34415,11 +34414,11 @@
             /* Will be overridden during execution. */
             YYPS->m_lock_type= TL_UNLOCK;
           }
-#line 34419 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34418 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1461:
-#line 8930 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8942 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -34427,71 +34426,71 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 34431 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34430 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1462:
-#line 8940 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8952 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 34437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34436 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1463:
-#line 8941 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 34443 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34442 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1464:
-#line 8942 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8954 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 34449 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34448 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1465:
-#line 8947 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8959 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_RENAME_TABLE;
           }
-#line 34457 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34456 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1466:
-#line 8951 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8963 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34463 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34462 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1467:
-#line 8953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8965 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_RENAME_USER;
           }
-#line 34471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1468:
-#line 8960 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8972 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(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 34481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1469:
-#line 8966 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8978 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(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 34491 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1472:
-#line 8980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 8992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             SELECT_LEX *sl= lex->current_select;
@@ -34503,29 +34502,29 @@
                                                 TL_IGNORE, MDL_EXCLUSIVE)))
               MYSQL_YYABORT;
           }
-#line 34507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34506 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1473:
-#line 8995 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9007 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.reset();
           }
-#line 34515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34514 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1474:
-#line 8999 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9011 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ASSIGN_TO_KEYCACHE;
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 34525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34524 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1479:
-#line 9018 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9030 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL, 0, TL_READ,
                                                     MDL_SHARED_READ,
@@ -34533,11 +34532,11 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 34537 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34536 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1480:
-#line 9029 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9041 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, 0, TL_READ,
                                                     MDL_SHARED_READ,
@@ -34545,39 +34544,39 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 34549 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34548 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1481:
-#line 9039 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9051 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 34555 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1482:
-#line 9040 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9052 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str) = default_key_cache_base; }
-#line 34561 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1483:
-#line 9045 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9057 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_PRELOAD_KEYS;
             lex->alter_info.reset();
           }
-#line 34571 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34570 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1484:
-#line 9051 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9063 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 34577 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1489:
-#line 9066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9078 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-2].table), NULL, (yyvsp[0].num), TL_READ,
                                                     MDL_SHARED_READ,
@@ -34585,11 +34584,11 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 34589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34588 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1490:
-#line 9077 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9089 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-3].table), NULL, (yyvsp[0].num), TL_READ,
                                                     MDL_SHARED_READ,
@@ -34597,73 +34596,73 @@
                                                     pop_index_hints())))
               MYSQL_YYABORT;
           }
-#line 34601 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34600 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1491:
-#line 9088 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9100 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->alter_info.partition_flags|= ALTER_PARTITION_ADMIN;
           }
-#line 34609 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34608 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1493:
-#line 9095 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9107 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->select_lex.alloc_index_hints(thd);
             Select->set_index_hint_type(INDEX_HINT_USE, 
                                         INDEX_HINT_MASK_ALL);
           }
-#line 34619 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1495:
-#line 9104 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 34625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34624 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1497:
-#line 9110 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9122 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 34631 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34630 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1498:
-#line 9111 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_OPTION_IGNORE_LEAVES; }
-#line 34637 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1499:
-#line 9121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9133 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SELECT;
             lex->current_select->set_with_clause((yyvsp[-1].with_clause));
           }
-#line 34647 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34646 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1514:
-#line 9149 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9161 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(true);
           }
-#line 34655 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34654 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1515:
-#line 9153 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9165 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 34663 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34662 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1516:
-#line 9157 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9169 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               In order to correctly parse UNION's global ORDER BY we need to
@@ -34671,19 +34670,19 @@
             */
             Lex->current_select->set_braces(true);
           }
-#line 34675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34674 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1517:
-#line 9166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9178 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 34683 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34682 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1521:
-#line 9179 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9191 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               In order to correctly parse UNION's global ORDER BY we need to
@@ -34691,19 +34690,19 @@
             */
             Lex->current_select->set_braces(true);
           }
-#line 34695 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1522:
-#line 9187 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9199 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 34703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34702 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1526:
-#line 9200 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9212 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               In order to correctly parse UNION's global ORDER BY we need to
@@ -34711,127 +34710,127 @@
             */
             Lex->current_select->set_braces(true);
           }
-#line 34715 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1527:
-#line 9208 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9220 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
           }
-#line 34723 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34722 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1529:
-#line 9216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9228 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(true);
           }
-#line 34731 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1530:
-#line 9220 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9232 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
-#line 34740 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34739 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1531:
-#line 9225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9237 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(true);
           }
-#line 34748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34747 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1532:
-#line 9233 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9245 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->current_select->braces);
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
-#line 34757 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34756 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1533:
-#line 9237 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9249 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 34763 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1534:
-#line 9243 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9255 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 34772 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34771 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1536:
-#line 9250 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9262 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 34781 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34780 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1537:
-#line 9260 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9272 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 34790 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34789 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1539:
-#line 9267 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9279 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Parentheses carry no meaning here */
             Lex->current_select->set_braces(false);
           }
-#line 34799 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1540:
-#line 9276 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9288 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 34807 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1541:
-#line 9280 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 34815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1543:
-#line 9285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9297 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 34823 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34822 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1544:
-#line 9289 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9301 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->current_select->set_braces(false);
           }
-#line 34831 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1560:
-#line 9329 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9341 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -34839,63 +34838,63 @@
               mysql_init_select(lex);
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 34843 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1561:
-#line 9337 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9349 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 34851 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34850 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1566:
-#line 9365 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9377 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->context.table_list=
               Select->context.first_name_resolution_table=
                 Select->table_list.first;
           }
-#line 34861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1569:
-#line 9380 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9392 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((Select->options & SELECT_DISTINCT) &&
                          (Select->options & SELECT_ALL)))
               my_yyabort_error((ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT"));
           }
-#line 34871 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34870 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1570:
-#line 9389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9401 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.vers_range_unit)= VERS_UNDEFINED;
           }
-#line 34879 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1571:
-#line 9393 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.vers_range_unit)= VERS_TRX_ID;
           }
-#line 34887 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34886 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1572:
-#line 9397 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9409 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.vers_range_unit)= VERS_TIMESTAMP;
           }
-#line 34895 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34894 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1573:
-#line 9404 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9416 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item;
             if (!(item= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length, YYCSCL,
@@ -34903,75 +34902,75 @@
               MYSQL_YYABORT;
             (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, item);
           }
-#line 34907 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34906 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1574:
-#line 9412 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.vers_history_point)= Vers_history_point(VERS_TIMESTAMP, (yyvsp[0].item));
           }
-#line 34915 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34914 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1575:
-#line 9416 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9428 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.vers_history_point)= Vers_history_point((yyvsp[-1].vers_range_unit), (yyvsp[0].item));
           }
-#line 34923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34922 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1576:
-#line 9423 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9435 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= false;
           }
-#line 34931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34930 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1577:
-#line 9427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= true;
           }
-#line 34939 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34938 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1578:
-#line 9434 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_AS_OF, (yyvsp[0].vers_history_point));
           }
-#line 34947 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34946 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1579:
-#line 9438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9450 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_ALL);
           }
-#line 34955 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34954 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1580:
-#line 9442 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9454 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_FROM_TO, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
           }
-#line 34963 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34962 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1581:
-#line 9446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9458 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_BETWEEN, (yyvsp[-2].vers_history_point), (yyvsp[0].vers_history_point));
           }
-#line 34971 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1585:
-#line 9459 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9471 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* 
               Allow this flag only on the first top-level SELECT statement, if
@@ -34988,11 +34987,11 @@
             Lex->select_lex.options&= ~OPTION_TO_QUERY_CACHE;
             Lex->select_lex.sql_cache= SELECT_LEX::SQL_NO_CACHE;
           }
-#line 34992 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 34991 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1586:
-#line 9476 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9488 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* 
               Allow this flag only on the first top-level SELECT statement, if
@@ -35009,22 +35008,22 @@
             Lex->select_lex.options|= OPTION_TO_QUERY_CACHE;
             Lex->select_lex.sql_cache= SELECT_LEX::SQL_CACHE;
           }
-#line 35013 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1588:
-#line 9497 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9509 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->current_select->lock_type= TL_WRITE;
             lex->current_select->set_lock_for_tables(TL_WRITE, false);
             lex->safe_to_cache_query=0;
           }
-#line 35024 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1589:
-#line 9504 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->current_select->lock_type= TL_READ_WITH_SHARED_LOCKS;
@@ -35032,11 +35031,11 @@
               set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
             lex->safe_to_cache_query=0;
           }
-#line 35036 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1592:
-#line 9517 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9529 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root)
                           Item_field(thd, &thd->lex->current_select->context,
@@ -35047,20 +35046,20 @@
               MYSQL_YYABORT;
             (thd->lex->current_select->with_wild)++;
           }
-#line 35051 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1593:
-#line 9531 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9543 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_item_to_list(thd, (yyvsp[-1].item))))
               MYSQL_YYABORT;
           }
-#line 35060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35059 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1594:
-#line 9536 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9548 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT((yyvsp[-3].simple_string) < (yyvsp[-1].simple_string));
 
@@ -35079,132 +35078,132 @@
               (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
             }
           }
-#line 35083 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35082 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1595:
-#line 9557 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9569 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_tok_start();
           }
-#line 35091 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35090 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1596:
-#line 9563 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9575 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_tok_end();
           }
-#line 35099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1597:
-#line 9569 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_start();
           }
-#line 35107 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35106 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1598:
-#line 9575 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9587 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
           }
-#line 35115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35114 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1599:
-#line 9581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (yychar == YYEMPTY)
               (yyval.simple_string)= (char*) YYLIP->get_cpp_ptr_rtrim();
             else
               (yyval.simple_string)= (char*) YYLIP->get_cpp_tok_end_rtrim();
           }
-#line 35126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35125 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1600:
-#line 9590 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9602 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=null_clex_str;}
-#line 35132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35131 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1601:
-#line 9591 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys); }
-#line 35138 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35137 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1602:
-#line 9592 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9604 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 35144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35143 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1603:
-#line 9593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9605 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys); }
-#line 35150 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1604:
-#line 9594 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9606 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str); }
-#line 35156 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35155 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1605:
-#line 9598 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9610 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= NOT_FIXED_DEC;  }
-#line 35162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35161 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1606:
-#line 9599 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9611 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= NOT_FIXED_DEC;  }
-#line 35168 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35167 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1607:
-#line 9600 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9612 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].ulong_num); }
-#line 35174 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35173 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1608:
-#line 9604 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9616 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;  }
-#line 35180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1609:
-#line 9605 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9617 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;  }
-#line 35186 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1610:
-#line 9606 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9618 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].ulong_num); }
-#line 35192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35191 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1611:
-#line 9610 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9622 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 35198 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35197 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1612:
-#line 9611 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 35204 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35203 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1613:
-#line 9617 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9629 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               Design notes:
@@ -35255,22 +35254,22 @@
                 MYSQL_YYABORT;
             }
           }
-#line 35259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1614:
-#line 9668 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9680 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1615:
-#line 9675 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9687 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* See comments in rule expr: expr or expr */
             Item_cond_and *item1;
@@ -35313,141 +35312,141 @@
                 MYSQL_YYABORT;
             }
           }
-#line 35317 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35316 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1616:
-#line 9718 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= negate_expression(thd, (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35327 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35326 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1617:
-#line 9724 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9736 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_istrue(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35337 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35336 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1618:
-#line 9730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9742 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnottrue(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35347 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35346 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1619:
-#line 9736 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9748 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isfalse(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35357 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35356 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1620:
-#line 9742 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotfalse(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35367 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35366 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1621:
-#line 9748 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9760 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35376 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1622:
-#line 9754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9766 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1624:
-#line 9764 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9776 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnull(thd, (yyvsp[-2].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35397 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35396 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1625:
-#line 9770 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9782 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_isnotnull(thd, (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35406 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1626:
-#line 9776 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9788 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_equal(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35416 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1627:
-#line 9782 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9794 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (*(yyvsp[-1].boolfunc2creator))(0)->create(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35427 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35426 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1628:
-#line 9788 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9800 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35436 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1630:
-#line 9798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9810 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-4].item), (yyvsp[-1].select_lex));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35446 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1631:
-#line 9804 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9816 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_in_subselect(thd, (yyvsp[-5].item), (yyvsp[-1].select_lex));
             if (unlikely(item == NULL))
@@ -35456,21 +35455,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1632:
-#line 9813 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-4].item), true, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35469 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1633:
-#line 9819 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9831 "/home/buildbot/git/sql/sql_yacc_ora.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);
@@ -35478,21 +35477,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35482 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1634:
-#line 9827 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9839 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= handle_sql2003_note184_exception(thd, (yyvsp[-5].item), false, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35492 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35491 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1635:
-#line 9833 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9845 "/home/buildbot/git/sql/sql_yacc_ora.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);
@@ -35501,21 +35500,21 @@
               MYSQL_YYABORT;
             (yyval.item)= item->neg_transformer(thd);
           }
-#line 35505 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35504 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1636:
-#line 9842 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9854 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_between(thd, (yyvsp[-4].item), (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35514 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1637:
-#line 9848 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9860 "/home/buildbot/git/sql/sql_yacc_ora.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));
@@ -35523,11 +35522,11 @@
               MYSQL_YYABORT;
             (yyval.item)= item->neg_transformer(thd);
           }
-#line 35527 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35526 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1638:
-#line 9856 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9868 "/home/buildbot/git/sql/sql_yacc_ora.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));
@@ -35537,22 +35536,22 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35541 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35540 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1639:
-#line 9866 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9878 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35551 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1640:
-#line 9873 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9885 "/home/buildbot/git/sql/sql_yacc_ora.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);
@@ -35560,21 +35559,21 @@
               MYSQL_YYABORT;
             (yyval.item)= item->neg_transformer(thd);
           }
-#line 35564 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35563 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1641:
-#line 9881 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9893 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35574 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35573 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1642:
-#line 9887 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9899 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_func_regex(thd, (yyvsp[-3].item), (yyvsp[0].item));
             if (unlikely(item == NULL))
@@ -35583,350 +35582,350 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35587 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1644:
-#line 9900 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_or(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35597 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1645:
-#line 9906 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_and(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35607 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35606 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1646:
-#line 9912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_shift_left(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35617 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1647:
-#line 9918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9930 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_shift_right(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35627 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1648:
-#line 9924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9936 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_concat_operator_oracle(thd,
                                                                      (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35637 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1649:
-#line 9931 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9943 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_plus(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35648 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35647 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1650:
-#line 9937 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_minus(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35658 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35657 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1651:
-#line 9943 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9955 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35667 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1652:
-#line 9949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9961 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35678 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35677 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1653:
-#line 9956 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9968 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35687 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1654:
-#line 9962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9974 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35698 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1655:
-#line 9968 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_date_add_interval(thd, (yyvsp[0].item), (yyvsp[-3].item), (yyvsp[-2].interval), 1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35707 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1656:
-#line 9974 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9986 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_mul(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35717 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1657:
-#line 9980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35727 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1658:
-#line 9986 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 9998 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35738 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35737 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1659:
-#line 9992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10004 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_int_div(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35747 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1660:
-#line 9998 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10010 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35758 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35757 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1661:
-#line 10004 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10016 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_xor(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 35768 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1671:
-#line 10033 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10045 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_eq_creator; }
-#line 35774 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1672:
-#line 10034 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10046 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_ge_creator; }
-#line 35780 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1673:
-#line 10035 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10047 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_gt_creator; }
-#line 35786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1674:
-#line 10036 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_le_creator; }
-#line 35792 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35791 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1675:
-#line 10037 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10049 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_lt_creator; }
-#line 35798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35797 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1676:
-#line 10038 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10050 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.boolfunc2creator) = &comp_ne_creator; }
-#line 35804 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35803 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1677:
-#line 10042 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10054 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 35810 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1678:
-#line 10043 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10055 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 35816 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1679:
-#line 10048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10060 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_dyncol_type).set(DYN_COL_NULL); /* automatic type */
             Lex->charset= NULL;
 	  }
-#line 35825 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35824 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1680:
-#line 10052 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10064 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
-#line 35831 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1681:
-#line 10056 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10068 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); Lex->charset= NULL; }
-#line 35837 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1682:
-#line 10057 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10069 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); Lex->charset= NULL; }
-#line 35843 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1683:
-#line 10058 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10070 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type)= (yyvsp[0].Lex_dyncol_type); }
-#line 35849 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1684:
-#line 10062 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10074 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_INT); }
-#line 35855 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1685:
-#line 10063 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10075 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_UINT);  }
-#line 35861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1686:
-#line 10064 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10076 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE);  }
-#line 35867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35866 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1687:
-#line 10065 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10077 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
-#line 35873 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35872 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1688:
-#line 10066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10078 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DOUBLE); }
-#line 35879 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1689:
-#line 10067 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10079 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DECIMAL, (yyvsp[0].Lex_length_and_dec)); }
-#line 35885 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35884 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1690:
-#line 10071 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10083 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DATE); }
-#line 35891 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35890 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1691:
-#line 10072 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10084 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_TIME, 0, (yyvsp[0].const_simple_string)); }
-#line 35897 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35896 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1692:
-#line 10073 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10085 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_dyncol_type).set(DYN_COL_DATETIME, 0, (yyvsp[0].const_simple_string)); }
-#line 35903 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35902 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1693:
-#line 10078 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10090 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 35909 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35908 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1694:
-#line 10080 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10092 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_dyncol_type).set(DYN_COL_STRING);
           }
-#line 35917 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35916 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1695:
-#line 10084 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10096 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.Lex_dyncol_type).set(DYN_COL_STRING);
             Lex->charset= national_charset_info;
           }
-#line 35926 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35925 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1696:
-#line 10092 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10104 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
      LEX *lex= Lex;
      (yyval.dyncol_def)= (DYNCALL_CREATE_DEF *)
@@ -35946,148 +35945,148 @@
      else
        (yyval.dyncol_def)->len= 0;
    }
-#line 35950 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35949 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1697:
-#line 10114 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10127 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
          (yyval.dyncol_def_list)= new (thd->mem_root) List;
          if (unlikely((yyval.dyncol_def_list) == NULL))
            MYSQL_YYABORT;
          (yyval.dyncol_def_list)->push_back((yyvsp[0].dyncol_def), thd->mem_root);
        }
-#line 35961 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35960 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1698:
-#line 10121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10134 "/home/buildbot/git/sql/sql_yacc_ora.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 35970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35969 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1699:
-#line 10129 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10142 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ISOPEN; }
-#line 35976 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35975 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1700:
-#line 10130 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10143 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_FOUND; }
-#line 35982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1701:
-#line 10131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10144 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_NOTFOUND; }
-#line 35988 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1702:
-#line 10132 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.plsql_cursor_attr)= PLSQL_CURSOR_ATTR_ROWCOUNT; }
-#line 35994 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 35993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1703:
-#line 10137 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10150 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_plsql_cursor_attr(thd, &(yyvsp[-2].ident_sys), (yyvsp[0].plsql_cursor_attr)))))
               MYSQL_YYABORT;
           }
-#line 36003 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36002 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1704:
-#line 10145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10158 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item));         }
-#line 36009 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36008 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1705:
-#line 10146 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10159 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_LEADING, (yyvsp[-2].item), (yyvsp[0].item));  }
-#line 36015 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1706:
-#line 10147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10160 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_TRAILING, (yyvsp[-2].item), (yyvsp[0].item)); }
-#line 36021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36020 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1707:
-#line 10148 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10161 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item));     }
-#line 36027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36026 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1708:
-#line 10149 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10162 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_LEADING, (yyvsp[0].item));      }
-#line 36033 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36032 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1709:
-#line 10150 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10163 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_TRAILING, (yyvsp[0].item));     }
-#line 36039 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36038 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1710:
-#line 10151 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10164 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[0].item));         }
-#line 36045 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1711:
-#line 10152 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10165 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trim).set(TRIM_BOTH, (yyvsp[-2].item), (yyvsp[0].item));     }
-#line 36051 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1718:
-#line 10190 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10203 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item_param); }
-#line 36057 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36056 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1723:
-#line 10196 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10209 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36068 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36067 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1724:
-#line 10203 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_exists_subselect(thd, (yyvsp[-1].select_lex));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36078 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1725:
-#line 10209 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].item)->make_odbc_literal(thd, &(yyvsp[-2].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 36087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36086 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1726:
-#line 10214 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10227 "/home/buildbot/git/sql/sql_yacc_ora.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),
@@ -36097,58 +36096,58 @@
             Select->add_ftfunc_to_list(thd, i1);
             (yyval.item)= i1;
           }
-#line 36101 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36100 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1727:
-#line 10224 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10237 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item(thd, (yyvsp[-3].item), Lex->charset))))
               MYSQL_YYABORT;
           }
-#line 36110 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36109 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1728:
-#line 10229 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10242 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= new(thd->mem_root) Item_func_case_searched(thd, *(yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 36119 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36118 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1729:
-#line 10234 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10247 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-1].item_list)->push_front((yyvsp[-2].item), thd->mem_root);
             if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_case_simple(thd, *(yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 36129 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36128 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1730:
-#line 10240 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10253 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].Lex_cast_type).create_typecast_item(thd, (yyvsp[-3].item), Lex->charset))))
               MYSQL_YYABORT;
           }
-#line 36138 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36137 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1731:
-#line 10245 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10258 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_conv_charset(thd, (yyvsp[-3].item), (yyvsp[-1].charset));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36148 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36147 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1732:
-#line 10251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10264 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item_splocal *il= (yyvsp[-1].item)->get_item_splocal();
             if (unlikely(il))
@@ -36159,199 +36158,199 @@
               MYSQL_YYABORT;
             Lex->default_used= TRUE;
           }
-#line 36163 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1733:
-#line 10262 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10275 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_insert_value(thd, Lex->current_context(),
                                                         (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36174 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36173 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1734:
-#line 10269 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10282 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[0].table)))))
               MYSQL_YYABORT;
           }
-#line 36183 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36182 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1735:
-#line 10274 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10287 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_nextval(thd, (yyvsp[-1].table)))))
               MYSQL_YYABORT;
           }
-#line 36192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36191 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1736:
-#line 10279 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[0].table)))))
               MYSQL_YYABORT;
           }
-#line 36201 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36200 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1737:
-#line 10284 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10297 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_lastval(thd, (yyvsp[-1].table)))))
               MYSQL_YYABORT;
           }
-#line 36210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36209 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1738:
-#line 10289 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10302 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-3].table), (yyvsp[-1].longlong_number), 0, 1))))
               MYSQL_YYABORT;
           }
-#line 36219 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36218 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1739:
-#line 10294 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10307 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-5].table), (yyvsp[-3].longlong_number), 0, (yyvsp[-1].ulong_num)))))
               MYSQL_YYABORT;
           }
-#line 36228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1740:
-#line 10299 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10312 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_func_setval(thd, (yyvsp[-7].table), (yyvsp[-5].longlong_number), (yyvsp[-1].ulonglong_number), (yyvsp[-3].ulong_num)))))
               MYSQL_YYABORT;
           }
-#line 36237 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36236 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1743:
-#line 10308 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10321 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[-1].item); }
-#line 36243 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36242 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1745:
-#line 10314 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10327 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_set_collation(thd, (yyvsp[-2].item), (yyvsp[0].charset)))))
               MYSQL_YYABORT;
           }
-#line 36252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36251 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1747:
-#line 10323 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10336 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Type_cast_attributes at(&my_charset_bin);
             if (unlikely(!((yyval.item)= type_handler_long_blob.create_typecast_item(thd, (yyvsp[0].item), at))))
               MYSQL_YYABORT;
           }
-#line 36262 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36261 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1748:
-#line 10329 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10342 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item);
           }
-#line 36270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1749:
-#line 10333 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10346 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item)->neg(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36280 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36279 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1750:
-#line 10339 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10352 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_bit_neg(thd, (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36290 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36289 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1751:
-#line 10345 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10358 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= negate_expression(thd, (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36300 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1753:
-#line 10355 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_concat(thd, (yyvsp[-2].item), (yyvsp[0].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36309 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1754:
-#line 10364 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10377 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_datetime_typecast(thd, (yyvsp[-1].item),
                                       AUTO_SEC_PART_DIGITS);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36320 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1755:
-#line 10371 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_add_time(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1, 0);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36331 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36330 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1756:
-#line 10385 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10398 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-1].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36340 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1757:
-#line 10391 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10404 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_char(thd, *(yyvsp[-3].item_list), (yyvsp[-1].charset));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36351 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36350 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1758:
-#line 10397 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_current_user(thd,
                                       Lex->current_context());
@@ -36360,11 +36359,11 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 36364 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36363 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1759:
-#line 10406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_current_role(thd,
                                       Lex->current_context());
@@ -36373,51 +36372,51 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 36377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36376 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1760:
-#line 10415 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10428 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_date_typecast(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1761:
-#line 10421 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10434 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_dayofmonth(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36397 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36396 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1762:
-#line 10427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_hour(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36406 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1763:
-#line 10433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10446 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36416 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1764:
-#line 10439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10452 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             List *list= new (thd->mem_root) List;
             if (unlikely(list == NULL))
@@ -36432,11 +36431,11 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36436 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36435 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1765:
-#line 10454 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10467 "/home/buildbot/git/sql/sql_yacc_ora.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);
@@ -36447,61 +36446,61 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36451 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36450 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1766:
-#line 10465 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10478 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_left(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36461 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1767:
-#line 10471 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10484 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_minute(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1768:
-#line 10477 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_month(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1769:
-#line 10483 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10496 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_right(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36491 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1770:
-#line 10489 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10502 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_second(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36500 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1771:
-#line 10495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10508 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_oracle_sql_rowcount(thd);
             if (unlikely((yyval.item) == NULL))
@@ -36509,39 +36508,39 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 36513 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36512 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1772:
-#line 10503 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_time_typecast(thd, (yyvsp[-1].item),
                                       AUTO_SEC_PART_DIGITS);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36524 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1773:
-#line 10510 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10523 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item);
           }
-#line 36532 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36531 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1774:
-#line 10514 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10527 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim(thd))))
               MYSQL_YYABORT;
           }
-#line 36541 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36540 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1775:
-#line 10519 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10532 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_user(thd);
             if (unlikely((yyval.item) == NULL))
@@ -36549,222 +36548,222 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query=0;
           }
-#line 36553 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1776:
-#line 10527 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_year(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36563 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36562 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1777:
-#line 10548 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10561 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36574 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36573 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1778:
-#line 10555 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10568 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36584 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36583 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1779:
-#line 10561 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10574 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_curdate_local(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36595 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36594 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1780:
-#line 10568 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_curtime_local(thd, (yyvsp[0].num));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36606 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1781:
-#line 10575 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10588 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36615 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1782:
-#line 10581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10594 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1783:
-#line 10587 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10600 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_date_format(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36635 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1784:
-#line 10593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10606 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_date_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36646 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1785:
-#line 10599 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10612 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_decode(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36656 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36655 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1786:
-#line 10605 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10618 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-1].item_list)->push_front((yyvsp[-3].item), thd->mem_root);
             if (unlikely(!((yyval.item)= new (thd->mem_root) Item_func_decode_oracle(thd, *(yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 36666 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1787:
-#line 10611 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10624 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_extract(thd, (yyvsp[-3].interval), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36676 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1788:
-#line 10617 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_get_format(thd, (yyvsp[-3].date_time_type), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36686 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36685 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1789:
-#line 10623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_now_local(thd, (yyvsp[0].num));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36696 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1790:
-#line 10630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10643 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_locate(thd, (yyvsp[-1].item), (yyvsp[-3].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36707 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36706 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1791:
-#line 10636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10649 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36717 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1792:
-#line 10643 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10656 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36727 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1793:
-#line 10649 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10662 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 36737 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36736 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1794:
-#line 10654 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10667 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 36746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36745 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1795:
-#line 10659 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10672 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 36755 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36754 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1796:
-#line 10664 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10677 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_substr(thd, (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 36764 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36763 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1797:
-#line 10669 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10682 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               Unlike other time-related functions, SYSDATE() is
@@ -36782,113 +36781,113 @@
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1798:
-#line 10687 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10700 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36796 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36795 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1799:
-#line 10693 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10706 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36805 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1800:
-#line 10699 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10712 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= (yyvsp[-1].trim).make_item_func_trim_oracle(thd))))
               MYSQL_YYABORT;
           }
-#line 36815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1801:
-#line 10704 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10717 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_curdate_utc(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36826 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36825 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1802:
-#line 10711 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10724 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_curtime_utc(thd, (yyvsp[0].num));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36837 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1803:
-#line 10718 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10731 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_now_utc(thd, (yyvsp[0].num));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1804:
-#line 10726 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10739 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= create_func_dyncol_add(thd, (yyvsp[-3].item), *(yyvsp[-1].dyncol_def_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36858 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36857 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1805:
-#line 10733 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10746 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= create_func_dyncol_delete(thd, (yyvsp[-3].item), *(yyvsp[-1].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36868 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1806:
-#line 10740 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10753 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_dyncol_check(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36877 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1807:
-#line 10747 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10760 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= create_func_dyncol_create(thd, *(yyvsp[-1].dyncol_def_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36888 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36887 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1808:
-#line 10754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10767 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             (yyval.item)= create_func_dyncol_get(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].Lex_cast_type).type_handler(),
@@ -36897,92 +36896,92 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36901 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36900 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1809:
-#line 10771 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10784 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_ascii(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36911 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36910 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1810:
-#line 10777 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10790 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_charset(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36920 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1811:
-#line 10783 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_coalesce(thd, *(yyvsp[-1].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36930 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1812:
-#line 10789 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10802 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_collation(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36940 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1813:
-#line 10795 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10808 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_database(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
             Lex->safe_to_cache_query=0;
           }
-#line 36952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36951 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1814:
-#line 10802 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10815 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_if(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36962 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36961 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1815:
-#line 10808 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10821 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36972 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36971 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1816:
-#line 10814 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10827 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_format(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1817:
-#line 10823 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10836 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             List *list= new (thd->mem_root) List;
             if (unlikely(list == NULL))
@@ -36993,53 +36992,53 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 36997 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 36996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1818:
-#line 10834 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10847 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-3].item_list)->push_back((yyvsp[-1].item), thd->mem_root);
             (yyval.item)= new (thd->mem_root) Item_func_last_value(thd, *(yyvsp[-3].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37008 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37007 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1819:
-#line 10841 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10854 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_microsecond(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37018 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1820:
-#line 10847 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_mod(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37028 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1821:
-#line 10853 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10866 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)=  new (thd->mem_root)
               Item_func_password(thd, (yyvsp[-1].item), Item_func_password::OLD);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37039 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37038 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1822:
-#line 10860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10873 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item* i1;
             i1= new (thd->mem_root) Item_func_password(thd, (yyvsp[-1].item));
@@ -37047,50 +37046,50 @@
               MYSQL_YYABORT;
             (yyval.item)= i1;
           }
-#line 37051 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1823:
-#line 10868 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10881 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_quarter(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37061 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1824:
-#line 10874 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10887 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_repeat(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37071 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37070 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1825:
-#line 10880 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10893 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_replace(thd, (yyvsp[-5].item), (yyvsp[-3].item), (yyvsp[-1].item)))))
               MYSQL_YYABORT;
           }
-#line 37080 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37079 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1826:
-#line 10885 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10898 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_reverse(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37090 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37089 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1827:
-#line 10891 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10904 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_row_count(thd);
             if (unlikely((yyval.item) == NULL))
@@ -37098,51 +37097,51 @@
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
             Lex->safe_to_cache_query= 0;
           }
-#line 37102 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37101 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1828:
-#line 10899 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_round(thd, (yyvsp[-3].item), (yyvsp[-1].item), 1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37112 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1829:
-#line 10905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37122 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37121 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1830:
-#line 10911 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_week(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37131 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1831:
-#line 10917 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10930 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37142 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1832:
-#line 10923 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10936 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root)
                 Item_func_weight_string(thd, (yyvsp[-5].item), 0, (yyvsp[-2].ulong_num),
@@ -37150,11 +37149,11 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37153 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1833:
-#line 10931 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_char_typecast(thd, (yyvsp[-4].item), (yyvsp[-1].ulong_num),
                                                                &my_charset_bin);
@@ -37166,22 +37165,22 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37170 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1834:
-#line 10943 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10956 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1835:
-#line 10950 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10963 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_SPATIAL
             (yyval.item)= (yyvsp[0].item);
@@ -37193,104 +37192,104 @@
                               sym_group_geom.needed_define));
 #endif
           }
-#line 37197 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37196 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1836:
-#line 10965 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10978 "/home/buildbot/git/sql/sql_yacc_ora.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 37207 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37206 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1837:
-#line 10971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10984 "/home/buildbot/git/sql/sql_yacc_ora.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 37218 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37217 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1838:
-#line 10978 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10991 "/home/buildbot/git/sql/sql_yacc_ora.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 37229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1839:
-#line 10985 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 10998 "/home/buildbot/git/sql/sql_yacc_ora.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 37240 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1840:
-#line 10992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11005 "/home/buildbot/git/sql/sql_yacc_ora.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 37251 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37250 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1841:
-#line 10999 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11012 "/home/buildbot/git/sql/sql_yacc_ora.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 37262 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37261 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1842:
-#line 11006 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11019 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= GEOM_NEW(thd, Item_func_point(thd, (yyvsp[-3].item), (yyvsp[-1].item)));
           }
-#line 37270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1843:
-#line 11010 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11023 "/home/buildbot/git/sql/sql_yacc_ora.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 37281 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37280 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1844:
-#line 11017 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11030 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= GEOM_NEW(thd, Item_func_spatial_precise_rel(thd, (yyvsp[-3].item), (yyvsp[-1].item),
                                                     Item_func::SP_WITHIN_FUNC));
           }
-#line 37290 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37289 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1845:
-#line 11034 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11047 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 #ifdef HAVE_DLOPEN
             udf_func *udf= 0;
@@ -37309,11 +37308,11 @@
             (yyval.udf)= udf;
 #endif
           }
-#line 37313 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37312 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1846:
-#line 11053 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Create_func *builder;
             Item *item= NULL;
@@ -37362,88 +37361,88 @@
             if (unlikely(! ((yyval.item)= item)))
               MYSQL_YYABORT;
           }
-#line 37366 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37365 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1847:
-#line 11102 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11115 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_func_call_generic(thd, &(yyvsp[-5].ident_cli), &(yyvsp[-3].ident_cli), (yyvsp[-1].item_list)))))
               MYSQL_YYABORT;
           }
-#line 37375 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37374 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1848:
-#line 11110 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (yyvsp[-1].num) | (yyvsp[0].num); }
-#line 37381 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37380 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1849:
-#line 11112 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11125 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_BOOL; }
-#line 37387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1850:
-#line 11116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11129 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_NL; }
-#line 37393 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1851:
-#line 11117 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11130 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_NL; }
-#line 37399 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1852:
-#line 11121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0;         }
-#line 37405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37404 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1853:
-#line 11122 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11135 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= FT_EXPAND; }
-#line 37411 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37410 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1854:
-#line 11126 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11139 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item_list)= NULL; }
-#line 37417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37416 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1855:
-#line 11127 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[0].item_list); }
-#line 37423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37422 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1856:
-#line 11132 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL))
               MYSQL_YYABORT;
             (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root);
           }
-#line 37434 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37433 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1857:
-#line 11139 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11152 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
             (yyval.item_list)= (yyvsp[-2].item_list);
           }
-#line 37443 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37442 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1858:
-#line 11147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11160 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
              Use Item::name as a storage for the attribute value of user
@@ -37467,61 +37466,61 @@
               (yyvsp[-2].item)->set_name(thd, (yyvsp[-3].simple_string), (uint) ((yyvsp[-1].simple_string) - (yyvsp[-3].simple_string)), thd->charset());
             (yyval.item)= (yyvsp[-2].item);
           }
-#line 37471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1859:
-#line 11174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11187 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), FALSE);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1860:
-#line 11180 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11193 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_avg(thd, (yyvsp[-1].item), TRUE);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37491 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1861:
-#line 11186 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11199 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_and(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37500 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1862:
-#line 11192 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11205 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_or(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37511 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37510 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1863:
-#line 11198 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11211 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_xor(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37521 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37520 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1864:
-#line 11204 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11217 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *item= new (thd->mem_root) Item_int(thd, (int32) 0L, 1);
             if (unlikely(item == NULL))
@@ -37530,149 +37529,149 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37534 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37533 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1865:
-#line 11213 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11226 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_count(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37544 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37543 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1866:
-#line 11219 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11232 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->in_sum_expr++; }
-#line 37550 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37549 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1867:
-#line 11221 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11234 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->in_sum_expr--; }
-#line 37556 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37555 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1868:
-#line 11223 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11236 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_count(thd, *(yyvsp[-2].item_list));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37566 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37565 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1869:
-#line 11229 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11242 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37575 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1870:
-#line 11240 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11253 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_min(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37585 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1871:
-#line 11246 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11259 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37595 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1872:
-#line 11252 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11265 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_max(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37606 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1873:
-#line 11258 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11271 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 0);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37615 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1874:
-#line 11264 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11277 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 0);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1875:
-#line 11270 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11283 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_std(thd, (yyvsp[-1].item), 1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37635 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1876:
-#line 11276 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11289 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_variance(thd, (yyvsp[-1].item), 1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37646 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1877:
-#line 11282 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11295 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), FALSE);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37656 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37655 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1878:
-#line 11288 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11301 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_sum(thd, (yyvsp[-1].item), TRUE);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37666 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1879:
-#line 11294 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11307 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->in_sum_expr++; }
-#line 37672 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37671 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1880:
-#line 11298 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11311 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             sel->in_sum_expr--;
@@ -37690,11 +37689,11 @@
             (yyvsp[-4].item_list)->empty();
             sel->gorder_list.empty();
           }
-#line 37694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1881:
-#line 11319 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11332 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_window_func(thd, (Item_sum *) (yyvsp[-2].item), (yyvsp[0].lex_str_ptr));
             if (unlikely((yyval.item) == NULL))
@@ -37702,11 +37701,11 @@
             if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
               MYSQL_YYABORT;
           }
-#line 37706 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37705 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1882:
-#line 11328 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11341 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(Select->add_window_spec(thd, lex->win_ref,
@@ -37721,109 +37720,109 @@
             if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
               MYSQL_YYABORT;
           }
-#line 37725 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1884:
-#line 11348 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11361 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             ((Item_sum *) (yyvsp[0].item))->mark_as_window_func_sum_expr();
           }
-#line 37733 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1885:
-#line 11355 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_row_number(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37743 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1886:
-#line 11362 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11375 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_rank(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37753 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37752 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1887:
-#line 11369 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11382 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_dense_rank(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37763 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1888:
-#line 11376 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_percent_rank(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37772 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1889:
-#line 11383 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11396 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_cume_dist(thd);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37783 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37782 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1890:
-#line 11390 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11403 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_ntile(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37793 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37792 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1891:
-#line 11397 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_first_value(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37803 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37802 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1892:
-#line 11404 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11417 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_last_value(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37813 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37812 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1893:
-#line 11411 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_nth_value(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37823 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37822 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1894:
-#line 11418 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* No second argument defaults to 1. */
             Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
@@ -37833,21 +37832,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37837 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1895:
-#line 11429 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11442 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_lead(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37846 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1896:
-#line 11436 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11449 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* No second argument defaults to 1. */
             Item* item_offset= new (thd->mem_root) Item_uint(thd, 1);
@@ -37857,21 +37856,21 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37861 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1897:
-#line 11447 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_lag(thd, (yyvsp[-3].item), (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37871 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37870 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1898:
-#line 11459 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11472 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(Select->add_window_spec(thd, lex->win_ref,
@@ -37886,25 +37885,25 @@
             if (unlikely(Select->add_window_func((Item_window_func *) (yyval.item))))
               MYSQL_YYABORT;
           }
-#line 37890 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37889 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1899:
-#line 11477 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->prepare_add_window_spec(thd); }
-#line 37896 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37895 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1900:
-#line 11479 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11492 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              (yyval.item)= (yyvsp[-6].item);
            }
-#line 37904 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37903 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1901:
-#line 11483 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11496 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *args= new (thd->mem_root) Item_decimal(thd, "0.5", 3,
                                                    thd->charset());
@@ -37918,67 +37917,67 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37922 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1902:
-#line 11500 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11513 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_percentile_cont(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37932 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1903:
-#line 11506 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11519 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_sum_percentile_disc(thd, (yyvsp[-1].item));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 37942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1904:
-#line 11515 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11528 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
           }
-#line 37951 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37950 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1905:
-#line 11524 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11537 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
             if (unlikely((yyval.lex_str_ptr) == NULL))
               MYSQL_YYABORT;
           }
-#line 37961 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37960 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1906:
-#line 11533 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11546 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(! Lex->parsing_options.allows_variable))
               my_yyabort_error((ER_VIEW_SELECT_VARIABLE, MYF(0)));
           }
-#line 37970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37969 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1907:
-#line 11538 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11551 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= (yyvsp[0].item);
           }
-#line 37978 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37977 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1908:
-#line 11545 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11558 "/home/buildbot/git/sql/sql_yacc_ora.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));
@@ -37988,11 +37987,11 @@
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
             lex->set_var_list.push_back(item, thd->mem_root);
           }
-#line 37992 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 37991 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1909:
-#line 11555 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11568 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_func_get_user_var(thd, &(yyvsp[0].lex_str));
             if (unlikely((yyval.item) == NULL))
@@ -38000,134 +37999,134 @@
             LEX *lex= Lex;
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
           }
-#line 38004 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38003 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1910:
-#line 11563 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11576 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-1].var_type), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 38013 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1911:
-#line 11568 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_sysvar(thd, (yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 38022 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1912:
-#line 11575 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11588 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38028 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1913:
-#line 11576 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11589 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 38034 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38033 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1914:
-#line 11581 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11594 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.string)= new (thd->mem_root) String(",", 1, &my_charset_latin1);
             if (unlikely((yyval.string) == NULL))
               MYSQL_YYABORT;
           }
-#line 38044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38043 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1915:
-#line 11586 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11599 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.string) = (yyvsp[0].string); }
-#line 38050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38049 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1918:
-#line 11596 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11609 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 38059 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38058 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1919:
-#line 11601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11614 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_gorder_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 38068 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38067 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1920:
-#line 11608 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11621 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38074 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38073 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1921:
-#line 11609 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11622 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 38080 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38079 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1922:
-#line 11613 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11626 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 38086 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38085 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1923:
-#line 11618 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11631 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
-#line 38094 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38093 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1924:
-#line 11625 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11638 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             sel->select_limit= (yyvsp[0].item);
             sel->offset_limit= 0;
             sel->explicit_limit= 1;
           }
-#line 38105 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38104 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1925:
-#line 11632 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11645 "/home/buildbot/git/sql/sql_yacc_ora.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 38116 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1926:
-#line 11639 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11652 "/home/buildbot/git/sql/sql_yacc_ora.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 38127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1927:
-#line 11651 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11664 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->current_select->inc_in_sum_expr()))
@@ -38136,213 +38135,213 @@
               MYSQL_YYABORT;
             }
           }
-#line 38140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1928:
-#line 11660 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11673 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->in_sum_expr--;
             (yyval.item)= (yyvsp[0].item);
           }
-#line 38149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38148 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1929:
-#line 11668 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11681 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].const_simple_string)); Lex->charset= &my_charset_bin; }
-#line 38155 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1930:
-#line 11670 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11683 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 38161 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38160 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1931:
-#line 11672 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11685 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
-#line 38167 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38166 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1932:
-#line 11674 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11687 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 38173 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38172 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1933:
-#line 11676 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11689 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
-#line 38179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38178 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1934:
-#line 11678 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11691 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->charset= thd->variables.collation_connection; }
-#line 38185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38184 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1935:
-#line 11680 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11693 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[-2].const_simple_string)); }
-#line 38191 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38190 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1936:
-#line 11682 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->charset= national_charset_info;
             (yyval.Lex_cast_type).set(&type_handler_long_blob, (yyvsp[0].const_simple_string), 0);
           }
-#line 38200 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1937:
-#line 11686 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11699 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); Lex->charset= NULL; }
-#line 38206 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1938:
-#line 11687 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11700 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type)= (yyvsp[0].Lex_cast_type); Lex->charset= NULL; }
-#line 38212 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38211 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1939:
-#line 11691 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11704 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_longlong); }
-#line 38218 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38217 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1940:
-#line 11692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_longlong); }
-#line 38224 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38223 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1941:
-#line 11693 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11706 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_longlong); }
-#line 38230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1942:
-#line 11694 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11707 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
-#line 38236 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38235 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1943:
-#line 11695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11708 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_ulonglong); }
-#line 38242 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1944:
-#line 11696 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11709 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_newdecimal, (yyvsp[0].Lex_length_and_dec)); }
-#line 38248 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38247 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1945:
-#line 11697 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11710 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_float); }
-#line 38254 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38253 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1946:
-#line 11698 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11711 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_double, (yyvsp[0].Lex_length_and_dec));  }
-#line 38260 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1947:
-#line 11702 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11715 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_newdate); }
-#line 38266 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38265 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1948:
-#line 11703 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11716 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_time2, 0, (yyvsp[0].const_simple_string)); }
-#line 38272 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38271 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1949:
-#line 11704 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11717 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.Lex_cast_type).set(&type_handler_datetime2, 0, (yyvsp[0].const_simple_string)); }
-#line 38278 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38277 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1950:
-#line 11708 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11721 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item_list)= NULL; }
-#line 38284 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38283 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1951:
-#line 11709 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11722 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[0].item_list);}
-#line 38290 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38289 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1952:
-#line 11714 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11727 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL) ||
                 unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38301 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38300 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1953:
-#line 11721 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11734 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
             (yyval.item_list)= (yyvsp[-2].item_list);
           }
-#line 38310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38309 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1954:
-#line 11728 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11741 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[0].item_list); }
-#line 38316 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38315 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1955:
-#line 11729 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11742 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item_list)= (yyvsp[-1].item_list); }
-#line 38322 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1956:
-#line 11734 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11747 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL) ||
                 unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38333 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1957:
-#line 11741 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root);
             (yyval.item_list)= (yyvsp[-2].item_list);
           }
-#line 38342 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1958:
-#line 11749 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11762 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL))
@@ -38351,32 +38350,32 @@
                          (yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38355 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38354 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1959:
-#line 11758 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11771 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-4].item_list)->push_back((yyvsp[-2].item), thd->mem_root) ||
                          (yyvsp[-4].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.item_list)= (yyvsp[-4].item_list);
           }
-#line 38366 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38365 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1961:
-#line 11769 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11782 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-2].item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
             (yyval.item_list)= (yyvsp[-2].item_list);
           }
-#line 38376 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38375 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1962:
-#line 11778 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11791 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= new (thd->mem_root) List;
             if (unlikely((yyval.item_list) == NULL) ||
@@ -38385,27 +38384,27 @@
               MYSQL_YYABORT;
 
           }
-#line 38389 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38388 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1963:
-#line 11787 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11800 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item_list)= (yyvsp[-2].item_list);
             if (unlikely((yyval.item_list)->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 38399 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1964:
-#line 11798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table_list)= (yyvsp[0].table_list); }
-#line 38405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38404 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1965:
-#line 11800 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11813 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!((yyval.table_list)= lex->current_select->nest_last_join(thd))))
@@ -38414,54 +38413,54 @@
               MYSQL_YYABORT;
             }
           }
-#line 38418 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1966:
-#line 11811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11824 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { MYSQL_YYABORT_UNLESS((yyval.table_list)=(yyvsp[0].table_list)); }
-#line 38424 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1967:
-#line 11822 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11835 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table_list)=(yyvsp[0].table_list); }
-#line 38430 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38429 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1968:
-#line 11823 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11836 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table_list)=(yyvsp[-1].table_list); }
-#line 38436 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38435 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1969:
-#line 11829 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11842 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table_list)=(yyvsp[0].table_list); }
-#line 38442 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38441 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1970:
-#line 11831 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11844 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
           }
-#line 38450 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38449 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1971:
-#line 11849 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11862 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-2].table_list) && ((yyval.table_list)=(yyvsp[0].table_list)));
 
             if (unlikely(Select->add_cross_joined_table((yyvsp[-2].table_list), (yyvsp[0].table_list), (yyvsp[-1].num))))
               MYSQL_YYABORT;
           }
-#line 38461 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1972:
-#line 11857 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11870 "/home/buildbot/git/sql/sql_yacc_ora.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. */
@@ -38469,50 +38468,50 @@
               MYSQL_YYABORT;
             Select->parsing_place= IN_ON;
           }
-#line 38473 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38472 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1973:
-#line 11865 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11878 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 	    (yyvsp[-3].table_list)->straight=(yyvsp[-4].num);
             add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
             (yyvsp[-3].table_list)->on_context= Lex->pop_context();
             Select->parsing_place= NO_MATTER;
           }
-#line 38484 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38483 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1974:
-#line 11873 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11886 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-3].table_list) && (yyvsp[-1].table_list));
           }
-#line 38492 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38491 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1975:
-#line 11877 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11890 "/home/buildbot/git/sql/sql_yacc_ora.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 38502 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1976:
-#line 11883 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11896 "/home/buildbot/git/sql/sql_yacc_ora.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 38512 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38511 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1977:
-#line 11892 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11905 "/home/buildbot/git/sql/sql_yacc_ora.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. */
@@ -38520,11 +38519,11 @@
               MYSQL_YYABORT;
             Select->parsing_place= IN_ON;
           }
-#line 38524 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1978:
-#line 11900 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11913 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             add_join_on(thd, (yyvsp[-3].table_list), (yyvsp[0].item));
             (yyvsp[-3].table_list)->on_context= Lex->pop_context();
@@ -38532,40 +38531,40 @@
             (yyval.table_list)=(yyvsp[-3].table_list);
             Select->parsing_place= NO_MATTER;
           }
-#line 38536 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38535 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1979:
-#line 11908 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11921 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
           }
-#line 38544 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38543 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1980:
-#line 11912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11925 "/home/buildbot/git/sql/sql_yacc_ora.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 38554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38553 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1981:
-#line 11918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11931 "/home/buildbot/git/sql/sql_yacc_ora.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 38565 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38564 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1982:
-#line 11928 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11941 "/home/buildbot/git/sql/sql_yacc_ora.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. */
@@ -38573,11 +38572,11 @@
               MYSQL_YYABORT;
             Select->parsing_place= IN_ON;
           }
-#line 38577 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1983:
-#line 11936 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
@@ -38586,30 +38585,30 @@
             (yyvsp[-7].table_list)->on_context= Lex->pop_context();
             Select->parsing_place= NO_MATTER;
           }
-#line 38590 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1984:
-#line 11945 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11958 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-4].table_list) && (yyvsp[0].table_list));
           }
-#line 38598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38597 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1985:
-#line 11949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!((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 38609 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38608 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1986:
-#line 11956 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11969 "/home/buildbot/git/sql/sql_yacc_ora.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);
@@ -38617,65 +38616,65 @@
             if (unlikely(!((yyval.table_list)= lex->current_select->convert_right_join())))
               MYSQL_YYABORT;
           }
-#line 38621 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38620 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1987:
-#line 11967 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38627 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1988:
-#line 11968 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11981 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38633 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38632 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1989:
-#line 11969 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11982 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 1; }
-#line 38639 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1990:
-#line 11973 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11986 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = (yyvsp[0].num); }
-#line 38645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38644 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1991:
-#line 11974 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11987 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) = 0; }
-#line 38651 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38650 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1992:
-#line 11982 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 11995 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.string_list)= 0;}
-#line 38657 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38656 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1994:
-#line 11988 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.string_list)= (yyvsp[-2].string_list);
           }
-#line 38665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38664 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1997:
-#line 12007 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12020 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Select);
             SELECT_LEX *sel= Select;
             sel->table_join_options= 0;
           }
-#line 38675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38674 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1998:
-#line 12013 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12026 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.table_list)= Select->add_table_to_list(thd, (yyvsp[-4].table), (yyvsp[-1].lex_str_ptr),
                                                          Select->get_table_join_options(),
@@ -38689,11 +38688,11 @@
             if ((yyvsp[-2].num))
               (yyval.table_list)->vers_conditions= Lex->vers_conditions;
           }
-#line 38693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38692 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 1999:
-#line 12048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12061 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Use $2 instead of Lex->current_select as derived table will
                alter value of Lex->current_select. */
@@ -38758,11 +38757,11 @@
               (yyval.table_list)->vers_conditions= Lex->vers_conditions;
             }
           }
-#line 38762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38761 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2000:
-#line 12116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12129 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             SELECT_LEX *sel= (yyvsp[-7].select_lex);
@@ -38781,11 +38780,11 @@
             if ((yyvsp[-1].num))
               (yyval.table_list)->vers_conditions= Lex->vers_conditions;
           }
-#line 38785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38784 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2002:
-#line 12158 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12171 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-1].table_list)))
             {
@@ -38793,11 +38792,11 @@
               MYSQL_YYABORT;
             }
           }
-#line 38797 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38796 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2003:
-#line 12166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12179 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[-1].table_list)))
             {
@@ -38805,37 +38804,37 @@
               MYSQL_YYABORT;
             }
           }
-#line 38809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38808 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2008:
-#line 12180 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12193 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->pop_context(); }
-#line 38815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2009:
-#line 12181 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12194 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->pop_context(); }
-#line 38821 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38820 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2010:
-#line 12182 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12195 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->pop_context(); }
-#line 38827 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38826 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2013:
-#line 12193 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12206 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->set_braces(0);
           }
-#line 38835 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38834 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2014:
-#line 12200 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12213 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -38843,19 +38842,19 @@
               mysql_init_select(lex);
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 38847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38846 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2015:
-#line 12208 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12221 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 38855 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2016:
-#line 12216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12229 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             /* for normal joins, $2 != NULL and end_nested_join() != NULL,
@@ -38869,51 +38868,51 @@
               MYSQL_YYABORT;
             }
           }
-#line 38873 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38872 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2017:
-#line 12232 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12245 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table_list)= (yyvsp[0].table_list); }
-#line 38879 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38878 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2018:
-#line 12233 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12246 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.table_list)= (yyvsp[0].table_list); }
-#line 38885 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38884 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2019:
-#line 12242 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12255 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if ((yyvsp[-1].num))
               Select->set_braces(1);
             (yyval.table_list)= NULL;
           }
-#line 38895 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38894 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2020:
-#line 12251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12264 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->tvc_start();
           }
-#line 38903 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38902 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2021:
-#line 12255 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12268 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (Lex->tvc_finalize_derived())
               MYSQL_YYABORT;
             (yyval.table_list)= NULL;
           }
-#line 38913 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38912 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2022:
-#line 12264 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12277 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->derived_tables|= DERIVED_SUBQUERY;
@@ -38930,35 +38929,35 @@
             lex->current_select->linkage= DERIVED_TABLE_TYPE;
             lex->current_select->parsing_place= SELECT_LIST;
           }
-#line 38934 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38933 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2023:
-#line 12281 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12294 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 38942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2025:
-#line 12288 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12301 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= Select; }
-#line 38948 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38947 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2026:
-#line 12293 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12306 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely((yyvsp[0].select_lex)->init_nested_join(lex->thd)))
               MYSQL_YYABORT;
           }
-#line 38958 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38957 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2027:
-#line 12301 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12314 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -38967,113 +38966,113 @@
                 !embedding->nested_join->join_list.elements;
             /* return true if we are deeply nested */
           }
-#line 38971 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2028:
-#line 12312 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12325 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 38977 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38976 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2029:
-#line 12313 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12326 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 38983 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2030:
-#line 12318 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12331 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= thd->variables.old_mode ?  INDEX_HINT_MASK_JOIN : INDEX_HINT_MASK_ALL; 
           }
-#line 38991 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38990 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2031:
-#line 12321 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12334 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= INDEX_HINT_MASK_JOIN;  }
-#line 38997 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 38996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2032:
-#line 12322 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12335 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= INDEX_HINT_MASK_ORDER; }
-#line 39003 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39002 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2033:
-#line 12323 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12336 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= INDEX_HINT_MASK_GROUP; }
-#line 39009 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39008 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2034:
-#line 12327 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12340 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.index_hint)= INDEX_HINT_FORCE; }
-#line 39015 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2035:
-#line 12328 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12341 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.index_hint)= INDEX_HINT_IGNORE; }
-#line 39021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39020 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2036:
-#line 12333 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12346 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->set_index_hint_type((yyvsp[-2].index_hint), (yyvsp[0].num));
           }
-#line 39029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39028 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2038:
-#line 12338 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12351 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->set_index_hint_type(INDEX_HINT_USE, (yyvsp[0].num));
           }
-#line 39037 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39036 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2043:
-#line 12351 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12364 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->alloc_index_hints(thd); }
-#line 39043 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2045:
-#line 12355 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {  Select->clear_index_hints(); }
-#line 39049 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2047:
-#line 12360 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12373 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->add_index_hint(thd, NULL, 0); }
-#line 39055 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2048:
-#line 12361 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12374 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39061 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2049:
-#line 12366 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12379 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->add_index_hint(thd, (yyvsp[0].ident_sys).str, (yyvsp[0].ident_sys).length); }
-#line 39067 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39066 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2050:
-#line 12368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12381 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->add_index_hint(thd, "PRIMARY", 7); }
-#line 39073 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39072 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2053:
-#line 12378 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12391 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.string_list)= new (thd->mem_root) List)))
               MYSQL_YYABORT;
@@ -39084,11 +39083,11 @@
               MYSQL_YYABORT;
             (yyval.string_list)->push_back(s, thd->mem_root);
           }
-#line 39088 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2054:
-#line 12389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12402 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             String *s= new (thd->mem_root) String((const char *) (yyvsp[0].ident_sys).str,
                                                     (yyvsp[0].ident_sys).length,
@@ -39099,191 +39098,191 @@
               MYSQL_YYABORT;
             (yyval.string_list)= (yyvsp[-2].string_list);
           }
-#line 39103 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39102 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2055:
-#line 12402 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12415 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39109 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2056:
-#line 12403 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12416 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_HOUR; }
-#line 39115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39114 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2057:
-#line 12404 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12417 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_MICROSECOND; }
-#line 39121 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39120 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2058:
-#line 12405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12418 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_MINUTE; }
-#line 39127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2059:
-#line 12406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_DAY_SECOND; }
-#line 39133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2060:
-#line 12407 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_HOUR_MICROSECOND; }
-#line 39139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39138 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2061:
-#line 12408 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12421 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_HOUR_MINUTE; }
-#line 39145 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2062:
-#line 12409 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12422 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_HOUR_SECOND; }
-#line 39151 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39150 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2063:
-#line 12410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12423 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_MINUTE_MICROSECOND; }
-#line 39157 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39156 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2064:
-#line 12411 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_MINUTE_SECOND; }
-#line 39163 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2065:
-#line 12412 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12425 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_SECOND_MICROSECOND; }
-#line 39169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39168 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2066:
-#line 12413 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12426 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval)=INTERVAL_YEAR_MONTH; }
-#line 39175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39174 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2067:
-#line 12417 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12430 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_DAY; }
-#line 39181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2068:
-#line 12418 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_WEEK; }
-#line 39187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39186 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2069:
-#line 12419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_HOUR; }
-#line 39193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2070:
-#line 12420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_MINUTE; }
-#line 39199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39198 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2071:
-#line 12421 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12434 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_MONTH; }
-#line 39205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39204 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2072:
-#line 12422 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12435 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_QUARTER; }
-#line 39211 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2073:
-#line 12423 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12436 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_SECOND; }
-#line 39217 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39216 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2074:
-#line 12424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12437 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_MICROSECOND; }
-#line 39223 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39222 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2075:
-#line 12425 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.interval_time_st)=INTERVAL_YEAR; }
-#line 39229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2076:
-#line 12429 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12442 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATE;}
-#line 39235 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39234 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2077:
-#line 12430 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12443 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_TIME;}
-#line 39241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39240 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2078:
-#line 12431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12444 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
-#line 39247 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2079:
-#line 12432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12445 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.date_time_type)=MYSQL_TIMESTAMP_DATETIME;}
-#line 39253 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2083:
-#line 12442 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12455 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str_ptr)=0; }
-#line 39259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2084:
-#line 12444 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12457 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str_ptr)= (LEX_CSTRING*) thd->memdup(&(yyvsp[0].ident_sys),sizeof(LEX_STRING));
             if (unlikely((yyval.lex_str_ptr) == NULL))
               MYSQL_YYABORT;
           }
-#line 39269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39268 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2087:
-#line 12457 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12470 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->where= 0; }
-#line 39275 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39274 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2088:
-#line 12459 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12472 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= IN_WHERE;
           }
-#line 39283 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39282 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2089:
-#line 12463 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12476 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *select= Select;
             select->where= normalize_cond(thd, (yyvsp[0].item));
@@ -39291,19 +39290,19 @@
             if ((yyvsp[0].item))
               (yyvsp[0].item)->top_level_item();
           }
-#line 39295 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2091:
-#line 12475 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12488 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= IN_HAVING;
           }
-#line 39303 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39302 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2092:
-#line 12479 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12492 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             sel->having= normalize_cond(thd, (yyvsp[0].item));
@@ -39311,20 +39310,20 @@
             if ((yyvsp[0].item))
               (yyvsp[0].item)->top_level_item();
           }
-#line 39315 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39314 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2093:
-#line 12490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12503 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->escape_used= TRUE;
             (yyval.item)= (yyvsp[0].item);
           }
-#line 39324 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39323 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2094:
-#line 12495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12508 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->escape_used= FALSE;
             (yyval.item)= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ?
@@ -39333,35 +39332,35 @@
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 39337 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39336 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2097:
-#line 12516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12529 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
                MYSQL_YYABORT;
            }
-#line 39346 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39345 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2098:
-#line 12521 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12534 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_group_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 39355 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39354 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2099:
-#line 12528 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12541 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39361 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39360 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2100:
-#line 12530 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12543 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
@@ -39378,11 +39377,11 @@
 
             my_yyabort_error((ER_NOT_SUPPORTED_YET, MYF(0), "CUBE"));
           }
-#line 39382 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39381 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2101:
-#line 12547 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12560 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               'WITH ROLLUP' is needed for backward compatibility,
@@ -39397,23 +39396,23 @@
                                 "global union parameters"));
             lex->current_select->olap= ROLLUP_TYPE;
           }
-#line 39401 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39400 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2102:
-#line 12569 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39406 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2103:
-#line 12572 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12585 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39413 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39412 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2106:
-#line 12582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12595 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             LEX *lex= Lex;
             if (unlikely(Select->add_window_def(thd, (yyvsp[-2].lex_str_ptr), lex->win_ref,
@@ -39422,51 +39421,51 @@
                                                 lex->win_frame)))
               MYSQL_YYABORT;
           }
-#line 39426 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39425 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2107:
-#line 12594 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12607 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->prepare_add_window_spec(thd); }
-#line 39432 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39431 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2109:
-#line 12601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12614 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39438 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2110:
-#line 12603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12616 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             thd->lex->win_ref= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
             if (unlikely(thd->lex->win_ref == NULL))
               MYSQL_YYABORT;
           }
-#line 39448 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2111:
-#line 12610 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12624 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 39454 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39453 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2113:
-#line 12615 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12629 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 39460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2115:
-#line 12620 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12634 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39466 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2116:
-#line 12622 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->win_frame=
@@ -39477,23 +39476,23 @@
             if (unlikely(lex->win_frame == NULL))
               MYSQL_YYABORT;
           }
-#line 39481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2117:
-#line 12635 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12649 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_units)= Window_frame::UNITS_ROWS; }
-#line 39487 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39486 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2118:
-#line 12636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12650 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_units)= Window_frame::UNITS_RANGE; }
-#line 39493 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39492 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2119:
-#line 12641 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12655 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->frame_top_bound= (yyvsp[0].window_frame_bound);
@@ -39503,128 +39502,128 @@
             if (unlikely(lex->frame_bottom_bound == NULL))
               MYSQL_YYABORT;
           }
-#line 39507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39506 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2120:
-#line 12651 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12665 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->frame_top_bound= (yyvsp[-2].window_frame_bound);
             lex->frame_bottom_bound= (yyvsp[0].window_frame_bound);
           }
-#line 39517 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39516 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2121:
-#line 12660 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12674 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root) 
                   Window_frame_bound(Window_frame_bound::PRECEDING, NULL); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 39528 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39527 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2122:
-#line 12667 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12681 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::CURRENT, NULL); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 39539 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39538 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2123:
-#line 12674 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12688 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::PRECEDING, (yyvsp[-1].item)); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 39550 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39549 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2124:
-#line 12683 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12697 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.window_frame_bound)= (yyvsp[0].window_frame_bound); }
-#line 39556 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39555 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2125:
-#line 12685 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12699 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::FOLLOWING, NULL); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 39567 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39566 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2126:
-#line 12692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12706 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.window_frame_bound)= new (thd->mem_root)
                   Window_frame_bound(Window_frame_bound::FOLLOWING, (yyvsp[-1].item)); 
             if (unlikely((yyval.window_frame_bound) == NULL))
               MYSQL_YYABORT;
           }
-#line 39578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39577 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2127:
-#line 12701 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12715 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
-#line 39584 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39583 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2128:
-#line 12703 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12717 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_CURRENT_ROW; }
-#line 39590 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2129:
-#line 12705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_GROUP; }
-#line 39596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39595 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2130:
-#line 12707 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12721 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_TIES; }
-#line 39602 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39601 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2131:
-#line 12709 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12723 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
-#line 39608 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39607 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2132:
-#line 12711 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12725 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.frame_exclusion)= Window_frame::EXCL_NONE; }
-#line 39614 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39613 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2136:
-#line 12729 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12743 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             bool ascending= ((yyvsp[0].num) == 1) ? true : false;
             if (unlikely(add_order_to_list(thd, (yyvsp[-1].item), ascending)))
               MYSQL_YYABORT;
           }
-#line 39624 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39623 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2139:
-#line 12747 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12761 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             SELECT_LEX *sel= lex->current_select;
@@ -39667,67 +39666,67 @@
                lex->current_select= sel->master_unit()->fake_select_lex;
              }
           }
-#line 39671 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2140:
-#line 12790 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12804 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 
           }
-#line 39679 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39678 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2141:
-#line 12797 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
                MYSQL_YYABORT;
            }
-#line 39688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39687 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2142:
-#line 12802 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12816 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_order_to_list(thd, (yyvsp[-1].item),(bool) (yyvsp[0].num))))
               MYSQL_YYABORT;
            }
-#line 39697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39696 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2143:
-#line 12809 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12823 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) =  1; }
-#line 39703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39702 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2144:
-#line 12810 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12824 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) =1; }
-#line 39709 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2145:
-#line 12811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num) =0; }
-#line 39715 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2146:
-#line 12815 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12829 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39721 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39720 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2147:
-#line 12816 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12830 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 39727 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39726 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2148:
-#line 12821 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12835 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             if (sel->master_unit()->is_unit_op() && !sel->braces)
@@ -39737,366 +39736,366 @@
               DBUG_ASSERT(Select);
             }
           }
-#line 39741 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39740 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2149:
-#line 12834 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12848 "/home/buildbot/git/sql/sql_yacc_ora.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 39752 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39751 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2150:
-#line 12842 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12856 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
-#line 39760 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39759 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2151:
-#line 12846 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
           }
-#line 39768 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2152:
-#line 12853 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12867 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *sel= Select;
             sel->select_limit= (yyvsp[0].item);
             sel->offset_limit= 0;
             sel->explicit_limit= 1;
           }
-#line 39779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39778 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2153:
-#line 12860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12874 "/home/buildbot/git/sql/sql_yacc_ora.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 39790 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39789 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2154:
-#line 12867 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12881 "/home/buildbot/git/sql/sql_yacc_ora.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 39801 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2155:
-#line 12877 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12891 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 39810 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2156:
-#line 12882 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_limit(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 39819 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39818 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2157:
-#line 12887 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12901 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[0].item_param)->limit_clause_param= TRUE;
           }
-#line 39827 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39826 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2158:
-#line 12891 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 39837 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2159:
-#line 12897 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12911 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 39847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39846 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2160:
-#line 12903 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12917 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_uint(thd, (yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 39857 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39856 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2161:
-#line 12912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12926 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             LEX *lex=Lex;
             lex->limit_rows_examined= (yyvsp[0].item);
           }
-#line 39866 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39865 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2162:
-#line 12919 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12934 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->current_select->select_limit= 0;
           }
-#line 39875 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39874 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2163:
-#line 12924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12939 "/home/buildbot/git/sql/sql_yacc_ora.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 39886 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39885 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2164:
-#line 12930 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12945 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { thd->parse_error(); MYSQL_YYABORT; }
-#line 39892 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39891 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2165:
-#line 12931 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12946 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { thd->parse_error(); MYSQL_YYABORT; }
-#line 39898 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39897 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2168:
-#line 12940 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12955 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.num)= (int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39904 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39903 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2169:
-#line 12941 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12956 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.num)= -(int) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39910 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39909 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2170:
-#line 12944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12960 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39916 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39915 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2171:
-#line 12945 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12961 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
-#line 39922 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2172:
-#line 12946 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39928 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39927 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2173:
-#line 12947 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12963 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39934 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39933 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2174:
-#line 12948 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12964 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39940 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39939 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2175:
-#line 12949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12965 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39946 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39945 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2176:
-#line 12953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12969 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39951 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2177:
-#line 12954 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12970 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (ulong) strtol((yyvsp[0].lex_str).str, (char**) 0, 16); }
-#line 39958 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39957 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2178:
-#line 12955 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39964 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39963 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2179:
-#line 12956 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12972 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulong_num)= (ulong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39969 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2180:
-#line 12957 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12973 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { MYSQL_YYABORT; }
-#line 39976 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39975 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2181:
-#line 12961 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12977 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2182:
-#line 12962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12978 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= (longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39988 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2183:
-#line 12963 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12979 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 39994 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2184:
-#line 12964 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.longlong_number)= -(longlong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40000 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 39999 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2185:
-#line 12968 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12984 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40006 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40005 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2186:
-#line 12969 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12985 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40011 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2187:
-#line 12970 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12986 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40018 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2188:
-#line 12971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12987 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40024 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2189:
-#line 12972 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12988 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40030 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2190:
-#line 12976 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40036 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2191:
-#line 12977 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12993 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40041 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2192:
-#line 12978 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12994 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulonglong_number)= strtoull((yyvsp[0].lex_str).str, (char**) 0, 16); }
-#line 40048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40047 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2193:
-#line 12979 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12995 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { int error; (yyval.ulonglong_number)= (ulonglong) my_strtoll10((yyvsp[0].lex_str).str, (char**) 0, &error); }
-#line 40054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40053 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2194:
-#line 12980 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 12996 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { MYSQL_YYABORT; }
-#line 40060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40059 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2195:
-#line 12985 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { thd->parse_error(ER_ONLY_INTEGERS_ALLOWED); }
-#line 40066 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40065 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2198:
-#line 12994 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13010 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.choice)= (yyvsp[0].ulong_num) != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; }
-#line 40072 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40071 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2199:
-#line 12995 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13011 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.choice)= HA_CHOICE_UNDEF; }
-#line 40078 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2200:
-#line 12999 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13015 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= (yyvsp[0].ulong_num) != 0; }
-#line 40084 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40083 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2201:
-#line 13000 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13016 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 1; }
-#line 40090 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40089 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2202:
-#line 13001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13017 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ulong_num)= 0; }
-#line 40096 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40095 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2203:
-#line 13006 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13022 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -40122,43 +40121,43 @@
             */
             Lex->expr_allows_subselect= false;
           }
-#line 40126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40125 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2204:
-#line 13032 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* Subqueries are allowed from now.*/
             Lex->expr_allows_subselect= true;
           }
-#line 40135 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40134 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2205:
-#line 13039 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13055 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40141 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2206:
-#line 13040 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13056 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40147 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40146 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2209:
-#line 13050 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_proc_to_list(thd, (yyvsp[-1].item))))
               MYSQL_YYABORT;
             if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
               (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
           }
-#line 40158 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40157 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2210:
-#line 13059 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13075 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (!lex->describe &&
@@ -40166,23 +40165,23 @@
                             select_dumpvar(thd)))))
               MYSQL_YYABORT;
           }
-#line 40170 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2211:
-#line 13067 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13083 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40176 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2213:
-#line 13072 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13088 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40182 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2214:
-#line 13076 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13092 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (Lex->result)
             {
@@ -40199,37 +40198,37 @@
               DBUG_ASSERT(Lex->describe);
             }
           }
-#line 40203 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40202 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2215:
-#line 13096 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13112 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.myvar) = Lex->result ? new (thd->mem_root) my_var_user(&(yyvsp[0].lex_str)) : NULL;
           }
-#line 40211 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2216:
-#line 13100 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[0].lex_str))) && Lex->result))
               MYSQL_YYABORT;
           }
-#line 40220 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40219 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2217:
-#line 13105 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.myvar)= Lex->create_outvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys))) && Lex->result))
               MYSQL_YYABORT;
           }
-#line 40229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2219:
-#line 13117 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13133 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
@@ -40240,17 +40239,17 @@
                          select_export(thd, lex->exchange))))
               MYSQL_YYABORT;
           }
-#line 40244 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40243 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2220:
-#line 13128 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13144 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->exchange->cs= (yyvsp[0].charset); }
-#line 40250 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40249 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2222:
-#line 13131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (!lex->describe)
@@ -40265,54 +40264,54 @@
                 MYSQL_YYABORT;
             }
           }
-#line 40269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40268 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2223:
-#line 13146 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13162 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->uncacheable(UNCACHEABLE_SIDEEFFECT);
           }
-#line 40277 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40276 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2224:
-#line 13157 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_DO;
             mysql_init_select(lex);
           }
-#line 40287 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40286 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2225:
-#line 13163 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13179 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->insert_list= (yyvsp[0].item_list);
           }
-#line 40295 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2226:
-#line 13174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13190 "/home/buildbot/git/sql/sql_yacc_ora.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 40306 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2227:
-#line 13181 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13197 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40312 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40311 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2228:
-#line 13183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13199 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Alter_drop *ad= (new (thd->mem_root)
@@ -40329,21 +40328,21 @@
                                            MDL_SHARED_UPGRADABLE)))
               MYSQL_YYABORT;
           }
-#line 40333 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2229:
-#line 13200 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->set_command(SQLCOM_DROP_DB, (yyvsp[-1].object_ddl_options));
             lex->name= (yyvsp[0].ident_sys);
           }
-#line 40343 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40342 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2230:
-#line 13206 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->set_command(SQLCOM_DROP_PACKAGE, (yyvsp[-1].object_ddl_options));
@@ -40351,11 +40350,11 @@
               my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE"));
             lex->spname= (yyvsp[0].spname);
           }
-#line 40355 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40354 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2231:
-#line 13214 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->set_command(SQLCOM_DROP_PACKAGE_BODY, (yyvsp[-1].object_ddl_options));
@@ -40363,11 +40362,11 @@
               my_yyabort_error((ER_SP_NO_DROP_SP, MYF(0), "PACKAGE BODY"));
             lex->spname= (yyvsp[0].spname);
           }
-#line 40367 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40366 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2232:
-#line 13222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13238 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             sp_name *spname;
@@ -40381,11 +40380,11 @@
               MYSQL_YYABORT;
             lex->spname= spname;
           }
-#line 40385 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40384 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2233:
-#line 13236 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13252 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             LEX_CSTRING db= {0, 0};
@@ -40400,11 +40399,11 @@
               MYSQL_YYABORT;
             lex->spname= spname;
           }
-#line 40404 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40403 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2234:
-#line 13251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13267 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->sphead))
@@ -40412,90 +40411,90 @@
             lex->set_command(SQLCOM_DROP_PROCEDURE, (yyvsp[-1].object_ddl_options));
             lex->spname= (yyvsp[0].spname);
           }
-#line 40416 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40415 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2235:
-#line 13259 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13275 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_command(SQLCOM_DROP_USER, (yyvsp[-2].object_ddl_options));
           }
-#line 40424 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2236:
-#line 13263 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13279 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_command(SQLCOM_DROP_ROLE, (yyvsp[-2].object_ddl_options));
           }
-#line 40432 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40431 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2237:
-#line 13267 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13283 "/home/buildbot/git/sql/sql_yacc_ora.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 40443 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40442 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2238:
-#line 13274 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13290 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40449 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40448 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2239:
-#line 13276 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->spname= (yyvsp[0].spname);
             Lex->set_command(SQLCOM_DROP_EVENT, (yyvsp[-1].object_ddl_options));
           }
-#line 40458 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40457 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2240:
-#line 13281 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13297 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->set_command(SQLCOM_DROP_TRIGGER, (yyvsp[-1].object_ddl_options));
             lex->spname= (yyvsp[0].spname);
           }
-#line 40468 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40467 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2241:
-#line 13287 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13303 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_TABLESPACE;
           }
-#line 40477 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40476 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2242:
-#line 13292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13308 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->alter_tablespace_info->ts_cmd_type= DROP_LOGFILE_GROUP;
           }
-#line 40486 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40485 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2243:
-#line 13297 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13313 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_command(SQLCOM_DROP_SERVER, (yyvsp[-1].object_ddl_options));
             Lex->server_options.reset((yyvsp[0].lex_str));
           }
-#line 40495 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40494 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2244:
-#line 13303 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13319 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->set_command(SQLCOM_DROP_SEQUENCE, (yyvsp[-2].num), (yyvsp[0].object_ddl_options));
@@ -40503,17 +40502,17 @@
             YYPS->m_lock_type= TL_UNLOCK;
             YYPS->m_mdl_type= MDL_EXCLUSIVE;
           }
-#line 40507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40506 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2245:
-#line 13311 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13327 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40513 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40512 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2248:
-#line 13321 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13337 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[0].table), NULL,
                                                     TL_OPTION_UPDATING,
@@ -40521,11 +40520,11 @@
                                                     YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 40525 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40524 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2249:
-#line 13332 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13348 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
                                                     TL_OPTION_UPDATING,
@@ -40535,11 +40534,11 @@
                                                     (yyvsp[0].string_list))))
               MYSQL_YYABORT;
           }
-#line 40539 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40538 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2252:
-#line 13350 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13366 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->
                          add_table_to_list(thd, (yyvsp[0].table), NULL,
@@ -40549,109 +40548,113 @@
                                            YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 40553 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2253:
-#line 13363 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13379 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           Lex->check_exists= FALSE;
           (yyval.num)= 0;
         }
-#line 40562 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40561 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2254:
-#line 13368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           Lex->check_exists= TRUE;
           (yyval.num)= 1;
         }
-#line 40571 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40570 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2255:
-#line 13376 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13392 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           (yyval.object_ddl_options).set(DDL_options_st::OPT_NONE);
         }
-#line 40579 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2256:
-#line 13380 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13396 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           (yyval.object_ddl_options).set(DDL_options_st::OPT_IF_EXISTS);
         }
-#line 40587 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2257:
-#line 13386 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13402 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 40593 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40592 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2258:
-#line 13387 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13403 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= HA_LEX_CREATE_TMP_TABLE; }
-#line 40599 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2259:
-#line 13395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13411 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSERT;
             lex->duplicates= DUP_ERROR; 
             mysql_init_select(lex);
           }
-#line 40610 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40609 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2260:
-#line 13403 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->set_lock_for_tables((yyvsp[-2].lock_type), true);
             Lex->current_select= &Lex->select_lex;
           }
-#line 40619 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2261:
-#line 13408 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
-    {}
-#line 40625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 13424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+    {
+            Lex->mark_first_table_as_inserting();
+          }
+#line 40626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2262:
-#line 13413 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_REPLACE;
             lex->duplicates= DUP_REPLACE;
             mysql_init_select(lex);
           }
-#line 40636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40637 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2263:
-#line 13420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->set_lock_for_tables((yyvsp[-1].lock_type), true);
             Lex->current_select= &Lex->select_lex;
           }
-#line 40645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40646 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2264:
-#line 13425 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
-    {}
-#line 40651 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 13443 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+    {
+            Lex->mark_first_table_as_inserting();
+          }
+#line 40654 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2265:
-#line 13430 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13450 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               If it is SP we do not allow insert optimisation when result of
@@ -40660,91 +40663,91 @@
             */
             (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
-#line 40664 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40667 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2266:
-#line 13438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13458 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 40670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40673 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2267:
-#line 13440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
          // QQ: why was +1?
           Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
           Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
           (yyval.lock_type)= TL_WRITE_DELAYED;
         }
-#line 40681 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40684 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2268:
-#line 13446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE; }
-#line 40687 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40690 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2269:
-#line 13450 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13470 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= (yyvsp[0].lock_type); }
-#line 40693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40696 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2270:
-#line 13452 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13472 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           Lex->keyword_delayed_begin_offset= (uint)((yyvsp[0].kwd).pos() - thd->query());
           Lex->keyword_delayed_end_offset= (uint)((yyvsp[0].kwd).end() - thd->query());
           (yyval.lock_type)= TL_WRITE_DELAYED;
         }
-#line 40703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40706 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2271:
-#line 13460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40709 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40712 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2272:
-#line 13461 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13481 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40715 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2273:
-#line 13466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13486 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->field_list.empty();
             lex->many_values.empty();
             lex->insert_list=0;
           }
-#line 40726 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40729 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2274:
-#line 13474 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40735 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2275:
-#line 13475 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13496 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40738 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40741 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2276:
-#line 13476 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13497 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40744 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40747 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2277:
-#line 13478 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13499 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)) ||
@@ -40752,170 +40755,170 @@
                          thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 40756 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40759 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2279:
-#line 13490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13511 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 40762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40765 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2280:
-#line 13491 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13512 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 40768 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40771 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2281:
-#line 13495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40774 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40777 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2282:
-#line 13496 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13517 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40780 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40783 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2283:
-#line 13497 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13518 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40789 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2288:
-#line 13512 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13533 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->field_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
                 unlikely(lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 40797 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2289:
-#line 13521 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13542 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40803 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2290:
-#line 13522 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13543 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40812 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2291:
-#line 13526 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13547 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40818 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2292:
-#line 13527 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13548 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40821 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40824 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2293:
-#line 13531 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13552 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40827 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2294:
-#line 13532 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13553 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40833 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40836 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2295:
-#line 13536 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13557 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40839 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2296:
-#line 13537 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13558 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2297:
-#line 13542 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13563 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
               MYSQL_YYABORT;
           }
-#line 40854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40857 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2298:
-#line 13547 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13568 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->many_values.push_back(lex->insert_list,
                                                     thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 40865 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40868 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2299:
-#line 13557 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13578 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!(Lex->insert_list= new (thd->mem_root) List_item)))
               MYSQL_YYABORT;
           }
-#line 40874 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40877 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2300:
-#line 13562 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13583 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->many_values.push_back(lex->insert_list,
                                                     thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 40885 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40888 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2301:
-#line 13571 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13592 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40891 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40894 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2303:
-#line 13576 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13597 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 40897 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40900 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2305:
-#line 13582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 40906 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40909 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2306:
-#line 13587 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13608 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 40915 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40918 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2307:
-#line 13595 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13616 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
                MYSQL_YYABORT;
@@ -40923,11 +40926,11 @@
             if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
               (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
            }
-#line 40927 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40930 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2308:
-#line 13603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13624 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->insert_list->push_back((yyvsp[-1].item), thd->mem_root)))
                MYSQL_YYABORT;
@@ -40935,70 +40938,70 @@
             if (!(yyvsp[-1].item)->name.str || (yyvsp[-1].item)->name.str == item_empty_name)
               (yyvsp[-1].item)->set_name(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
           }
-#line 40939 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2309:
-#line 13613 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13634 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item);}
-#line 40945 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40948 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2310:
-#line 13615 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_default_value(thd, Lex->current_context());
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 40955 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40958 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2311:
-#line 13621 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13642 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_ignore_value(thd, Lex->current_context());
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 40965 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40968 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2313:
-#line 13630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13651 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->duplicates= DUP_UPDATE; }
-#line 40971 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40974 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2314:
-#line 13632 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 	    Select->parsing_place= IN_UPDATE_ON_DUP_KEY;
           }
-#line 40979 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2315:
-#line 13636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13657 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
 	    Select->parsing_place= NO_MATTER;
           }
-#line 40987 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 40990 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2316:
-#line 13645 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13666 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             mysql_init_select(lex);
             lex->sql_command= SQLCOM_UPDATE;
             lex->duplicates= DUP_ERROR; 
           }
-#line 40998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41001 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2317:
-#line 13653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13674 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             SELECT_LEX *slex= &Lex->select_lex;
             if (slex->table_list.elements > 1)
@@ -41017,50 +41020,50 @@
             */
             slex->set_lock_for_tables((yyvsp[-4].lock_type), slex->table_list.elements == 1);
           }
-#line 41021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41024 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2318:
-#line 13671 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41027 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41030 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2321:
-#line 13681 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13702 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(add_item_to_list(thd, (yyvsp[-2].item))) ||
                 unlikely(add_value_to_list(thd, (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 41037 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41040 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2324:
-#line 13695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13716 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           LEX *lex= Lex;
           if (unlikely(lex->update_list.push_back((yyvsp[-2].item), thd->mem_root)) ||
               unlikely(lex->value_list.push_back((yyvsp[0].item), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 41048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41051 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2325:
-#line 13704 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13725 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_DEFAULT; }
-#line 41054 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41057 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2326:
-#line 13705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13726 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 41060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41063 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2327:
-#line 13712 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13733 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_DELETE;
@@ -41071,41 +41074,41 @@
             lex->ignore= 0;
             lex->select_lex.init_order();
           }
-#line 41075 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41078 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2329:
-#line 13727 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13748 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_ALL);
           }
-#line 41083 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41086 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2330:
-#line 13731 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13752 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->vers_conditions.init(SYSTEM_TIME_BEFORE, (yyvsp[0].vers_history_point));
           }
-#line 41091 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41094 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2331:
-#line 13737 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13758 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41097 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41100 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2332:
-#line 13739 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13760 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->last_table()->vers_conditions= Lex->vers_conditions;
           }
-#line 41105 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2333:
-#line 13746 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13767 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!Select->
                          add_table_to_list(thd, (yyvsp[-1].table), NULL, TL_OPTION_UPDATING,
@@ -41117,55 +41120,55 @@
             YYPS->m_lock_type= TL_READ_DEFAULT;
             YYPS->m_mdl_type= MDL_SHARED_READ;
           }
-#line 41121 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41124 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2334:
-#line 13764 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13785 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41130 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2335:
-#line 13766 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13787 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             mysql_init_multi_delete(Lex);
             YYPS->m_lock_type= TL_READ_DEFAULT;
             YYPS->m_mdl_type= MDL_SHARED_READ;
           }
-#line 41137 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2336:
-#line 13772 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13793 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
               MYSQL_YYABORT;
           }
-#line 41146 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2337:
-#line 13777 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             mysql_init_multi_delete(Lex);
             YYPS->m_lock_type= TL_READ_DEFAULT;
             YYPS->m_mdl_type= MDL_SHARED_READ;
           }
-#line 41156 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41159 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2338:
-#line 13783 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13804 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(multi_delete_set_locks_and_link_aux_tables(Lex)))
               MYSQL_YYABORT;
           }
-#line 41165 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41168 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2343:
-#line 13801 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13822 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Table_ident *ti= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
             if (unlikely(ti == NULL))
@@ -41180,11 +41183,11 @@
                                            YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 41184 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2344:
-#line 13816 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13837 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Table_ident *ti= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
             if (unlikely(ti == NULL))
@@ -41199,53 +41202,53 @@
                                            YYPS->m_mdl_type)))
               MYSQL_YYABORT;
           }
-#line 41203 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41206 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2345:
-#line 13833 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13854 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41209 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41212 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2346:
-#line 13834 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13855 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41215 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41218 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2347:
-#line 13838 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13859 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41221 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41224 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2348:
-#line 13839 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 41227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2349:
-#line 13843 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13864 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= OPTION_QUICK; }
-#line 41233 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41236 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2350:
-#line 13844 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13865 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { YYPS->m_lock_type= TL_WRITE_LOW_PRIORITY; }
-#line 41239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41242 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2351:
-#line 13845 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13866 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ignore= 1; }
-#line 41245 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41248 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2352:
-#line 13850 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13871 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX* lex= Lex;
             lex->sql_command= SQLCOM_TRUNCATE;
@@ -41256,11 +41259,11 @@
             YYPS->m_lock_type= TL_WRITE;
             YYPS->m_mdl_type= MDL_EXCLUSIVE;
           }
-#line 41260 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41263 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2353:
-#line 13861 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13882 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX* lex= thd->lex;
             DBUG_ASSERT(!lex->m_sql_cmd);
@@ -41268,105 +41271,105 @@
             if (unlikely(lex->m_sql_cmd == NULL))
               MYSQL_YYABORT;
           }
-#line 41272 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41275 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2354:
-#line 13868 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13889 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 41278 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41281 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2364:
-#line 13892 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13913 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_CPU;
     }
-#line 41286 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41289 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2365:
-#line 13896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13917 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_MEMORY;
     }
-#line 41294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41297 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2366:
-#line 13900 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13921 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_BLOCK_IO;
     }
-#line 41302 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2367:
-#line 13904 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13925 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_CONTEXT;
     }
-#line 41310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41313 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2368:
-#line 13908 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13929 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_PAGE_FAULTS;
     }
-#line 41318 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2369:
-#line 13912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13933 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_IPC;
     }
-#line 41326 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41329 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2370:
-#line 13916 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13937 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_SWAPS;
     }
-#line 41334 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41337 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2371:
-#line 13920 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13941 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_SOURCE;
     }
-#line 41342 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41345 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2372:
-#line 13924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13945 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_options|= PROFILE_ALL;
     }
-#line 41350 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41353 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2373:
-#line 13931 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13952 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_query_id= 0;
     }
-#line 41358 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41361 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2374:
-#line 13935 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13956 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
       Lex->profile_query_id= atoi((yyvsp[0].lex_str).str);
     }
-#line 41366 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41369 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2375:
-#line 13944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13965 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->wild=0;
@@ -41375,30 +41378,30 @@
             lex->current_select->parsing_place= SELECT_LIST;
             lex->create_info.init();
           }
-#line 41379 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41382 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2376:
-#line 13953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13974 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 41387 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41390 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2377:
-#line 13960 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13981 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_DATABASES;
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)))
                MYSQL_YYABORT;
            }
-#line 41398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41401 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2378:
-#line 13967 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13988 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLES;
@@ -41406,11 +41409,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)))
                MYSQL_YYABORT;
            }
-#line 41410 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41413 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2379:
-#line 13975 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 13996 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TRIGGERS;
@@ -41418,11 +41421,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)))
                MYSQL_YYABORT;
            }
-#line 41422 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41425 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2380:
-#line 13983 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14004 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_EVENTS;
@@ -41430,11 +41433,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_EVENTS)))
                MYSQL_YYABORT;
            }
-#line 41434 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41437 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2381:
-#line 13991 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14012 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
@@ -41442,11 +41445,11 @@
              if (unlikely(prepare_schema_table(thd, lex, 0, SCH_TABLES)))
                MYSQL_YYABORT;
            }
-#line 41446 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41449 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2382:
-#line 13999 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14020 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
@@ -41454,55 +41457,55 @@
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)))
               MYSQL_YYABORT;
           }
-#line 41458 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41461 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2383:
-#line 14007 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14028 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_PLUGINS;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PLUGINS)))
               MYSQL_YYABORT;
           }
-#line 41469 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41472 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2384:
-#line 14014 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14035 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->ident= (yyvsp[0].lex_str);
             Lex->sql_command= SQLCOM_SHOW_PLUGINS;
             if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
               MYSQL_YYABORT;
           }
-#line 41480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41483 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2385:
-#line 14021 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14042 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_PLUGINS;
             if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_ALL_PLUGINS)))
               MYSQL_YYABORT;
           }
-#line 41490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41493 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2386:
-#line 14027 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->create_info.db_type= (yyvsp[-1].db_type); }
-#line 41496 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2387:
-#line 14029 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14050 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->create_info.db_type= NULL; }
-#line 41502 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41505 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2388:
-#line 14031 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14052 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_FIELDS;
@@ -41511,45 +41514,45 @@
             if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_COLUMNS)))
               MYSQL_YYABORT;
           }
-#line 41515 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41518 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2389:
-#line 14040 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14061 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_BINLOGS;
           }
-#line 41523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41526 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2390:
-#line 14044 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14065 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
           }
-#line 41531 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41534 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2391:
-#line 14048 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14069 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
           }
-#line 41540 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41543 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2393:
-#line 14054 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14075 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_RELAYLOG_EVENTS;
           }
-#line 41549 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2395:
-#line 14059 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14080 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_KEYS;
@@ -41558,96 +41561,96 @@
             if (unlikely(prepare_schema_table(thd, lex, (yyvsp[-2].table), SCH_STATISTICS)))
               MYSQL_YYABORT;
           }
-#line 41562 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41565 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2396:
-#line 14068 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14089 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_ENGINES)))
               MYSQL_YYABORT;
           }
-#line 41573 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2397:
-#line 14075 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14096 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_AUTHORS;
           }
-#line 41582 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41585 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2398:
-#line 14080 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14101 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
           }
-#line 41591 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41594 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2399:
-#line 14085 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14106 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
           }
-#line 41600 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41603 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2400:
-#line 14090 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14111 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING var= {STRING_WITH_LEN("warning_count")};
             (void) create_select_for_variable(thd, &var);
           }
-#line 41609 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41612 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2401:
-#line 14095 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING var= {STRING_WITH_LEN("error_count")};
             (void) create_select_for_variable(thd, &var);
           }
-#line 41618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41621 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2402:
-#line 14100 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command = SQLCOM_SHOW_WARNS;}
-#line 41624 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41627 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2403:
-#line 14102 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command = SQLCOM_SHOW_ERRORS;}
-#line 41630 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41633 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2404:
-#line 14104 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14125 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command = SQLCOM_SHOW_PROFILES; }
-#line 41636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41639 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2405:
-#line 14106 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14127 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_PROFILE;
             if (unlikely(prepare_schema_table(thd, lex, NULL, SCH_PROFILES)))
               MYSQL_YYABORT;
           }
-#line 41647 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41650 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2406:
-#line 14113 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS;
@@ -41655,17 +41658,17 @@
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_STATUS)))
               MYSQL_YYABORT;
           }
-#line 41659 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41662 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2407:
-#line 14121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14142 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
-#line 41665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2408:
-#line 14123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14144 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_VARIABLES;
@@ -41673,33 +41676,33 @@
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_SESSION_VARIABLES)))
               MYSQL_YYABORT;
           }
-#line 41677 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41680 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2409:
-#line 14131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14152 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_CHARSETS;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_CHARSETS)))
               MYSQL_YYABORT;
           }
-#line 41688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41691 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2410:
-#line 14138 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14159 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_COLLATIONS;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)))
               MYSQL_YYABORT;
           }
-#line 41699 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41702 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2411:
-#line 14145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_GRANTS;
             if (unlikely(!(Lex->grant_user=
@@ -41707,30 +41710,30 @@
               MYSQL_YYABORT;
             Lex->grant_user->user= current_user_and_current_role;
           }
-#line 41711 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2412:
-#line 14153 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SHOW_GRANTS;
             lex->grant_user=(yyvsp[-1].lex_user);
           }
-#line 41721 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2413:
-#line 14159 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14180 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_command(SQLCOM_SHOW_CREATE_DB, (yyvsp[-1].object_ddl_options));
             Lex->name= (yyvsp[0].ident_sys);
           }
-#line 41730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41733 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2414:
-#line 14164 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14185 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -41738,11 +41741,11 @@
               MYSQL_YYABORT;
             lex->create_info.storage_media= HA_SM_DEFAULT;
           }
-#line 41742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41745 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2415:
-#line 14172 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14193 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -41750,11 +41753,11 @@
               MYSQL_YYABORT;
             lex->table_type= TABLE_TYPE_VIEW;
           }
-#line 41754 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41757 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2416:
-#line 14180 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14201 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE;
@@ -41762,100 +41765,100 @@
               MYSQL_YYABORT;
             lex->table_type= TABLE_TYPE_SEQUENCE;
           }
-#line 41766 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41769 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2417:
-#line 14188 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14209 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_MASTER_STAT;
           }
-#line 41774 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41777 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2418:
-#line 14192 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14213 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
             Lex->verbose= 1;
           }
-#line 41783 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2419:
-#line 14197 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14218 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             lex->mi.connection_name= null_clex_str;
             lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
             lex->verbose= 0;
           }
-#line 41794 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41797 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2420:
-#line 14204 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
             Lex->verbose= 0;
           }
-#line 41803 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2421:
-#line 14209 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
             lex->sql_command = SQLCOM_SHOW_CREATE_PROC;
             lex->spname= (yyvsp[0].spname);
           }
-#line 41814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41817 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2422:
-#line 14216 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14237 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
             lex->sql_command = SQLCOM_SHOW_CREATE_FUNC;
             lex->spname= (yyvsp[0].spname);
           }
-#line 41825 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41828 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2423:
-#line 14223 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14244 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE;
             lex->spname= (yyvsp[0].spname);
           }
-#line 41835 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41838 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2424:
-#line 14229 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14250 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command = SQLCOM_SHOW_CREATE_PACKAGE_BODY;
             lex->spname= (yyvsp[0].spname);
           }
-#line 41845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2425:
-#line 14235 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14256 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
             lex->spname= (yyvsp[0].spname);
           }
-#line 41855 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41858 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2426:
-#line 14241 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14262 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
             if (unlikely(!(Lex->grant_user=
@@ -41863,111 +41866,111 @@
               MYSQL_YYABORT;
             Lex->grant_user->user= current_user;
           }
-#line 41867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41870 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2427:
-#line 14249 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14270 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
              Lex->grant_user= (yyvsp[0].lex_user);
           }
-#line 41876 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41879 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2428:
-#line 14254 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14275 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_PROC;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 41887 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41890 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2429:
-#line 14261 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14282 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_FUNC;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 41898 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41901 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2430:
-#line 14268 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14289 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 41909 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41912 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2431:
-#line 14275 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14296 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SHOW_STATUS_PACKAGE_BODY;
             if (unlikely(prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)))
               MYSQL_YYABORT;
           }
-#line 41920 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41923 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2432:
-#line 14282 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14303 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_PROC_CODE;
             Lex->spname= (yyvsp[0].spname);
           }
-#line 41929 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41932 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2433:
-#line 14287 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14308 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_FUNC_CODE;
             Lex->spname= (yyvsp[0].spname);
           }
-#line 41938 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2434:
-#line 14292 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14313 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_PACKAGE_BODY_CODE;
             Lex->spname= (yyvsp[0].spname);
           }
-#line 41947 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41950 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2435:
-#line 14297 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14318 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->spname= (yyvsp[0].spname);
             Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
           }
-#line 41956 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41959 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2436:
-#line 14302 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14323 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_SHOW_EXPLAIN;
             if (unlikely(prepare_schema_table(thd, Lex, 0, SCH_EXPLAIN)))
               MYSQL_YYABORT;
             add_value_to_list(thd, (yyvsp[0].item));
           }
-#line 41967 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41970 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2437:
-#line 14309 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14330 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              LEX *lex= Lex;
              bool in_plugin;
@@ -41986,83 +41989,83 @@
              if (unlikely(make_schema_select(thd, Lex->current_select, table)))
                MYSQL_YYABORT;
            }
-#line 41990 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2438:
-#line 14331 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14352 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; }
-#line 41996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 41999 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2439:
-#line 14333 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14354 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
-#line 42002 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42005 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2440:
-#line 14335 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14356 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
-#line 42008 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42011 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2445:
-#line 14349 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14370 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 42014 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2446:
-#line 14350 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14371 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 42020 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2447:
-#line 14354 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14375 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->verbose=0; }
-#line 42026 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2448:
-#line 14355 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14376 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->verbose=1; }
-#line 42032 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2451:
-#line 14364 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14385 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->mi.log_file_name = 0; }
-#line 42038 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42041 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2452:
-#line 14365 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14386 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->mi.log_file_name = (yyvsp[0].lex_str).str; }
-#line 42044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42047 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2453:
-#line 14369 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14390 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->mi.pos = 4; /* skip magic number */ }
-#line 42050 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42053 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2454:
-#line 14370 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14391 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->mi.pos = (yyvsp[0].ulonglong_number); }
-#line 42056 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42059 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2455:
-#line 14374 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.simple_string)= 0; }
-#line 42062 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42065 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2456:
-#line 14376 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14397 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->wild= new (thd->mem_root) String((yyvsp[0].lex_str).str, (yyvsp[0].lex_str).length,
                                                     system_charset_info);
@@ -42070,22 +42073,22 @@
               MYSQL_YYABORT;
             (yyval.simple_string)= (yyvsp[-1].simple_string);
           }
-#line 42074 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2457:
-#line 14384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14405 "/home/buildbot/git/sql/sql_yacc_ora.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 42085 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42088 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2458:
-#line 14395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14416 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             mysql_init_select(lex);
@@ -42096,66 +42099,66 @@
             if (unlikely(prepare_schema_table(thd, lex, (yyvsp[0].table), SCH_COLUMNS)))
               MYSQL_YYABORT;
           }
-#line 42100 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42103 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2459:
-#line 14406 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Select->parsing_place= NO_MATTER;
           }
-#line 42108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2460:
-#line 14410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->describe|= DESCRIBE_NORMAL; }
-#line 42114 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42117 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2461:
-#line 14412 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->select_lex.options|= SELECT_DESCRIBE;
           }
-#line 42123 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2469:
-#line 14433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14454 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->analyze_stmt= true;
           }
-#line 42131 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42134 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2470:
-#line 14439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->describe|= DESCRIBE_EXTENDED; }
-#line 42137 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42140 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2471:
-#line 14440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14461 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->describe|= DESCRIBE_PARTITIONS; }
-#line 42143 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42146 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2472:
-#line 14441 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14462 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42152 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2473:
-#line 14445 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42155 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42158 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2474:
-#line 14447 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14468 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("JSON")))
               Lex->explain_json= true;
@@ -42165,23 +42168,23 @@
               my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), "EXPLAIN",
                                (yyvsp[0].lex_str).str));
           }
-#line 42169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42172 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2475:
-#line 14459 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42178 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2476:
-#line 14460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14481 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->wild= (yyvsp[0].string); }
-#line 42181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42184 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2477:
-#line 14462 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14483 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->wild= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,
                                                     (yyvsp[0].ident_sys).length,
@@ -42189,28 +42192,28 @@
             if (unlikely(Lex->wild == NULL))
               MYSQL_YYABORT;
           }
-#line 42193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42196 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2478:
-#line 14476 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14497 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_FLUSH;
             lex->type= 0;
             lex->no_write_to_binlog= (yyvsp[0].num);
           }
-#line 42204 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42207 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2479:
-#line 14483 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14504 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42213 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2480:
-#line 14488 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14509 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->type|= REFRESH_TABLES;
             /*
@@ -42220,23 +42223,23 @@
             YYPS->m_lock_type= TL_READ_NO_INSERT;
             YYPS->m_mdl_type= MDL_SHARED_HIGH_PRIO;
           }
-#line 42224 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2481:
-#line 14498 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14519 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42230 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42233 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2483:
-#line 14503 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14524 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42236 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2484:
-#line 14505 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14526 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           TABLE_LIST *tables= Lex->query_tables;
           for (; tables; tables= tables->next_global)
@@ -42248,17 +42251,17 @@
             tables->open_type= OT_BASE_ONLY;
           }
         }
-#line 42252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42255 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2485:
-#line 14520 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14541 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_READ_LOCK | (yyvsp[0].num); }
-#line 42258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42261 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2486:
-#line 14522 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14543 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->query_tables == NULL))
             {
@@ -42268,53 +42271,53 @@
             } 
             Lex->type|= REFRESH_FOR_EXPORT;
           }
-#line 42272 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42275 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2487:
-#line 14530 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14551 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42278 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42281 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2489:
-#line 14536 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14557 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42284 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42287 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2490:
-#line 14541 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14562 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_ERROR_LOG; }
-#line 42290 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42293 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2491:
-#line 14543 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14564 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_ENGINE_LOG; }
-#line 42296 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2492:
-#line 14545 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14566 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_GENERAL_LOG; }
-#line 42302 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2493:
-#line 14547 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14568 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_SLOW_LOG; }
-#line 42308 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42311 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2494:
-#line 14549 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14570 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_BINARY_LOG; }
-#line 42314 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42317 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2495:
-#line 14551 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14572 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->type & REFRESH_RELAY_LOG))
@@ -42322,44 +42325,44 @@
             lex->type|= REFRESH_RELAY_LOG;
             lex->relay_log_connection_name= lex->mi.connection_name;
            }
-#line 42326 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42329 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2496:
-#line 14559 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14580 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_QUERY_CACHE_FREE; }
-#line 42332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42335 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2497:
-#line 14561 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_HOSTS; }
-#line 42338 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2498:
-#line 14563 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14584 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_GRANT; }
-#line 42344 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42347 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2499:
-#line 14565 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14586 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->type|= REFRESH_LOG;
             Lex->relay_log_connection_name= empty_clex_str;
           }
-#line 42353 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42356 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2500:
-#line 14570 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14591 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_STATUS; }
-#line 42359 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42362 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2501:
-#line 14572 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             LEX *lex= Lex;
             if (unlikely(lex->type & REFRESH_SLAVE))
@@ -42367,29 +42370,29 @@
             lex->type|= REFRESH_SLAVE;
             lex->reset_slave_info.all= false;
           }
-#line 42371 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42374 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2502:
-#line 14580 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_MASTER; }
-#line 42377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42380 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2503:
-#line 14582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_DES_KEY_FILE; }
-#line 42383 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2504:
-#line 14584 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14605 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_USER_RESOURCES; }
-#line 42389 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2505:
-#line 14586 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14607 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              Lex->type|= REFRESH_GENERIC;
              ST_SCHEMA_TABLE *table= find_schema_table(thd, &(yyvsp[-1].ident_sys));
@@ -42403,35 +42406,35 @@
                                                    thd->mem_root)))
                MYSQL_YYABORT;
            }
-#line 42407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42410 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2506:
-#line 14602 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42413 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42416 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2507:
-#line 14603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14624 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42419 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42422 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2508:
-#line 14607 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14628 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42425 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42428 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2509:
-#line 14609 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42431 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42434 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2513:
-#line 14619 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14640 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             uint32 value= (uint32) (yyvsp[0].ulonglong_number);
             if ((yyvsp[0].ulonglong_number) > UINT_MAX32)
@@ -42444,126 +42447,126 @@
             }
             insert_dynamic(&Lex->delete_gtid_domain, (uchar*) &value);
           }
-#line 42448 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42451 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2514:
-#line 14634 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14655 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.num)= 0;}
-#line 42454 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42457 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2515:
-#line 14635 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14656 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.num)= REFRESH_CHECKPOINT; }
-#line 42460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42463 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2516:
-#line 14639 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14661 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_RESET; lex->type=0;
           }
-#line 42469 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42472 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2517:
-#line 14644 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14666 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42475 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42478 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2520:
-#line 14653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14675 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_SLAVE; }
-#line 42481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42484 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2521:
-#line 14655 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14677 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 42487 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42490 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2522:
-#line 14657 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14679 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              Lex->type|= REFRESH_MASTER;
              Lex->next_binlog_file_number= 0;
           }
-#line 42496 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2524:
-#line 14662 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14684 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->type|= REFRESH_QUERY_CACHE;}
-#line 42502 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42505 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2525:
-#line 14666 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14688 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->reset_slave_info.all= false; }
-#line 42508 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42511 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2526:
-#line 14667 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14689 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->reset_slave_info.all= true; }
-#line 42514 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42517 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2527:
-#line 14671 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14693 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42520 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42523 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2528:
-#line 14673 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->next_binlog_file_number = (yyvsp[0].ulong_num);
           }
-#line 42528 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42531 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2529:
-#line 14680 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14702 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->type=0;
             lex->sql_command = SQLCOM_PURGE;
           }
-#line 42538 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42541 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2530:
-#line 14686 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14708 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42544 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42547 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2532:
-#line 14695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14717 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->to_log = (yyvsp[0].lex_str).str;
           }
-#line 42552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42555 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2533:
-#line 14699 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14721 "/home/buildbot/git/sql/sql_yacc_ora.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 42563 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42566 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2534:
-#line 14711 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14733 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->value_list.empty();
@@ -42571,97 +42574,97 @@
             lex->sql_command= SQLCOM_KILL;
             lex->kill_type= KILL_TYPE_ID;
           }
-#line 42575 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2535:
-#line 14719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14741 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->kill_signal= (killed_state) ((yyvsp[-2].num) | (yyvsp[-1].num));
           }
-#line 42583 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2536:
-#line 14725 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14747 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_HARD_BIT; }
-#line 42589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42592 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2537:
-#line 14726 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14748 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_HARD_BIT; }
-#line 42595 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2538:
-#line 14727 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14749 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 42601 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42604 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2539:
-#line 14730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14753 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_CONNECTION; }
-#line 42607 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42610 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2540:
-#line 14731 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_CONNECTION; }
-#line 42613 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2541:
-#line 14732 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14755 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= (int) KILL_QUERY; }
-#line 42619 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42622 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2542:
-#line 14734 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14757 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (int) KILL_QUERY;
             Lex->kill_type= KILL_TYPE_QUERY;
           }
-#line 42628 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42631 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2543:
-#line 14742 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14765 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           Lex->value_list.push_front((yyval.item), thd->mem_root);
          }
-#line 42636 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42639 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2544:
-#line 14746 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14769 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root);
             Lex->kill_type= KILL_TYPE_USER;
           }
-#line 42645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42648 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2545:
-#line 14754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14777 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->sql_command= SQLCOM_SHUTDOWN; }
-#line 42651 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42654 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2546:
-#line 14761 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14784 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command=SQLCOM_CHANGE_DB;
             lex->select_lex.db= (yyvsp[0].ident_sys);
           }
-#line 42661 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42664 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2547:
-#line 14772 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14795 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
 
@@ -42672,11 +42675,11 @@
               MYSQL_YYABORT;
             }
           }
-#line 42676 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42679 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2548:
-#line 14783 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14806 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_LOAD;
@@ -42687,11 +42690,11 @@
                          sql_exchange((yyvsp[0].lex_str).str, 0, (yyvsp[-5].filetype)))))
               MYSQL_YYABORT;
           }
-#line 42691 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2549:
-#line 14794 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14817 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!Select->add_table_to_list(thd, (yyvsp[-1].table), NULL,
@@ -42704,53 +42707,55 @@
             lex->value_list.empty();
             lex->many_values.empty();
           }
-#line 42708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42711 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2550:
-#line 14807 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14830 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->exchange->cs= (yyvsp[0].charset); }
-#line 42714 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42717 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2551:
-#line 14811 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
-    {}
-#line 42720 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 14834 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+    {
+            Lex->mark_first_table_as_inserting();
+          }
+#line 42725 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2552:
-#line 14815 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14840 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.filetype)= FILETYPE_CSV; }
-#line 42726 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42731 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2553:
-#line 14816 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14841 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.filetype)= FILETYPE_XML; }
-#line 42732 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42737 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2554:
-#line 14820 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14845 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)=0;}
-#line 42738 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42743 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2555:
-#line 14821 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14846 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)=1;}
-#line 42744 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42749 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2556:
-#line 14825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14850 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_DEFAULT; }
-#line 42750 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42755 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2557:
-#line 14827 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14852 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               Ignore this option in SP to avoid problem with query cache and
@@ -42758,182 +42763,182 @@
             */
             (yyval.lock_type)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
-#line 42762 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2558:
-#line 14834 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14859 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lock_type)= TL_WRITE_LOW_PRIORITY; }
-#line 42768 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2559:
-#line 14838 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14863 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->duplicates=DUP_ERROR; }
-#line 42774 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2560:
-#line 14839 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14864 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->duplicates=DUP_REPLACE; }
-#line 42780 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2561:
-#line 14840 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14865 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ignore= 1; }
-#line 42786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42791 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2566:
-#line 14855 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14880 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->field_term= (yyvsp[0].string);
           }
-#line 42795 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2567:
-#line 14860 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14885 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             DBUG_ASSERT(lex->exchange != 0);
             lex->exchange->enclosed= (yyvsp[0].string);
             lex->exchange->opt_enclosed= 1;
           }
-#line 42806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42811 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2568:
-#line 14867 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14892 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->enclosed= (yyvsp[0].string);
           }
-#line 42815 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42820 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2569:
-#line 14872 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14897 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->escaped= (yyvsp[0].string);
           }
-#line 42824 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42829 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2574:
-#line 14890 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14915 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->line_term= (yyvsp[0].string);
           }
-#line 42833 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42838 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2575:
-#line 14895 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14920 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->line_start= (yyvsp[0].string);
           }
-#line 42842 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42847 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2576:
-#line 14902 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14927 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 42848 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42853 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2577:
-#line 14904 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14929 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->exchange->line_term = (yyvsp[0].string); }
-#line 42854 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42859 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2579:
-#line 14909 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14935 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             DBUG_ASSERT(Lex->exchange != 0);
             Lex->exchange->skip_lines= atol((yyvsp[-1].lex_str).str);
           }
-#line 42863 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42868 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2580:
-#line 14916 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14942 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 42869 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42874 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2581:
-#line 14917 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14943 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 42875 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42880 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2582:
-#line 14921 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14947 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42881 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42886 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2583:
-#line 14922 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14948 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42887 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42892 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2584:
-#line 14923 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42893 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42898 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2585:
-#line 14928 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14954 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 42899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42904 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2586:
-#line 14930 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14956 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->field_list.push_back((yyvsp[0].item), thd->mem_root); }
-#line 42905 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42910 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2587:
-#line 14934 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14960 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {(yyval.item)= (yyvsp[0].item);}
-#line 42911 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42916 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2588:
-#line 14936 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14962 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_user_var_as_out_param(thd, &(yyvsp[0].lex_str));
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 42921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42926 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2589:
-#line 14944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14970 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42927 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42932 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2590:
-#line 14945 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 42933 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42938 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2593:
-#line 14955 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14981 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->update_list.push_back((yyvsp[-4].item), thd->mem_root)) ||
@@ -42941,47 +42946,47 @@
                 MYSQL_YYABORT;
             (yyvsp[-1].item)->set_name_no_truncate(thd, (yyvsp[-2].simple_string), (uint) ((yyvsp[0].simple_string) - (yyvsp[-2].simple_string)), thd->charset());
           }
-#line 42945 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42950 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2594:
-#line 14968 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14994 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal((yyvsp[0].lex_string_with_metadata)))))
               MYSQL_YYABORT;
           }
-#line 42954 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42959 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2595:
-#line 14973 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 14999 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_nchar((yyvsp[0].lex_string_with_metadata)))))
               MYSQL_YYABORT;
           }
-#line 42963 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42968 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2596:
-#line 14978 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15004 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= thd->make_string_literal_charset((yyvsp[0].lex_string_with_metadata), (yyvsp[-1].charset)))))
               MYSQL_YYABORT;
           }
-#line 42972 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42977 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2597:
-#line 14983 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15009 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_basic_constant)= (yyvsp[-1].item_basic_constant)->make_string_literal_concat(thd, &(yyvsp[0].lex_str)))))
               MYSQL_YYABORT;
           }
-#line 42981 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42986 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2598:
-#line 14991 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15017 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.string)= new (thd->mem_root) String((yyvsp[0].lex_str).str,
                                              (yyvsp[0].lex_str).length,
@@ -42989,17 +42994,17 @@
             if (unlikely((yyval.string) == NULL))
               MYSQL_YYABORT;
           }
-#line 42993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 42998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2599:
-#line 14998 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15024 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.string)= (yyvsp[0].string); }
-#line 42999 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43004 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2600:
-#line 15004 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15030 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *tmp= new (thd->mem_root) Item_hex_hybrid(thd, (yyvsp[0].lex_str).str,
                                                            (yyvsp[0].lex_str).length);
@@ -43012,11 +43017,11 @@
             tmp->quick_fix_field();
             (yyval.string)= tmp->val_str((String*) 0);
           }
-#line 43016 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43021 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2601:
-#line 15017 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15043 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *tmp= new (thd->mem_root) Item_hex_string(thd, (yyvsp[0].lex_str).str,
                                                            (yyvsp[0].lex_str).length);
@@ -43025,11 +43030,11 @@
             tmp->quick_fix_field();
             (yyval.string)= tmp->val_str((String*) 0);
           }
-#line 43029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43034 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2602:
-#line 15026 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15052 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item *tmp= new (thd->mem_root) Item_bin_string(thd, (yyvsp[0].lex_str).str,
                                                            (yyvsp[0].lex_str).length);
@@ -43042,76 +43047,76 @@
             tmp->quick_fix_field();
             (yyval.string)= tmp->val_str((String*) 0);
           }
-#line 43046 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43051 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2603:
-#line 15042 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15068 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, ¶m_clex_str,
                                                     YYLIP->get_tok_start(),
                                                     YYLIP->get_tok_start() + 1))))
               MYSQL_YYABORT;
           }
-#line 43057 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43062 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2604:
-#line 15049 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15075 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
                                                     (yyvsp[-1].kwd).pos(), (yyvsp[0].ident_cli).end()))))
               MYSQL_YYABORT;
           }
-#line 43067 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43072 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2605:
-#line 15055 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15081 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item_param)= Lex->add_placeholder(thd, &null_clex_str,
                                                     (yyvsp[-1].kwd).pos(),
                                                     YYLIP->get_ptr()))))
               MYSQL_YYABORT;
           }
-#line 43078 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43083 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2606:
-#line 15064 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15090 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item_num); }
-#line 43084 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43089 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2607:
-#line 15066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15092 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[0].item_num)->max_length++;
             (yyval.item)= (yyvsp[0].item_num)->neg(thd);
           }
-#line 43093 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43098 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2608:
-#line 15073 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15099 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item_basic_constant); }
-#line 43099 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43104 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2609:
-#line 15074 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15100 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item) = (yyvsp[0].item_num); }
-#line 43105 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43110 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2610:
-#line 15075 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15101 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)= (yyvsp[0].item); }
-#line 43111 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43116 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2611:
-#line 15077 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15103 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               For the digest computation, in this context only,
@@ -43125,61 +43130,61 @@
               MYSQL_YYABORT;
             YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT;
           }
-#line 43129 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43134 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2612:
-#line 15091 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15117 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "FALSE",0);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2613:
-#line 15097 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)= new (thd->mem_root) Item_bool(thd, (char*) "TRUE",1);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2614:
-#line 15103 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15129 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43159 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43164 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2615:
-#line 15109 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15135 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43174 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2616:
-#line 15115 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15141 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 43179 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43184 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2617:
-#line 15121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Item_string_with_introducer *item_str;
             /*
@@ -43195,11 +43200,11 @@
 
             (yyval.item)= item_str;
           }
-#line 43199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43204 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2618:
-#line 15140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             int error;
             (yyval.item_num)= new (thd->mem_root)
@@ -43209,11 +43214,11 @@
             if (unlikely((yyval.item_num) == NULL))
               MYSQL_YYABORT;
           }
-#line 43213 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43218 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2619:
-#line 15150 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15176 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             int error;
             (yyval.item_num)= new (thd->mem_root)
@@ -43223,42 +43228,42 @@
             if (unlikely((yyval.item_num) == NULL))
               MYSQL_YYABORT;
           }
-#line 43227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43232 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2620:
-#line 15160 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15186 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item_num) == NULL))
               MYSQL_YYABORT;
           }
-#line 43237 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43242 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2621:
-#line 15166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15192 "/home/buildbot/git/sql/sql_yacc_ora.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());
             if (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
               MYSQL_YYABORT;
           }
-#line 43248 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43253 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2622:
-#line 15173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15199 "/home/buildbot/git/sql/sql_yacc_ora.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 (unlikely((yyval.item_num) == NULL) || unlikely(thd->is_error()))
               MYSQL_YYABORT;
           }
-#line 43258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43263 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2623:
-#line 15183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15209 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
                                                        YYCSCL,
@@ -43266,11 +43271,11 @@
                                                        true))))
               MYSQL_YYABORT;
           }
-#line 43270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43275 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2624:
-#line 15191 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15217 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
                                                        YYCSCL,
@@ -43278,11 +43283,11 @@
                                                        true))))
               MYSQL_YYABORT;
           }
-#line 43282 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43287 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2625:
-#line 15199 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= create_temporal_literal(thd, (yyvsp[0].lex_string_with_metadata).str, (yyvsp[0].lex_string_with_metadata).length,
                                                        YYCSCL,
@@ -43290,25 +43295,25 @@
                                                        true))))
               MYSQL_YYABORT;
           }
-#line 43294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43299 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2626:
-#line 15210 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15236 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.with_clause)= 0; }
-#line 43300 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43305 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2627:
-#line 15212 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15238 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.with_clause)= (yyvsp[0].with_clause);
           }
-#line 43308 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43313 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2628:
-#line 15220 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15246 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
              With_clause *with_clause=
              new With_clause((yyvsp[0].num), Lex->curr_with_clause);
@@ -43318,43 +43323,43 @@
              Lex->curr_with_clause= with_clause;
              with_clause->add_to_list(Lex->with_clauses_list_last_next);
           }
-#line 43322 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43327 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2629:
-#line 15230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15256 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.with_clause)= Lex->curr_with_clause;
             Lex->curr_with_clause= Lex->curr_with_clause->pop();
           }
-#line 43331 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43336 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2630:
-#line 15238 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15264 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 43337 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43342 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2631:
-#line 15239 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15265 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 43343 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43348 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2634:
-#line 15252 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15278 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyvsp[0].lex_str_list)= new List (Lex->with_column_list);
             if (unlikely((yyvsp[0].lex_str_list) == NULL))
               MYSQL_YYABORT;
             Lex->with_column_list.empty();
           }
-#line 43354 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43359 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2635:
-#line 15259 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             const char *query_start= lex->sphead ? lex->sphead->m_tmp_query
@@ -43368,203 +43373,203 @@
                                         spec_start - query_start))
               MYSQL_YYABORT;
 	  }
-#line 43372 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2636:
-#line 15277 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15303 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str_list)= NULL; }
-#line 43378 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43383 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2637:
-#line 15279 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15305 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str_list)= NULL; }
-#line 43384 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43389 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2638:
-#line 15285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15311 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->with_column_list.push_back((LEX_CSTRING*)
                     thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)));
 	  }
-#line 43393 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2639:
-#line 15290 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15316 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->with_column_list.push_back((LEX_CSTRING*)
                     thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)));
           }
-#line 43402 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43407 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2640:
-#line 15299 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15325 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.lex_str_ptr)= (LEX_CSTRING *) thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING));
             if (unlikely((yyval.lex_str_ptr) == NULL))
               MYSQL_YYABORT;
           }
-#line 43412 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2641:
-#line 15313 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15339 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 43418 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2642:
-#line 15314 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15340 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 43424 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43429 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2643:
-#line 15319 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15345 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43433 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43438 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2644:
-#line 15324 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15350 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43442 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2645:
-#line 15332 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15358 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-2].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43451 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43456 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2646:
-#line 15337 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15363 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_qualified_asterisk(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2647:
-#line 15344 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15370 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 43466 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2648:
-#line 15350 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15376 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43475 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43480 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2649:
-#line 15355 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15381 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43484 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43489 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2650:
-#line 15360 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15386 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex_ident_cli empty((yyvsp[-2].ident_cli).pos(), 0);
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &empty, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43494 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2651:
-#line 15366 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15392 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_cli), &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43503 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43508 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2652:
-#line 15371 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15397 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43512 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43517 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2653:
-#line 15379 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident_nosp(thd, &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43521 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43526 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2654:
-#line 15384 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15410 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident_nospvar(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43530 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43535 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2655:
-#line 15389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15415 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->make_item_colon_ident_ident(thd, &(yyvsp[-2].ident_cli), &(yyvsp[0].ident_cli)))))
               MYSQL_YYABORT;
           }
-#line 43539 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43544 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2656:
-#line 15394 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex_ident_sys none;
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &none, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43549 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2657:
-#line 15400 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15426 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.item)= Lex->create_item_ident(thd, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys)))))
               MYSQL_YYABORT;
           }
-#line 43558 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43563 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2658:
-#line 15407 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys);}
-#line 43564 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43569 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2659:
-#line 15409 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15435 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             TABLE_LIST *table= Select->table_list.first;
             if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-4].ident_sys).str,
@@ -43575,11 +43580,11 @@
               my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
             (yyval.lex_str)=(yyvsp[0].ident_sys);
           }
-#line 43579 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43584 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2660:
-#line 15420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             TABLE_LIST *table= Select->table_list.first;
             if (unlikely(my_strcasecmp(table_alias_charset, (yyvsp[-2].ident_sys).str,
@@ -43587,224 +43592,224 @@
               my_yyabort_error((ER_WRONG_TABLE_NAME, MYF(0), (yyvsp[-2].ident_sys).str));
             (yyval.lex_str)=(yyvsp[0].ident_sys);
           }
-#line 43591 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2661:
-#line 15427 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15453 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys);}
-#line 43597 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43602 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2662:
-#line 15432 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15458 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 43607 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43612 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2663:
-#line 15438 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15464 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-2].ident_sys), &(yyvsp[0].ident_sys), 0);
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 43617 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43622 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2664:
-#line 15444 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15470 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /* For Delphi */
             (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[0].ident_sys));
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 43628 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43633 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2665:
-#line 15454 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(&(yyvsp[-1].ident_sys));
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 43638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43643 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2666:
-#line 15460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15486 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.table)= new (thd->mem_root) Table_ident(thd, &(yyvsp[-3].ident_sys), &(yyvsp[-1].ident_sys), 0);
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 43648 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43653 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2667:
-#line 15469 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING db={(char*) any_db,3};
             (yyval.table)= new (thd->mem_root) Table_ident(thd, &db, &(yyvsp[0].ident_sys), 0);
             if (unlikely((yyval.table) == NULL))
               MYSQL_YYABORT;
           }
-#line 43659 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43664 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2672:
-#line 15485 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15511 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ident_cli)= (yyvsp[0].kwd); }
-#line 43665 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2673:
-#line 15490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(thd->to_ident_sys_alloc(&(yyval.ident_sys), &(yyvsp[0].ident_cli))))
               MYSQL_YYABORT;
           }
-#line 43674 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43679 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2674:
-#line 15498 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15524 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (thd->make_text_string_sys(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
               MYSQL_YYABORT;
           }
-#line 43683 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2675:
-#line 15506 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15532 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (thd->make_text_string_connection(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
               MYSQL_YYABORT;
           }
-#line 43692 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2676:
-#line 15514 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (thd->make_text_string_filesystem(&(yyval.lex_str), &(yyvsp[0].lex_string_with_metadata)))
               MYSQL_YYABORT;
           }
-#line 43701 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43706 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2678:
-#line 15523 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15549 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 43710 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43715 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2680:
-#line 15532 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15558 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 43719 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2682:
-#line 15541 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15567 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 43728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43733 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2683:
-#line 15546 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15572 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_sys(thd, &(yyvsp[0].lex_str))))
               MYSQL_YYABORT;
           }
-#line 43737 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2685:
-#line 15556 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 43746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43751 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2687:
-#line 15565 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15591 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 43755 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43760 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2689:
-#line 15575 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15601 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyval.ident_sys).copy_keyword(thd, &(yyvsp[0].kwd))))
               MYSQL_YYABORT;
           }
-#line 43764 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43769 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2690:
-#line 15582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15608 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 43770 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43775 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2691:
-#line 15583 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15609 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].lex_str); }
-#line 43776 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43781 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2692:
-#line 15588 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15614 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_push_goto_label(thd, &(yyvsp[-1].ident_sys))))
               MYSQL_YYABORT;
             (yyval.lex_str)= (yyvsp[-1].ident_sys);
           }
-#line 43786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43791 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2693:
-#line 15596 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15622 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].ident_sys);}
-#line 43792 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43797 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2694:
-#line 15597 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 43798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43803 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2695:
-#line 15598 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15624 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)=(yyvsp[0].lex_str);}
-#line 43804 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2696:
-#line 15603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15629 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
@@ -43817,11 +43822,11 @@
                                                   system_charset_info, 0)))
               MYSQL_YYABORT;
           }
-#line 43821 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43826 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2697:
-#line 15616 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15642 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->alloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
@@ -43851,11 +43856,11 @@
               (yyval.lex_user)->host= host_not_specified;
             }
           }
-#line 43855 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2698:
-#line 15646 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15672 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*)thd->calloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
@@ -43863,46 +43868,46 @@
             (yyval.lex_user)->plugin= empty_clex_str;
             (yyval.lex_user)->auth= empty_clex_str;
           }
-#line 43867 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43872 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 2701:
-#line 15658 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 15684 "/home/buildbot/git/sql/sql_yacc_ora.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 43877 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43882 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3185:
-#line 16277 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16303 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->set_stmt_init();
             lex->var_list.empty();
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 43888 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43893 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3186:
-#line 16284 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16310 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 43894 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3187:
-#line 16286 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16312 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->set_stmt_init();
           }
-#line 43902 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43907 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3188:
-#line 16290 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16316 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->table_or_sp_used()))
@@ -43910,49 +43915,49 @@
             lex->stmt_var_list= lex->var_list;
             lex->var_list.empty();
           }
-#line 43914 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3189:
-#line 16298 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16324 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 43920 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43925 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3190:
-#line 16303 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16329 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->set_stmt_init();
             lex->var_list.empty();
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 43931 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43936 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3191:
-#line 16310 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16336 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
                 unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 43941 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43946 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3192:
-#line 16316 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16342 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->set_stmt_init();
             lex->var_list.empty();
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 43952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43957 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3193:
-#line 16323 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16349 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             DBUG_ASSERT(lex->var_list.is_empty());
@@ -43960,11 +43965,11 @@
                 unlikely(lex->sphead->restore_lex(thd)))
               MYSQL_YYABORT;
           }
-#line 43964 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43969 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3194:
-#line 16331 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16357 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(!lex->is_trigger_new_or_old_reference(&(yyvsp[-3].ident_sys))))
@@ -43976,272 +43981,272 @@
             lex->var_list.empty();
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 43980 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43985 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3195:
-#line 16343 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16369 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX_CSTRING tmp= { (yyvsp[-5].ident_sys).str, (yyvsp[-5].ident_sys).length };
             if (unlikely(Lex->set_trigger_field(&tmp, &(yyvsp[-3].ident_sys), (yyvsp[0].item))) ||
                 unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 43991 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 43996 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3198:
-#line 16364 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16390 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44000 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44005 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3200:
-#line 16370 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16396 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->option_type= OPT_DEFAULT;
           }
-#line 44008 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44013 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3201:
-#line 16374 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16400 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44022 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3202:
-#line 16379 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->option_type= (yyvsp[0].var_type);
           }
-#line 44025 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44030 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3204:
-#line 16389 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16415 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44034 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44039 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3206:
-#line 16395 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16421 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44043 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44048 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3209:
-#line 16409 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16435 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 44051 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44056 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3210:
-#line 16413 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44060 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44065 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3211:
-#line 16418 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16444 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             sp_create_assignment_lex(thd, yychar == YYEMPTY);
           }
-#line 44068 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44073 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3212:
-#line 16422 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16448 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(sp_create_assignment_instr(thd, yychar == YYEMPTY)))
               MYSQL_YYABORT;
           }
-#line 44077 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44082 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3213:
-#line 16431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16457 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->option_type= (yyvsp[0].var_type);
           }
-#line 44085 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44090 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3216:
-#line 16439 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16465 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_GLOBAL; }
-#line 44091 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44096 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3217:
-#line 16440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44097 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44102 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3218:
-#line 16441 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16467 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44103 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3219:
-#line 16445 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16471 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44109 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44114 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3220:
-#line 16446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16472 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_GLOBAL; }
-#line 44115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44120 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3221:
-#line 16447 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16473 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44121 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3222:
-#line 16448 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16474 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3223:
-#line 16452 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16478 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_DEFAULT; }
-#line 44133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44138 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3224:
-#line 16453 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16479 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_GLOBAL; }
-#line 44139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3225:
-#line 16454 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44145 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44150 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3226:
-#line 16455 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16481 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.var_type)=OPT_SESSION; }
-#line 44151 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44156 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3227:
-#line 16461 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16487 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable(Lex->option_type, &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44160 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44165 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3228:
-#line 16466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16492 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable(thd, Lex->option_type, &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44174 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3229:
-#line 16471 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16497 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44178 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44183 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3230:
-#line 16480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16506 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3231:
-#line 16485 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16511 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44196 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44201 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3232:
-#line 16490 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16516 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_default_system_variable(Lex->option_type, &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3233:
-#line 16495 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16521 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_user_variable(thd, &(yyvsp[-2].lex_str), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44214 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44219 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3234:
-#line 16500 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16526 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable((yyvsp[-3].var_type), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44223 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3235:
-#line 16505 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16531 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_system_variable(thd, (yyvsp[-5].var_type), &(yyvsp[-4].ident_sys), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44232 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44237 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3236:
-#line 16510 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16536 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_default_system_variable((yyvsp[-5].var_type), &(yyvsp[-2].ident_sys), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3237:
-#line 16515 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16541 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             CHARSET_INFO *cs2;
@@ -44255,11 +44260,11 @@
               MYSQL_YYABORT;
             lex->var_list.push_back(var, thd->mem_root);
           }
-#line 44259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44264 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3238:
-#line 16529 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16555 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             sp_pcontext *spc= lex->spcont;
@@ -44270,11 +44275,11 @@
               thd->parse_error();
             MYSQL_YYABORT;
           }
-#line 44274 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44279 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3239:
-#line 16540 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16566 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             CHARSET_INFO *cs2;
@@ -44293,11 +44298,11 @@
                 unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44297 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44302 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3240:
-#line 16559 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16585 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             LEX_USER *user;
@@ -44315,11 +44320,11 @@
             if (lex->sphead)
               lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
           }
-#line 44319 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44324 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3241:
-#line 16577 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             set_var_default_role *var= (new (thd->mem_root)
@@ -44331,11 +44336,11 @@
             if (lex->sphead)
               lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
           }
-#line 44335 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44340 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3242:
-#line 16589 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16615 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             set_var_role *var= new (thd->mem_root) set_var_role((yyvsp[0].lex_str));
@@ -44343,20 +44348,20 @@
                 unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44347 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44352 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3243:
-#line 16597 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->set_variable(&(yyvsp[-2].kwd), (yyvsp[0].item))))
               MYSQL_YYABORT;
           }
-#line 44356 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44361 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3244:
-#line 16602 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16628 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex = Lex;
             set_var_password *var= (new (thd->mem_root)
@@ -44368,11 +44373,11 @@
             if (lex->sphead)
               lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT;
           }
-#line 44372 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44377 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3249:
-#line 16625 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16651 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].num));
@@ -44388,11 +44393,11 @@
             if (unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44392 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44397 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3250:
-#line 16644 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16670 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             Item *item= new (thd->mem_root) Item_int(thd, (int32) (yyvsp[0].tx_isolation));
@@ -44407,47 +44412,47 @@
                 unlikely(lex->var_list.push_back(var, thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44411 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44416 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3251:
-#line 16661 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16687 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= true; }
-#line 44417 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44422 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3252:
-#line 16662 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16688 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= false; }
-#line 44423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44428 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3253:
-#line 16666 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_READ_UNCOMMITTED; }
-#line 44429 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44434 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3254:
-#line 16667 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16693 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_READ_COMMITTED; }
-#line 44435 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44440 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3255:
-#line 16668 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16694 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_REPEATABLE_READ; }
-#line 44441 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44446 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3256:
-#line 16669 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.tx_isolation)= ISO_SERIALIZABLE; }
-#line 44447 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44452 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3257:
-#line 16674 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16700 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             sp_pcontext *spc= lex->spcont;
@@ -44462,82 +44467,82 @@
             lex->definer->plugin= empty_clex_str;
             lex->definer->auth=   empty_clex_str;
           }
-#line 44466 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44471 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3258:
-#line 16688 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16714 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->definer= (yyvsp[-1].lex_user); }
-#line 44472 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44477 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3259:
-#line 16692 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16718 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->definer->pwhash= (yyvsp[0].lex_string_with_metadata);}
-#line 44478 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44483 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3260:
-#line 16693 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->definer->pwtext= (yyvsp[-1].lex_string_with_metadata); }
-#line 44484 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44489 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3261:
-#line 16695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16721 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->definer->pwtext= (yyvsp[-1].lex_string_with_metadata);
             Lex->definer->pwhash.str= Item_func_password::alloc(thd,
                                    (yyvsp[-1].lex_string_with_metadata).str, (yyvsp[-1].lex_string_with_metadata).length, Item_func_password::OLD);
             Lex->definer->pwhash.length=  SCRAMBLED_PASSWORD_CHAR_LENGTH_323;
           }
-#line 44495 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44500 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3262:
-#line 16704 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)=(yyvsp[0].item); }
-#line 44501 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44506 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3263:
-#line 16705 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16731 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.item)=0; }
-#line 44507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44512 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3264:
-#line 16707 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16733 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ON",  2);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 44517 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44522 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3265:
-#line 16713 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16739 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "ALL", 3);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 44527 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44532 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3266:
-#line 16719 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16745 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.item)=new (thd->mem_root) Item_string_sys(thd, "binary", 6);
             if (unlikely((yyval.item) == NULL))
               MYSQL_YYABORT;
           }
-#line 44537 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44542 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3267:
-#line 16730 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16756 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -44545,55 +44550,55 @@
               my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "LOCK"));
             lex->sql_command= SQLCOM_LOCK_TABLES;
           }
-#line 44549 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44554 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3268:
-#line 16738 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16764 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 44555 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3269:
-#line 16743 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16769 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 44561 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44566 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3270:
-#line 16745 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16771 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), (yyvsp[0].ulong_num))) ||
               unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), (yyvsp[0].ulong_num))))
             MYSQL_YYABORT;
         }
-#line 44571 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3271:
-#line 16751 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16777 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
           if (unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("lock_wait_timeout"), 0)) ||
               unlikely(set_statement_var_if_exists(thd, STRING_WITH_LEN("innodb_lock_wait_timeout"), 0)))
             MYSQL_YYABORT;
         }
-#line 44581 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3272:
-#line 16759 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16785 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 44587 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44592 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3273:
-#line 16760 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16786 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { }
-#line 44593 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44598 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3276:
-#line 16770 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16796 "/home/buildbot/git/sql/sql_yacc_ora.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);
@@ -44609,43 +44614,43 @@
                                            lock_type, mdl_type)))
               MYSQL_YYABORT;
           }
-#line 44613 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44618 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3277:
-#line 16788 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16814 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_READ_NO_INSERT; }
-#line 44619 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44624 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3278:
-#line 16789 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16815 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_WRITE_DEFAULT; }
-#line 44625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44630 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3279:
-#line 16791 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16817 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.num)= (Lex->sphead ? TL_WRITE_DEFAULT : TL_WRITE_CONCURRENT_INSERT);
           }
-#line 44633 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3280:
-#line 16795 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16821 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_WRITE_LOW_PRIORITY; }
-#line 44639 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44644 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3281:
-#line 16796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16822 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= TL_READ; }
-#line 44645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44650 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3282:
-#line 16801 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16827 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
 
@@ -44653,17 +44658,17 @@
               my_yyabort_error((ER_SP_BADSTATEMENT, MYF(0), "UNLOCK"));
             lex->sql_command= SQLCOM_UNLOCK_TABLES;
           }
-#line 44657 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44662 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3283:
-#line 16809 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16835 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 44663 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3284:
-#line 16818 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16844 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sphead))
@@ -44673,11 +44678,11 @@
                                                                  0)))
               MYSQL_YYABORT;
           }
-#line 44677 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44682 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3285:
-#line 16828 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16854 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->sphead))
@@ -44687,11 +44692,11 @@
                                                                  0)))
               MYSQL_YYABORT;
           }
-#line 44691 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44696 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3286:
-#line 16838 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16864 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->sphead))
@@ -44709,11 +44714,11 @@
                                                                  0)))
               MYSQL_YYABORT;
           }
-#line 44713 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3287:
-#line 16856 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16882 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->expr_allows_subselect= TRUE;
             /* Stored functions are not supported for HANDLER READ. */
@@ -44724,59 +44729,59 @@
               MYSQL_YYABORT;
             }
           }
-#line 44728 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44733 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3288:
-#line 16869 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16895 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ident= null_clex_str; }
-#line 44734 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44739 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3289:
-#line 16870 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ident= (yyvsp[-1].ident_sys); }
-#line 44740 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44745 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3290:
-#line 16874 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16900 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RFIRST; }
-#line 44746 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44751 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3291:
-#line 16875 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16901 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RNEXT;  }
-#line 44752 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44757 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3292:
-#line 16879 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RFIRST; }
-#line 44758 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44763 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3293:
-#line 16880 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16906 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RNEXT;  }
-#line 44764 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44769 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3294:
-#line 16881 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16907 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RPREV;  }
-#line 44770 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44775 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3295:
-#line 16882 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16908 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->ha_read_mode = RLAST;  }
-#line 44776 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44781 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3296:
-#line 16884 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16910 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->ha_read_mode = RKEY;
@@ -44784,211 +44789,211 @@
             if (unlikely(!(lex->insert_list= new (thd->mem_root) List_item)))
               MYSQL_YYABORT;
           }
-#line 44788 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44793 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3297:
-#line 16892 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 44794 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44799 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3298:
-#line 16896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16922 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_KEY_EXACT;   }
-#line 44800 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44805 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3299:
-#line 16897 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16923 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_NEXT; }
-#line 44806 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44811 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3300:
-#line 16898 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_KEY_OR_PREV; }
-#line 44812 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44817 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3301:
-#line 16899 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16925 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_AFTER_KEY;   }
-#line 44818 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44823 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3302:
-#line 16900 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16926 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.ha_rkey_mode)=HA_READ_BEFORE_KEY;  }
-#line 44824 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44829 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3303:
-#line 16907 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16933 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 44830 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44835 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3304:
-#line 16912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16938 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_REVOKE;
             lex->type= 0;
           }
-#line 44840 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3305:
-#line 16918 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                                                 TYPE_ENUM_FUNCTION)))
               MYSQL_YYABORT;
           }
-#line 44850 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44855 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3306:
-#line 16924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16950 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                          TYPE_ENUM_PROCEDURE)))
               MYSQL_YYABORT;
           }
-#line 44860 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44865 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3307:
-#line 16931 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16957 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                                                 TYPE_ENUM_PACKAGE)))
               MYSQL_YYABORT;
           }
-#line 44870 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44875 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3308:
-#line 16938 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16964 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_REVOKE,
                                                 TYPE_ENUM_PACKAGE_BODY)))
               MYSQL_YYABORT;
           }
-#line 44880 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44885 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3309:
-#line 16944 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16970 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_REVOKE_ALL;
           }
-#line 44888 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44893 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3310:
-#line 16948 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16974 "/home/buildbot/git/sql/sql_yacc_ora.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 44899 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44904 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3311:
-#line 16955 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16981 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_REVOKE_ROLE;
             if (unlikely(Lex->users_list.push_front((yyvsp[-2].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 44909 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44914 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3312:
-#line 16964 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16990 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= true; (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 44915 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44920 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3313:
-#line 16966 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16992 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= false; (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 44921 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44926 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3314:
-#line 16971 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 16997 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 44927 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44932 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3315:
-#line 16977 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17003 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_GRANT;
             lex->type= 0;
           }
-#line 44937 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3316:
-#line 16984 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17010 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_FUNCTION)))
               MYSQL_YYABORT;
           }
-#line 44947 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44952 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3317:
-#line 16991 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17017 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_PROCEDURE)))
               MYSQL_YYABORT;
           }
-#line 44957 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44962 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3318:
-#line 16998 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17024 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_PACKAGE)))
               MYSQL_YYABORT;
           }
-#line 44967 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44972 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3319:
-#line 17005 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17031 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_grant_command(thd, SQLCOM_GRANT,
                                                 TYPE_ENUM_PACKAGE_BODY)))
               MYSQL_YYABORT;
           }
-#line 44977 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44982 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3320:
-#line 17011 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17037 "/home/buildbot/git/sql/sql_yacc_ora.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 44988 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 44993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3321:
-#line 17018 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17044 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_GRANT_ROLE;
@@ -44996,64 +45001,64 @@
             if (unlikely(Lex->users_list.push_front((yyvsp[-3].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45000 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45005 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3322:
-#line 17029 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17055 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->definer = 0; }
-#line 45006 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45011 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3323:
-#line 17030 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17056 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->definer = (yyvsp[0].lex_user); }
-#line 45012 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3324:
-#line 17033 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17060 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= false; }
-#line 45018 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3325:
-#line 17034 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17061 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->with_admin_option= true; }
-#line 45024 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3326:
-#line 17038 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17066 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45033 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45038 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3327:
-#line 17043 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17071 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45042 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45047 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3328:
-#line 17051 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17079 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(!((yyval.lex_user)=(LEX_USER*) thd->calloc(sizeof(LEX_USER)))))
               MYSQL_YYABORT;
             (yyval.lex_user)->user= current_role;
             (yyval.lex_user)->reset_auth();
           }
-#line 45053 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45058 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3329:
-#line 17061 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17089 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             CHARSET_INFO *cs= system_charset_info;
             /* trim end spaces (as they'll be lost in mysql.user anyway) */
@@ -45072,281 +45077,281 @@
                                                   cs, 0)))
               MYSQL_YYABORT;
           }
-#line 45076 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45081 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3333:
-#line 17088 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17116 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45082 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45087 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3334:
-#line 17090 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17118 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             Lex->all_privileges= 1; 
             Lex->grant= GLOBAL_ACLS;
           }
-#line 45091 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45096 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3339:
-#line 17108 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17136 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->which_columns = SELECT_ACL;}
-#line 45097 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45102 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3340:
-#line 17109 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17137 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45103 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3341:
-#line 17111 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17139 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->which_columns = INSERT_ACL;}
-#line 45109 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45114 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3342:
-#line 17112 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45120 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3343:
-#line 17114 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17142 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->which_columns = UPDATE_ACL; }
-#line 45121 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3344:
-#line 17115 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17143 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3345:
-#line 17117 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->which_columns = REFERENCES_ACL;}
-#line 45133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45138 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3346:
-#line 17118 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17146 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3347:
-#line 17119 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= DELETE_ACL;}
-#line 45145 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45150 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3348:
-#line 17120 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17148 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45151 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45156 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3349:
-#line 17121 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17149 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= INDEX_ACL;}
-#line 45157 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45162 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3350:
-#line 17122 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17150 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= ALTER_ACL;}
-#line 45163 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45168 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3351:
-#line 17123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17151 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_ACL;}
-#line 45169 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45174 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3352:
-#line 17124 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17152 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= DROP_ACL;}
-#line 45175 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3353:
-#line 17125 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17153 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= EXECUTE_ACL;}
-#line 45181 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45186 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3354:
-#line 17126 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17154 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= RELOAD_ACL;}
-#line 45187 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45192 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3355:
-#line 17127 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17155 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= SHUTDOWN_ACL;}
-#line 45193 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45198 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3356:
-#line 17128 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17156 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= PROCESS_ACL;}
-#line 45199 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45204 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3357:
-#line 17129 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17157 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= FILE_ACL;}
-#line 45205 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45210 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3358:
-#line 17130 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17158 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= GRANT_ACL;}
-#line 45211 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45216 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3359:
-#line 17131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17159 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= SHOW_DB_ACL;}
-#line 45217 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45222 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3360:
-#line 17132 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17160 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= SUPER_ACL;}
-#line 45223 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45228 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3361:
-#line 17133 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17161 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_TMP_ACL;}
-#line 45229 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45234 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3362:
-#line 17134 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17162 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= LOCK_TABLES_ACL; }
-#line 45235 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45240 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3363:
-#line 17135 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17163 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= REPL_SLAVE_ACL; }
-#line 45241 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45246 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3364:
-#line 17136 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17164 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= REPL_CLIENT_ACL; }
-#line 45247 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45252 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3365:
-#line 17137 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17165 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_VIEW_ACL; }
-#line 45253 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45258 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3366:
-#line 17138 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17166 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= SHOW_VIEW_ACL; }
-#line 45259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45264 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3367:
-#line 17139 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17167 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_PROC_ACL; }
-#line 45265 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45270 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3368:
-#line 17140 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17168 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= ALTER_PROC_ACL; }
-#line 45271 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45276 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3369:
-#line 17141 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17169 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_USER_ACL; }
-#line 45277 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45282 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3370:
-#line 17142 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17170 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= EVENT_ACL;}
-#line 45283 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45288 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3371:
-#line 17143 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17171 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= TRIGGER_ACL; }
-#line 45289 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45294 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3372:
-#line 17144 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17172 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= CREATE_TABLESPACE_ACL; }
-#line 45295 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45300 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3373:
-#line 17145 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= DELETE_HISTORY_ACL; }
-#line 45301 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45306 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3374:
-#line 17149 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17177 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45307 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45312 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3375:
-#line 17150 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17178 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45313 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45318 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3378:
-#line 17160 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17188 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->x509_subject))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "SUBJECT"));
             lex->x509_subject=(yyvsp[0].lex_string_with_metadata).str;
           }
-#line 45324 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45329 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3379:
-#line 17167 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17195 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->x509_issuer))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "ISSUER"));
             lex->x509_issuer=(yyvsp[0].lex_string_with_metadata).str;
           }
-#line 45335 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45340 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3380:
-#line 17174 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17202 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(lex->ssl_cipher))
               my_yyabort_error((ER_DUP_ARGUMENT, MYF(0), "CIPHER"));
             lex->ssl_cipher=(yyvsp[0].lex_string_with_metadata).str;
           }
-#line 45346 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45351 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3381:
-#line 17184 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17212 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             if (unlikely(lex->copy_db_to(&lex->current_select->db)))
@@ -45356,11 +45361,11 @@
             else if (unlikely(lex->columns.elements))
               my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
           }
-#line 45360 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45365 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3382:
-#line 17194 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17222 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->current_select->db= (yyvsp[-2].ident_sys);
@@ -45369,11 +45374,11 @@
             else if (unlikely(lex->columns.elements))
               my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
           }
-#line 45373 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45378 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3383:
-#line 17203 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17231 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->current_select->db= null_clex_str;
@@ -45382,11 +45387,11 @@
             else if (unlikely(lex->columns.elements))
               my_yyabort_error((ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)));
           }
-#line 45386 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45391 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3384:
-#line 17212 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17240 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!lex->current_select->
@@ -45396,120 +45401,120 @@
             if (lex->grant == GLOBAL_ACLS)
               lex->grant =  TABLE_ACLS & ~GRANT_ACL;
           }
-#line 45400 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45405 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3385:
-#line 17225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17253 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45409 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45414 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3386:
-#line 17230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17258 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45418 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45423 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3387:
-#line 17238 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17266 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45427 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45432 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3388:
-#line 17243 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17271 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45436 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45441 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3389:
-#line 17251 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17279 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45445 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45450 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3390:
-#line 17256 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17284 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->users_list.push_back((yyvsp[0].lex_user), thd->mem_root)))
               MYSQL_YYABORT;
           }
-#line 45454 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45459 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3395:
-#line 17267 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17295 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.lex_user)= (yyvsp[-3].lex_user);
             (yyvsp[-3].lex_user)->pwtext= (yyvsp[0].lex_string_with_metadata);
             if (unlikely(Lex->sql_command == SQLCOM_REVOKE))
               MYSQL_YYABORT;
           }
-#line 45465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3396:
-#line 17274 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17302 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             (yyval.lex_user)= (yyvsp[-4].lex_user); 
             (yyvsp[-4].lex_user)->pwhash= (yyvsp[0].lex_string_with_metadata);
           }
-#line 45474 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45479 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3397:
-#line 17279 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17307 "/home/buildbot/git/sql/sql_yacc_ora.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_clex_str;
           }
-#line 45484 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45489 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3398:
-#line 17285 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17313 "/home/buildbot/git/sql/sql_yacc_ora.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 45494 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45499 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3399:
-#line 17291 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17319 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_user)= (yyvsp[0].lex_user); }
-#line 45500 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45505 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3400:
-#line 17296 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17324 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->grant |= lex->which_columns;
           }
-#line 45509 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45514 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3404:
-#line 17310 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17338 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             String *new_str= new (thd->mem_root) String((const char*) (yyvsp[0].ident_sys).str,(yyvsp[0].ident_sys).length,system_charset_info);
             if (unlikely(new_str == NULL))
@@ -45535,245 +45540,245 @@
               lex->columns.push_back(col, thd->mem_root);
             }
           }
-#line 45539 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45544 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3406:
-#line 17340 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17368 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_SPECIFIED;
           }
-#line 45547 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45552 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3407:
-#line 17344 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17372 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_ANY;
           }
-#line 45555 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45560 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3408:
-#line 17348 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17376 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_X509;
           }
-#line 45563 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45568 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3409:
-#line 17352 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17380 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->ssl_type=SSL_TYPE_NONE;
           }
-#line 45571 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45576 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3410:
-#line 17359 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17387 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->mqh.questions=(yyvsp[0].ulong_num);
             lex->mqh.specified_limits|= USER_RESOURCES::QUERIES_PER_HOUR;
           }
-#line 45581 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3411:
-#line 17365 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17393 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->mqh.updates=(yyvsp[0].ulong_num);
             lex->mqh.specified_limits|= USER_RESOURCES::UPDATES_PER_HOUR;
           }
-#line 45591 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45596 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3412:
-#line 17371 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17399 "/home/buildbot/git/sql/sql_yacc_ora.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 45601 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45606 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3413:
-#line 17377 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17405 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->mqh.user_conn= (yyvsp[0].num);
             lex->mqh.specified_limits|= USER_RESOURCES::USER_CONNECTIONS;
           }
-#line 45611 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45616 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3414:
-#line 17383 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17411 "/home/buildbot/git/sql/sql_yacc_ora.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 45621 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45626 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3415:
-#line 17391 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17419 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45627 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45632 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3416:
-#line 17392 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17420 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45633 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45638 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3417:
-#line 17396 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17424 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45639 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45644 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3419:
-#line 17402 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17430 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45645 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45650 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3420:
-#line 17403 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17431 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45651 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45656 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3421:
-#line 17407 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17435 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45657 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45662 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3422:
-#line 17408 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17436 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= GRANT_ACL;}
-#line 45663 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45668 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3423:
-#line 17412 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17440 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45669 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45674 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3424:
-#line 17413 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17441 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45680 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3425:
-#line 17417 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17445 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->grant |= GRANT_ACL;}
-#line 45681 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45686 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3426:
-#line 17418 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45687 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45692 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3427:
-#line 17423 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17451 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command = SQLCOM_BEGIN;
             lex->start_transaction_opt= 0;
           }
-#line 45697 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45702 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3428:
-#line 17428 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17456 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45703 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45708 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3429:
-#line 17433 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17461 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_COMPOUND;
             Lex->sphead->set_stmt_end(thd);
             Lex->sphead->restore_thd_mem_root(thd);
           }
-#line 45713 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3430:
-#line 17441 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17469 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 0; }
-#line 45719 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3431:
-#line 17442 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17470 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= 1; }
-#line 45725 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3432:
-#line 17446 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17474 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45731 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45736 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3433:
-#line 17447 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17475 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45737 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3434:
-#line 17452 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17480 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
-#line 45743 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45748 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3435:
-#line 17453 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17481 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_NO; }
-#line 45749 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45754 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3436:
-#line 17454 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17482 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_YES; }
-#line 45755 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45760 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3437:
-#line 17459 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17487 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_UNKNOWN; }
-#line 45761 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45766 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3438:
-#line 17460 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17488 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_YES; }
-#line 45767 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45772 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3439:
-#line 17461 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17489 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.m_yes_no_unk)= TVL_NO; }
-#line 45773 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45778 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3440:
-#line 17466 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17494 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_COMMIT;
@@ -45782,11 +45787,11 @@
             lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
             lex->tx_release= (yyvsp[0].m_yes_no_unk);
           }
-#line 45786 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45791 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3441:
-#line 17478 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17506 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK;
@@ -45795,84 +45800,84 @@
             lex->tx_chain= (yyvsp[-1].m_yes_no_unk);
             lex->tx_release= (yyvsp[0].m_yes_no_unk);
           }
-#line 45799 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45804 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3442:
-#line 17487 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17515 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 45809 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45814 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3443:
-#line 17493 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17521 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_ROLLBACK_TO_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 45819 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45824 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3444:
-#line 17502 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17530 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 45829 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45834 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3445:
-#line 17511 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17539 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             lex->sql_command= SQLCOM_RELEASE_SAVEPOINT;
             lex->ident= (yyvsp[0].ident_sys);
           }
-#line 45839 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45844 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3446:
-#line 17524 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17552 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.unit_type)= UNION_TYPE; }
-#line 45845 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45850 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3447:
-#line 17526 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17554 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.unit_type)= INTERSECT_TYPE; }
-#line 45851 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45856 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3448:
-#line 17528 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17556 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.unit_type)= EXCEPT_TYPE; }
-#line 45857 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45862 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3449:
-#line 17532 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17560 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 45863 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45868 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3451:
-#line 17538 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17566 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_select_to_union_list((bool)(yyvsp[0].num), (yyvsp[-1].unit_type), TRUE)))
               MYSQL_YYABORT;
           }
-#line 45872 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45877 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3452:
-#line 17543 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17571 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               Remove from the name resolution context stack the context of the
@@ -45880,28 +45885,28 @@
             */
             Lex->pop_context();
           }
-#line 45884 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45889 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3453:
-#line 17554 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17582 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_select_to_union_list((bool)(yyvsp[0].num), (yyvsp[-1].unit_type), TRUE)))
               MYSQL_YYABORT;
           }
-#line 45893 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45898 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3454:
-#line 17559 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17587 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->pop_context();
           }
-#line 45901 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45906 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3455:
-#line 17565 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17593 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE);
@@ -45915,136 +45920,136 @@
             }
             thd->where= "global ORDER clause";
           }
-#line 45919 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45924 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3456:
-#line 17579 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17607 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             thd->lex->current_select->no_table_names_allowed= 0;
             thd->where= "";
           }
-#line 45928 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45933 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3459:
-#line 17595 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17623 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_select_to_union_list((bool)(yyvsp[0].num), (yyvsp[-1].unit_type), FALSE)))
               MYSQL_YYABORT;
           }
-#line 45937 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45942 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3460:
-#line 17602 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17630 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)=1; }
-#line 45943 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45948 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3461:
-#line 17603 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17631 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)=1; }
-#line 45949 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45954 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3462:
-#line 17604 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17632 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)=0; }
-#line 45955 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45960 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3463:
-#line 17608 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 45961 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45966 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3464:
-#line 17609 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17637 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 45967 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45972 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3465:
-#line 17614 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17642 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->tvc_start();
 	  }
-#line 45975 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45980 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3466:
-#line 17618 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17646 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.select_lex)= Lex->current_select;
             if (Lex->tvc_finalize())
               MYSQL_YYABORT;
 	  }
-#line 45985 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45990 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3467:
-#line 17636 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17664 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             (yyval.select_lex)= Lex->current_select->master_unit()->first_select();
           }
-#line 45993 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 45998 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3468:
-#line 17642 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17670 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-2].select_lex); }
-#line 45999 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46004 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3469:
-#line 17643 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17671 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-2].select_lex); }
-#line 46005 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46010 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3470:
-#line 17647 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17675 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 46011 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46016 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3471:
-#line 17648 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17676 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 46017 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46022 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3472:
-#line 17652 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17680 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 46023 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46028 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3473:
-#line 17653 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17681 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[0].select_lex); }
-#line 46029 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46034 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3474:
-#line 17654 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17682 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.select_lex)= (yyvsp[-1].select_lex); }
-#line 46035 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46040 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3475:
-#line 17660 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17688 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { 
             (yyvsp[-1].select_lex)->set_with_clause((yyvsp[-2].with_clause));
             (yyval.select_lex)= (yyvsp[-1].select_lex);
           }
-#line 46044 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46049 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3476:
-#line 17667 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17695 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
             if (unlikely(!lex->expr_allows_subselect ||
@@ -46063,11 +46068,11 @@
             if (unlikely(mysql_new_select(Lex, 1, NULL)))
               MYSQL_YYABORT;
           }
-#line 46067 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46072 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3477:
-#line 17688 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17716 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex=Lex;
 
@@ -46093,17 +46098,17 @@
                 temp->select_n_having_items;
             }
           }
-#line 46097 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46102 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3482:
-#line 17726 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17754 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_STRAIGHT_JOIN; }
-#line 46103 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46108 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3483:
-#line 17728 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17756 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_simple_select(&(yyvsp[0].kwd))))
               MYSQL_YYABORT;
@@ -46111,61 +46116,61 @@
             YYPS->m_mdl_type= MDL_SHARED_READ;
             Select->options|= SELECT_HIGH_PRIORITY;
           }
-#line 46115 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46120 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3484:
-#line 17735 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17763 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_DISTINCT; }
-#line 46121 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46126 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3485:
-#line 17736 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17764 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_DISTINCT; }
-#line 46127 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46132 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3486:
-#line 17737 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17765 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_SMALL_RESULT; }
-#line 46133 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46138 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3487:
-#line 17738 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17766 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_BIG_RESULT; }
-#line 46139 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46144 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3488:
-#line 17740 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17768 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_simple_select(&(yyvsp[0].kwd))))
               MYSQL_YYABORT;
             Select->options|= OPTION_BUFFER_RESULT;
           }
-#line 46149 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46154 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3489:
-#line 17746 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17774 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->check_simple_select(&(yyvsp[0].kwd))))
               MYSQL_YYABORT;
             Select->options|= OPTION_FOUND_ROWS;
           }
-#line 46159 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46164 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3490:
-#line 17751 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17779 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Select->options|= SELECT_ALL; }
-#line 46165 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46170 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3493:
-#line 17767 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17795 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             /*
               We have to distinguish missing DEFINER-clause from case when
@@ -46176,100 +46181,100 @@
             */
             thd->lex->definer= 0;
           }
-#line 46180 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46185 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3494:
-#line 17781 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17809 "/home/buildbot/git/sql/sql_yacc_ora.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 46191 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46196 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3495:
-#line 17796 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17824 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= DTYPE_ALGORITHM_UNDEFINED; }
-#line 46197 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46202 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3496:
-#line 17797 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_ALGORITHM_MERGE; }
-#line 46203 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46208 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3497:
-#line 17798 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17826 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_ALGORITHM_TMPTABLE; }
-#line 46209 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46214 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3498:
-#line 17802 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17830 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= VIEW_SUID_DEFAULT; }
-#line 46215 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46220 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3499:
-#line 17803 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17831 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= (yyvsp[0].view_suid); }
-#line 46221 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46226 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3500:
-#line 17807 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17835 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= VIEW_SUID_DEFINER; }
-#line 46227 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46232 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3501:
-#line 17808 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17836 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.view_suid)= VIEW_SUID_INVOKER; }
-#line 46233 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46238 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3502:
-#line 17813 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17841 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 46239 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46244 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3504:
-#line 17819 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17847 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->view_list.push_back((LEX_CSTRING*)
                                      thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
                                      thd->mem_root);
           }
-#line 46249 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46254 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3505:
-#line 17825 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17853 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->view_list.push_back((LEX_CSTRING*)
                                      thd->memdup(&(yyvsp[0].ident_sys), sizeof(LEX_CSTRING)),
                                      thd->mem_root);
           }
-#line 46259 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46264 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3506:
-#line 17833 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17861 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->parsing_options.allows_variable= FALSE;
             lex->create_view->select.str= (char *) YYLIP->get_cpp_ptr();
           }
-#line 46269 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46274 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3507:
-#line 17839 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17867 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             size_t len= YYLIP->get_cpp_ptr() - lex->create_view->select.str;
@@ -46282,99 +46287,99 @@
             lex->parsing_options.allows_variable= TRUE;
             lex->current_select->set_with_clause((yyvsp[-2].with_clause));
           }
-#line 46286 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46291 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3515:
-#line 17868 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_NONE; }
-#line 46292 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46297 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3516:
-#line 17869 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17897 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_CASCADED; }
-#line 46298 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46303 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3517:
-#line 17870 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17898 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_CASCADED; }
-#line 46304 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46309 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3518:
-#line 17871 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17899 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= VIEW_CHECK_LOCAL; }
-#line 46310 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46315 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3519:
-#line 17882 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17910 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trigger_action_order_type)= TRG_ORDER_FOLLOWS; }
-#line 46316 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46321 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3520:
-#line 17884 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17912 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.trigger_action_order_type)= TRG_ORDER_PRECEDES; }
-#line 46322 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46327 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3521:
-#line 17889 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17917 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
               (yyval.trg_execution_order).ordering_clause= TRG_ORDER_NONE;
               (yyval.trg_execution_order).anchor_trigger_name.str= NULL;
               (yyval.trg_execution_order).anchor_trigger_name.length= 0;
             }
-#line 46332 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46337 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3522:
-#line 17896 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17924 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
               (yyval.trg_execution_order).ordering_clause= (yyvsp[-1].trigger_action_order_type);
               (yyval.trg_execution_order).anchor_trigger_name= (yyvsp[0].lex_str);
             }
-#line 46341 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46346 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3523:
-#line 17905 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17933 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->add_create_options_with_check((yyvsp[0].object_ddl_options))))
               MYSQL_YYABORT;
           }
-#line 46350 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46355 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3524:
-#line 17914 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17942 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* $9 */
             Lex->raw_trg_on_table_name_begin= YYLIP->get_tok_start();
           }
-#line 46358 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46363 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3525:
-#line 17920 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17948 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* $13 */
             Lex->raw_trg_on_table_name_end= YYLIP->get_tok_start();
           }
-#line 46366 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46371 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3526:
-#line 17925 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17953 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->trg_chistics.ordering_clause_begin= YYLIP->get_cpp_ptr();
           }
-#line 46374 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46379 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3527:
-#line 17929 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17957 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* $18 */
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -46394,11 +46399,11 @@
 
             lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
           }
-#line 46398 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46403 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3528:
-#line 17949 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 17977 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { /* $20 */
             LEX *lex= Lex;
             sp_head *sp= lex->sphead;
@@ -46424,11 +46429,11 @@
                                            MDL_SHARED_NO_WRITE)))
               MYSQL_YYABORT;
           }
-#line 46428 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46433 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3529:
-#line 17985 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18013 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             if (unlikely(lex->add_create_options_with_check((yyvsp[-5].object_ddl_options))))
@@ -46440,43 +46445,43 @@
             lex->udf.returns= (Item_result) (yyvsp[-2].num);
             lex->udf.dl= (yyvsp[0].lex_str).str;
           }
-#line 46444 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46449 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3530:
-#line 18001 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18029 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->init_last_field(&lex->sphead->m_return_field_def,
                                  &empty_clex_str,
                                  thd->variables.collation_database);
           }
-#line 46455 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46460 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3531:
-#line 18008 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18036 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sphead->fill_field_definition(thd,
                                                             Lex->last_field)))
               MYSQL_YYABORT;
           }
-#line 46465 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46470 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3532:
-#line 18018 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18046 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_CREATE_SPFUNCTION;
             if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[-1].object_ddl_options), (yyvsp[0].spname),
                                                          &sp_handler_function)))
               MYSQL_YYABORT;
           }
-#line 46476 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46481 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3533:
-#line 18027 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18055 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= thd->lex;
             Lex_input_stream *lip= YYLIP;
@@ -46484,11 +46489,11 @@
             lex->sphead->set_chistics(lex->sp_chistics);
             lex->sphead->set_body_start(thd, lip->get_cpp_tok_start());
           }
-#line 46488 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46493 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3534:
-#line 18036 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18064 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_body_finalize_function(thd)))
               MYSQL_YYABORT;
@@ -46498,129 +46503,129 @@
             }
             Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE);
           }
-#line 46502 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46507 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3535:
-#line 18049 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18077 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command= SQLCOM_CREATE_PROCEDURE;
             if (unlikely(!Lex->make_sp_head_no_recursive(thd, (yyvsp[-1].object_ddl_options), (yyvsp[0].spname),
                                                          &sp_handler_procedure)))
               MYSQL_YYABORT;
           }
-#line 46513 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46518 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3536:
-#line 18057 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18085 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sphead->set_chistics(Lex->sp_chistics);
             Lex->sphead->set_body_start(thd, YYLIP->get_cpp_tok_start());
           }
-#line 46522 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46527 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3537:
-#line 18063 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18091 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely(Lex->sp_body_finalize_procedure(thd)))
               MYSQL_YYABORT;
           }
-#line 46531 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46536 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3538:
-#line 18071 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18099 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].spname) && !(yyvsp[0].spname)->eq(Lex->sphead)))
               my_yyabort_error((ER_END_IDENTIFIER_DOES_NOT_MATCH, MYF(0),
                                 ErrConvDQName((yyvsp[0].spname)).ptr(),
                                 ErrConvDQName(Lex->sphead).ptr()));
           }
-#line 46542 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46547 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3539:
-#line 18081 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18109 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (unlikely((yyvsp[0].spname) && !(yyvsp[0].spname)->eq(Lex->sphead)))
               my_yyabort_error((ER_END_IDENTIFIER_DOES_NOT_MATCH, MYF(0),
                                 ErrConvDQName((yyvsp[0].spname)).ptr(),
                                 ErrConvDQName(Lex->sphead).ptr()));
           }
-#line 46553 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46558 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3540:
-#line 18090 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18118 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= null_clex_str; }
-#line 46559 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46564 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3541:
-#line 18091 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18119 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.lex_str)= (yyvsp[0].ident_sys); }
-#line 46565 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46570 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3544:
-#line 18103 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18131 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_START;
           }
-#line 46573 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46578 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3545:
-#line 18107 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18135 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_END;
           }
-#line 46581 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46586 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3546:
-#line 18111 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18139 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_PREPARE;
           }
-#line 46589 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46594 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3547:
-#line 18115 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18143 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_COMMIT;
           }
-#line 46597 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46602 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3548:
-#line 18119 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18147 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_ROLLBACK;
           }
-#line 46605 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46610 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3549:
-#line 18123 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18151 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             Lex->sql_command = SQLCOM_XA_RECOVER;
             Lex->verbose= (yyvsp[0].num);
           }
-#line 46614 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46619 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3550:
-#line 18130 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18158 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { (yyval.num)= false; }
-#line 46620 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46625 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3551:
-#line 18132 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18160 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             if (lex_string_eq(&(yyvsp[0].lex_str), STRING_WITH_LEN("SQL")))
               (yyval.num)= true;
@@ -46633,167 +46638,167 @@
               (yyval.num)= false;
             }
           }
-#line 46637 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46642 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3552:
-#line 18148 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18176 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[0].string)->length() <= MAXGTRIDSIZE);
             if (unlikely(!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))))
               MYSQL_YYABORT;
             Lex->xid->set(1L, (yyvsp[0].string)->ptr(), (yyvsp[0].string)->length(), 0, 0);
           }
-#line 46648 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46653 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3553:
-#line 18155 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-2].string)->length() <= MAXGTRIDSIZE && (yyvsp[0].string)->length() <= MAXBQUALSIZE);
             if (unlikely(!(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 46659 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46664 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3554:
-#line 18162 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18190 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             MYSQL_YYABORT_UNLESS((yyvsp[-4].string)->length() <= MAXGTRIDSIZE && (yyvsp[-2].string)->length() <= MAXBQUALSIZE);
             if (unlikely(!(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 46670 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46675 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3555:
-#line 18171 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18199 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 46676 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46681 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3556:
-#line 18172 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18200 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 46682 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46687 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3557:
-#line 18173 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18201 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 46688 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46693 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3558:
-#line 18177 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18205 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_NONE;        }
-#line 46694 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46699 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3559:
-#line 18178 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18206 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_JOIN;        }
-#line 46700 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46705 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3560:
-#line 18179 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18207 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_RESUME;      }
-#line 46706 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46711 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3561:
-#line 18183 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18211 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_NONE;        }
-#line 46712 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46717 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3562:
-#line 18184 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18212 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_ONE_PHASE;   }
-#line 46718 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46723 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3563:
-#line 18189 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18217 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_NONE;        }
-#line 46724 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46729 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3564:
-#line 18191 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18219 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_SUSPEND;     }
-#line 46730 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46735 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3566:
-#line 18196 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18224 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {}
-#line 46736 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46741 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3567:
-#line 18197 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     { Lex->xa_opt=XA_FOR_MIGRATE; }
-#line 46742 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46747 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3568:
-#line 18202 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18230 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSTALL_PLUGIN;
             lex->comment= (yyvsp[-2].ident_sys);
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 46753 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46758 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3569:
-#line 18209 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18237 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_INSTALL_PLUGIN;
             lex->comment= null_clex_str;
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 46764 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46769 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3570:
-#line 18219 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18247 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
             lex->comment= (yyvsp[0].ident_sys);
           }
-#line 46774 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46779 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3571:
-#line 18225 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18253 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_UNINSTALL_PLUGIN;
             lex->comment= null_clex_str;
             lex->ident= (yyvsp[0].lex_str);
           }
-#line 46785 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46790 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
   case 3572:
-#line 18236 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
+#line 18264 "/home/buildbot/git/sql/sql_yacc_ora.yy" /* yacc.c:1646  */
     {
-	  YYERROR;
-	}
-#line 46793 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+            YYERROR;
+          }
+#line 46798 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
     break;
 
 
-#line 46797 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
+#line 46802 "/home/buildbot/git/mkdist/sql/sql_yacc_ora.cc" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
diff -Nru mariadb-10.3-10.3.18/sql/sql_yacc_ora.yy mariadb-10.3-10.3.22/sql/sql_yacc_ora.yy
--- mariadb-10.3-10.3.18/sql/sql_yacc_ora.yy	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sql_yacc_ora.yy	2020-01-26 18:37:29.000000000 +0000
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335  USA */
 
 /* sql_yacc.yy */
 
@@ -2715,8 +2715,6 @@
           {
             MYSQL_YYABORT_UNLESS(Lex->server_options.host.str == 0);
             Lex->server_options.host= $2;
-            my_casedn_str(system_charset_info,
-		         (char*) Lex->server_options.host.str);
           }
         | DATABASE TEXT_STRING_sys
           {
@@ -3734,6 +3732,7 @@
             if (unlikely($$ == NULL))
               MYSQL_YYABORT;
           }
+        ;
 
 simple_target_specification:
           ident_cli
@@ -3790,6 +3789,7 @@
             if (unlikely($$ == NULL))
               MYSQL_YYABORT;
           }
+        ;
 
 condition_information_item_name:
           CLASS_ORIGIN_SYM
@@ -7133,15 +7133,18 @@
           '(' LONG_NUM ')'      { $$= $2.str; }
         | '(' ULONGLONG_NUM ')' { $$= $2.str; }
         | '(' DECIMAL_NUM ')'   { $$= $2.str; }
-        | '(' NUM ')'           { $$= $2.str; };
+        | '(' NUM ')'           { $$= $2.str; }
+        ;
 
 opt_field_length:
           /* empty */  { $$= (char*) 0; /* use default length */ }
         | field_length { $$= $1; }
+        ;
 
 opt_field_length_default_1:
           /* empty */  { $$= (char*) "1"; }
         | field_length { $$= $1; }
+        ;
 
 
 /*
@@ -7164,10 +7167,12 @@
 opt_field_length_default_sp_param_varchar:
           /* empty */  { $$.set("4000", "4000"); }
         | field_length { $$.set($1, NULL); }
+        ;
 
 opt_field_length_default_sp_param_char:
           /* empty */  { $$.set("2000", "2000"); }
         | field_length { $$.set($1, NULL); }
+        ;
 
 opt_precision:
           /* empty */    { $$.set(0, 0); }
@@ -7671,12 +7676,14 @@
 opt_USING_key_algorithm:
           /* Empty*/              { $$= HA_KEY_ALG_UNDEF; }
         | USING    btree_or_rtree { $$= $2; }
+        ;
 
 /* TYPE is a valid identifier, so it's handled differently than USING */
 opt_key_algorithm_clause:
           /* Empty*/              { $$= HA_KEY_ALG_UNDEF; }
         | USING    btree_or_rtree { $$= $2; }
         | TYPE_SYM btree_or_rtree { $$= $2; }
+        ;
 
 key_using_alg:
           USING btree_or_rtree
@@ -7787,7 +7794,8 @@
           text_string
           { Lex->last_field->interval_list.push_back($1, thd->mem_root); }
         | string_list ',' text_string
-          { Lex->last_field->interval_list.push_back($3, thd->mem_root); };
+          { Lex->last_field->interval_list.push_back($3, thd->mem_root); }
+        ;
 
 /*
 ** Alter table
@@ -7817,6 +7825,7 @@
               MYSQL_YYABORT;
             Lex->select_lex.db= (Lex->select_lex.table_list.first)->db;
             Lex->create_last_non_select_table= Lex->last_table();
+            Lex->mark_first_table_as_inserting();
           }
           alter_commands
           {
@@ -8454,6 +8463,7 @@
         | alter_algorithm_option
         | alter_lock_option alter_algorithm_option
         | alter_algorithm_option alter_lock_option
+        ;
 
 alter_algorithm_option:
           ALGORITHM_SYM opt_equal DEFAULT
@@ -8512,6 +8522,7 @@
             Lex->alter_info.requested_lock=
               Alter_info::ALTER_TABLE_LOCK_NONE;
           }
+        ;
 
 
 opt_restrict:
@@ -8779,6 +8790,7 @@
           {}
         | COLUMNS persistent_column_stat_spec INDEXES persistent_index_stat_spec
           {}
+        ;
 
 persistent_column_stat_spec:
           ALL {}
@@ -9597,13 +9609,13 @@
 opt_default_time_precision:
           /* empty */             { $$= NOT_FIXED_DEC;  }
         | '(' ')'                 { $$= NOT_FIXED_DEC;  }
-        | '(' real_ulong_num ')'  { $$= $2; };
+        | '(' real_ulong_num ')'  { $$= $2; }
         ;
 
 opt_time_precision:
           /* empty */             { $$= 0;  }
         | '(' ')'                 { $$= 0;  }
-        | '(' real_ulong_num ')'  { $$= $2; };
+        | '(' real_ulong_num ')'  { $$= $2; }
         ;
 
 optional_braces:
@@ -10108,6 +10120,7 @@
      else
        $$->len= 0;
    }
+   ;
 
 dyncall_create_list:
      dyncall_create_element
@@ -11588,7 +11601,7 @@
 
 opt_gorder_clause:
           /* empty */
-        | ORDER_SYM BY gorder_list;
+        | ORDER_SYM BY gorder_list
         ;
 
 gorder_list:
@@ -12605,6 +12618,7 @@
             if (unlikely(thd->lex->win_ref == NULL))
               MYSQL_YYABORT;
           }
+        ;
 
 opt_window_partition_clause:
           /* empty */ { }
@@ -12913,6 +12927,7 @@
             LEX *lex=Lex;
             lex->limit_rows_examined= $1;
           }
+        ;
 
 delete_limit_clause:
           /* empty */
@@ -12939,6 +12954,7 @@
 int_num:
           opt_plus NUM           { int error; $$= (int) my_strtoll10($2.str, (char**) 0, &error); }
         | '-' NUM       { int error; $$= -(int) my_strtoll10($2.str, (char**) 0, &error); }
+        ;
 
 ulong_num:
           opt_plus NUM           { int error; $$= (ulong) my_strtoll10($2.str, (char**) 0, &error); }
@@ -12962,7 +12978,7 @@
         | LONG_NUM      { int error; $$= (longlong) my_strtoll10($1.str, (char**) 0, &error); }
         | '-' NUM         { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
         | '-' LONG_NUM  { int error; $$= -(longlong) my_strtoll10($2.str, (char**) 0, &error); }
-
+        ;
 
 ulonglong_num:
           opt_plus NUM           { int error; $$= (ulonglong) my_strtoll10($2.str, (char**) 0, &error); }
@@ -12999,7 +13015,7 @@
         ulong_num   { $$= $1 != 0; }
         | TRUE_SYM  { $$= 1; }
         | FALSE_SYM { $$= 0; }
-
+        ;
 
 procedure_clause:
           PROCEDURE_SYM ident /* Procedure name */
@@ -13405,7 +13421,9 @@
             Lex->current_select= &Lex->select_lex;
           }
           insert_field_spec opt_insert_update
-          {}
+          {
+            Lex->mark_first_table_as_inserting();
+          }
         ;
 
 replace:
@@ -13422,7 +13440,9 @@
             Lex->current_select= &Lex->select_lex;
           }
           insert_field_spec
-          {}
+          {
+            Lex->mark_first_table_as_inserting();
+          }
         ;
 
 insert_lock_option:
@@ -13468,7 +13488,8 @@
             lex->field_list.empty();
             lex->many_values.empty();
             lex->insert_list=0;
-          };
+          }
+        ;
 
 insert_field_spec:
           insert_values {}
@@ -14633,6 +14654,7 @@
 optional_flush_tables_arguments:
           /* empty */        {$$= 0;}
         | AND_SYM DISABLE_SYM CHECKPOINT_SYM {$$= REFRESH_CHECKPOINT; } 
+        ;
 
 reset:
           RESET_SYM
@@ -14725,6 +14747,7 @@
         /* Empty */    { $$= (int) KILL_HARD_BIT; }
         | HARD_SYM     { $$= (int) KILL_HARD_BIT; }
         | SOFT_SYM     { $$= 0; }
+        ;
 
 kill_option:
           /* empty */    { $$= (int) KILL_CONNECTION; }
@@ -14808,7 +14831,9 @@
           opt_xml_rows_identified_by
           opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec
           opt_load_data_set_spec
-          {}
+          {
+            Lex->mark_first_table_as_inserting();
+          }
           ;
 
 data_or_xml:
@@ -14901,7 +14926,8 @@
 opt_xml_rows_identified_by:
         /* empty */ { }
         | ROWS_SYM IDENTIFIED_SYM BY text_string
-          { Lex->exchange->line_term = $4; };
+          { Lex->exchange->line_term = $4; }
+        ;
 
 opt_ignore_lines:
           /* empty */
@@ -17026,12 +17052,14 @@
         ;
 
 opt_with_admin:
-           /* nothing */               { Lex->definer = 0; }
-         | WITH ADMIN_SYM user_or_role { Lex->definer = $3; }
+          /* nothing */               { Lex->definer = 0; }
+        | WITH ADMIN_SYM user_or_role { Lex->definer = $3; }
+        ;
 
 opt_with_admin_option:
-           /* nothing */               { Lex->with_admin_option= false; }
-         | WITH ADMIN_SYM OPTION       { Lex->with_admin_option= true; }
+          /* nothing */               { Lex->with_admin_option= false; }
+        | WITH ADMIN_SYM OPTION       { Lex->with_admin_option= true; }
+        ;
 
 role_list:
           grant_role
@@ -17459,7 +17487,7 @@
           { $$= TVL_UNKNOWN; }
         | RELEASE_SYM        { $$= TVL_YES; }
         | NO_SYM RELEASE_SYM { $$= TVL_NO; }
-;
+        ;
 
 commit:
           COMMIT_SYM opt_work opt_chain opt_release
@@ -17526,7 +17554,7 @@
           { $$= INTERSECT_TYPE; }
         | EXCEPT_SYM
           { $$= EXCEPT_TYPE; }
-
+        ;
 
 union_clause:
           /* empty */ {}
@@ -18232,10 +18260,11 @@
 
 /* Avoid compiler warning from sql_yacc.cc where yyerrlab1 is not used */
 keep_gcc_happy:
-	IMPOSSIBLE_ACTION
-	{
-	  YYERROR;
-	}
+          IMPOSSIBLE_ACTION
+          {
+            YYERROR;
+          }
+        ;
 
 /**
   @} (end of group Parser)
diff -Nru mariadb-10.3-10.3.18/sql/sys_vars.cc mariadb-10.3-10.3.22/sql/sys_vars.cc
--- mariadb-10.3-10.3.18/sql/sys_vars.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sys_vars.cc	2020-01-26 18:37:29.000000000 +0000
@@ -6164,7 +6164,7 @@
        "Track changes to the transaction attributes. OFF to disable; "
        "STATE to track just transaction state (Is there an active transaction? "
        "Does it have any data? etc.); CHARACTERISTICS to track transaction "
-       "state and report all statements needed to start a transaction with"
+       "state and report all statements needed to start a transaction with "
        "the same characteristics (isolation level, read only/read write,"
        "snapshot - but not any work done / data modified within the "
        "transaction).",
diff -Nru mariadb-10.3-10.3.18/sql/sys_vars.ic mariadb-10.3-10.3.22/sql/sys_vars.ic
--- mariadb-10.3-10.3.18/sql/sys_vars.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/sys_vars.ic	2020-01-26 18:37:29.000000000 +0000
@@ -1,5 +1,5 @@
 /* Copyright (c) 2002, 2011, Oracle and/or its affiliates.
-   Copyright (c) 2010, 2013, Monty Program Ab.
+   Copyright (c) 2010, 2019, 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
diff -Nru mariadb-10.3-10.3.18/sql/table.cc mariadb-10.3-10.3.22/sql/table.cc
--- mariadb-10.3-10.3.18/sql/table.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/table.cc	2020-01-26 18:37:29.000000000 +0000
@@ -675,7 +675,11 @@
   frmlen= read_length + sizeof(head);
 
   share->init_from_binary_frm_image(thd, false, buf, frmlen);
-  error_given= true; // init_from_binary_frm_image has already called my_error()
+  /*
+    Don't give any additional errors. If there would be a problem,
+    init_from_binary_frm_image would call my_error() itself.
+  */
+  error_given= true;
   my_free(buf);
 
   goto err_not_open;
@@ -684,6 +688,9 @@
   mysql_file_close(file, MYF(MY_WME));
 
 err_not_open:
+  /* Mark that table was created earlier and thus should have been logged */
+  share->table_creation_was_logged= 1;
+
   if (unlikely(share->error && !error_given))
   {
     share->open_errno= my_errno;
@@ -2838,6 +2845,8 @@
              sql_copy);
     DBUG_RETURN(HA_ERR_GENERIC);
   }
+  /* Treat the table as normal table from binary logging point of view */
+  table_creation_was_logged= 1;
   DBUG_RETURN(0);
 }
 
@@ -4678,6 +4687,9 @@
   cond_selectivity= 1.0;
   cond_selectivity_sampling_explain= NULL;
   vers_write= s->versioned;
+  quick_condition_rows=0;
+  no_cache= false;
+  initialize_quick_structures();
 #ifdef HAVE_REPLICATION
   /* used in RBR Triggers */
   master_had_triggers= 0;
@@ -6510,15 +6522,16 @@
     }
   }
 
-  if (need_signal)
-    file->column_bitmaps_signal();
-
   if (s->versioned)
   {
     bitmap_set_bit(read_set, s->vers_start_field()->field_index);
     bitmap_set_bit(read_set, s->vers_end_field()->field_index);
     bitmap_set_bit(write_set, s->vers_end_field()->field_index);
+    need_signal= true;
   }
+
+  if (need_signal)
+    file->column_bitmaps_signal();
 }
 
 
@@ -6531,7 +6544,7 @@
     updated columns to be read.
 
     If this is no the case, we do like in the delete case and mark
-    if neeed, either the primary key column or all columns to be read.
+    if needed, either the primary key column or all columns to be read.
     (see mark_columns_needed_for_delete() for details)
 
     If the engine has HA_REQUIRES_KEY_COLUMNS_FOR_DELETE, we will
@@ -6595,14 +6608,14 @@
       need_signal= true;
     }
   }
-  /*
-     For System Versioning we have to read all columns since we will store
-     a copy of previous row with modified Sys_end column back to a table.
-  */
   if (s->versioned)
   {
-    // We will copy old columns to a new row.
-    use_all_columns();
+    /*
+      For System Versioning we have to read all columns since we store
+      a copy of previous row with modified row_end back to a table.
+    */
+    bitmap_union(read_set, &s->all_set);
+    need_signal= true;
   }
   if (check_constraints)
   {
@@ -6764,8 +6777,16 @@
           binary log will include all columns read anyway.
         */
         mark_columns_used_by_index_no_reset(s->primary_key, read_set);
-        /* Only write columns that have changed */
-        rpl_write_set= write_set;
+        if (versioned())
+        {
+          // TODO: After MDEV-18432 we don't pass history rows, so remove this:
+          rpl_write_set= &s->all_set;
+        }
+        else
+        {
+          /* Only write columns that have changed */
+          rpl_write_set= write_set;
+        }
         break;
 
       default:
@@ -7991,7 +8012,10 @@
   if (versioned(VERS_TIMESTAMP))
   {
     if (!vers_write)
+    {
+      file->column_bitmaps_signal();
       return;
+    }
     if (vers_start_field()->store_timestamp(in_use->query_start(),
                                             in_use->query_start_sec_part()))
       DBUG_ASSERT(0);
@@ -7999,11 +8023,15 @@
   else
   {
     if (!vers_write)
+    {
+      file->column_bitmaps_signal();
       return;
+    }
   }
 
   vers_end_field()->set_max();
   bitmap_set_bit(read_set, vers_end_field()->field_index);
+  file->column_bitmaps_signal();
 }
 
 
@@ -9149,6 +9177,8 @@
     return true;
   case SYSTEM_TIME_BEFORE:
     break;
+  case SYSTEM_TIME_HISTORY:
+    break;
   case SYSTEM_TIME_AS_OF:
     return start.eq(conds.start);
   case SYSTEM_TIME_FROM_TO:
@@ -9247,3 +9277,21 @@
   }
   return false;
 }
+
+/*
+  @brief
+    Initialize all the quick structures that are used to stored the
+    estimates when the range optimizer is run.
+  @details
+    This is specifically needed when we read the TABLE structure from the
+    table cache. There can be some garbage data from previous queries
+    that need to be reset here.
+*/
+
+void TABLE::initialize_quick_structures()
+{
+  bzero(quick_rows, sizeof(quick_rows));
+  bzero(quick_key_parts, sizeof(quick_key_parts));
+  bzero(quick_costs, sizeof(quick_costs));
+  bzero(quick_n_ranges, sizeof(quick_n_ranges));
+}
diff -Nru mariadb-10.3-10.3.18/sql/table.h mariadb-10.3-10.3.22/sql/table.h
--- mariadb-10.3-10.3.18/sql/table.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/table.h	2020-01-26 18:37:29.000000000 +0000
@@ -321,7 +321,7 @@
 
 enum tmp_table_type
 {
-  NO_TMP_TABLE, NON_TRANSACTIONAL_TMP_TABLE, TRANSACTIONAL_TMP_TABLE,
+  NO_TMP_TABLE= 0, NON_TRANSACTIONAL_TMP_TABLE, TRANSACTIONAL_TMP_TABLE,
   INTERNAL_TMP_TABLE, SYSTEM_TMP_TABLE
 };
 enum release_type { RELEASE_NORMAL, RELEASE_WAIT_FOR_DROP };
@@ -732,16 +732,20 @@
   bool null_field_first;
   bool system;                          /* Set if system table (one record) */
   bool not_usable_by_query_cache;
+  /*
+    This is used by log tables, for tables that have their own internal
+    binary logging or for tables that doesn't support statement or row logging
+   */
   bool no_replicate;
   bool crashed;
   bool is_view;
   bool can_cmp_whole_record;
+  /* This is set for temporary tables where CREATE was binary logged */
   bool table_creation_was_logged;
   bool non_determinstic_insert;
   bool vcols_need_refixing;
   bool has_update_default_function;
   bool can_do_row_logging;              /* 1 if table supports RBR */
-
   ulong table_map_id;                   /* for row-based replication */
 
   /*
@@ -1477,6 +1481,7 @@
   bool is_filled_at_execution();
 
   bool update_const_key_parts(COND *conds);
+  void initialize_quick_structures();
 
   my_ptrdiff_t default_values_offset() const
   { return (my_ptrdiff_t) (s->default_values - record[0]); }
@@ -1531,8 +1536,15 @@
     return s->versioned == type;
   }
 
-  bool versioned_write(vers_sys_type_t type= VERS_UNDEFINED) const
+  bool versioned_write() const
+  {
+    DBUG_ASSERT(versioned() || !vers_write);
+    return versioned() ? vers_write : false;
+  }
+
+  bool versioned_write(vers_sys_type_t type) const
   {
+    DBUG_ASSERT(type);
     DBUG_ASSERT(versioned() || !vers_write);
     return versioned(type) ? vers_write : false;
   }
@@ -1552,6 +1564,8 @@
   ulonglong vers_start_id() const;
   ulonglong vers_end_id() const;
 
+  bool vers_check_update(List &items);
+
   int delete_row();
   void vers_update_fields();
   void vers_update_end();
@@ -1857,14 +1871,18 @@
 struct vers_select_conds_t
 {
   vers_system_time_t type;
+  vers_system_time_t orig_type;
   bool used:1;
+  bool delete_history:1;
   Vers_history_point start;
   Vers_history_point end;
 
   void empty()
   {
     type= SYSTEM_TIME_UNSPECIFIED;
+    orig_type= SYSTEM_TIME_UNSPECIFIED;
     used= false;
+    delete_history= false;
     start.empty();
     end.empty();
   }
@@ -1874,7 +1892,10 @@
             Vers_history_point _end= Vers_history_point())
   {
     type= _type;
+    orig_type= _type;
     used= false;
+    delete_history= (type == SYSTEM_TIME_HISTORY ||
+      type == SYSTEM_TIME_BEFORE);
     start= _start;
     end= _end;
   }
@@ -1887,6 +1908,14 @@
   {
     return type != SYSTEM_TIME_UNSPECIFIED;
   }
+  bool was_set() const
+  {
+    return orig_type != SYSTEM_TIME_UNSPECIFIED;
+  }
+  bool need_setup() const
+  {
+    return type != SYSTEM_TIME_UNSPECIFIED && type != SYSTEM_TIME_ALL;
+  }
   bool resolve_units(THD *thd);
   bool eq(const vers_select_conds_t &conds) const;
 };
@@ -1985,7 +2014,8 @@
                                             prelocking_types prelocking_type,
                                             TABLE_LIST *belong_to_view_arg,
                                             uint8 trg_event_map_arg,
-                                            TABLE_LIST ***last_ptr)
+                                            TABLE_LIST ***last_ptr,
+                                            my_bool insert_data)
 
   {
     init_one_table(db_arg, table_name_arg, alias_arg, lock_type_arg);
@@ -2000,6 +2030,7 @@
     **last_ptr= this;
     prev_global= *last_ptr;
     *last_ptr= &next_global;
+    for_insert_data= insert_data;
   }
 
 
@@ -2411,6 +2442,8 @@
   /* System Versioning */
   vers_select_conds_t vers_conditions;
 
+  my_bool for_insert_data;
+
   /**
      @brief
        Find the bottom in the chain of embedded table VIEWs.
@@ -3082,7 +3115,7 @@
 
      @param[in] timestamp
      @param[in] true if we search for a lesser timestamp, false if greater
-     @retval true if exists, false it not exists or an error occured
+     @retval true if exists, false it not exists or an error occurred
    */
   bool query(MYSQL_TIME &commit_time, bool backwards);
   /**
diff -Nru mariadb-10.3-10.3.18/sql/temporary_tables.cc mariadb-10.3-10.3.22/sql/temporary_tables.cc
--- mariadb-10.3-10.3.18/sql/temporary_tables.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/temporary_tables.cc	2020-01-26 18:37:29.000000000 +0000
@@ -351,6 +351,13 @@
     DBUG_RETURN(false);
   }
 
+  if (!tl->db.str)
+  {
+    DBUG_PRINT("info",
+               ("Table reference to a temporary table must have database set"));
+    DBUG_RETURN(false);
+  }
+
   /*
     Temporary tables are not safe for parallel replication. They were
     designed to be visible to one thread only, so have no table locking.
diff -Nru mariadb-10.3-10.3.18/sql/threadpool_common.cc mariadb-10.3-10.3.22/sql/threadpool_common.cc
--- mariadb-10.3-10.3.18/sql/threadpool_common.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/threadpool_common.cc	2020-01-26 18:37:29.000000000 +0000
@@ -185,7 +185,7 @@
   }
   else if (threadpool_process_request(thd))
   {
-    /* QUIT or an error occured. */
+    /* QUIT or an error occurred. */
     goto error;
   }
 
diff -Nru mariadb-10.3-10.3.18/sql/threadpool_generic.cc mariadb-10.3-10.3.22/sql/threadpool_generic.cc
--- mariadb-10.3-10.3.18/sql/threadpool_generic.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/threadpool_generic.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1336,7 +1336,7 @@
   DBUG_ASSERT(thread_group->connection_count > 0);
 
   if ((thread_group->active_thread_count == 0) && 
-     (is_queue_empty(thread_group) || !thread_group->listener))
+     (!is_queue_empty(thread_group) || !thread_group->listener))
   {
     /* 
       Group might stall while this thread waits, thus wake 
diff -Nru mariadb-10.3-10.3.18/sql/threadpool_win.cc mariadb-10.3-10.3.22/sql/threadpool_win.cc
--- mariadb-10.3-10.3.18/sql/threadpool_win.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/threadpool_win.cc	2020-01-26 18:37:29.000000000 +0000
@@ -305,6 +305,7 @@
 
   if (timer)
   {
+    SetThreadpoolTimer(timer, 0, 0, 0);
     WaitForThreadpoolTimerCallbacks(timer, TRUE);
     CloseThreadpoolTimer(timer);
   }
diff -Nru mariadb-10.3-10.3.18/sql/tztime.cc mariadb-10.3-10.3.22/sql/tztime.cc
--- mariadb-10.3-10.3.18/sql/tztime.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/tztime.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2432,7 +2432,7 @@
   if (!opt_skip_write_binlog)
       printf("\\d |\n"
         "IF (select count(*) from information_schema.global_variables where\n"
-        "variable_name='wsrep_on') = 1 THEN\n"
+        "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
         "ALTER TABLE time_zone_leap_second ENGINE=InnoDB;\n"
         "END IF|\n"
         "\\d ;\n");
@@ -2452,7 +2452,7 @@
   if (!opt_skip_write_binlog)
       printf("\\d |\n"
         "IF (select count(*) from information_schema.global_variables where\n"
-        "variable_name='wsrep_on') = 1 THEN\n"
+        "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
         "ALTER TABLE time_zone_leap_second ENGINE=MyISAM;\n"
         "END IF|\n"
         "\\d ;\n");
@@ -2709,7 +2709,7 @@
        sql_log_bin and wsrep_on to avoid Galera replicating below
        truncate table clauses. This will allow user to set different
        time zones to nodes in Galera cluster. */
-    printf("set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');\n"
+    printf("set @prep1=if((select count(*) from information_schema.global_variables where variable_name='wsrep_on' and variable_value='ON'), 'SET SESSION SQL_LOG_BIN=?, WSREP_ON=OFF;', 'do ?');\n"
            "prepare set_wsrep_write_binlog from @prep1;\n"
            "set @toggle=0; execute set_wsrep_write_binlog using @toggle;\n");
 
@@ -2725,7 +2725,7 @@
       // to allow changes to them to replicate with Galera
       printf("\\d |\n"
         "IF (select count(*) from information_schema.global_variables where\n"
-        "variable_name='wsrep_on') = 1 THEN\n"
+        "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
         "ALTER TABLE time_zone ENGINE=InnoDB;\n"
         "ALTER TABLE time_zone_name ENGINE=InnoDB;\n"
         "ALTER TABLE time_zone_transition ENGINE=InnoDB;\n"
@@ -2780,7 +2780,7 @@
       // Fall back to MyISAM
       printf("\\d |\n"
         "IF (select count(*) from information_schema.global_variables where\n"
-        "variable_name='wsrep_on') = 1 THEN\n"
+        "variable_name='wsrep_on' and variable_value='ON') = 1 THEN\n"
         "ALTER TABLE time_zone ENGINE=MyISAM;\n"
         "ALTER TABLE time_zone_name ENGINE=MyISAM;\n"
         "ALTER TABLE time_zone_transition ENGINE=MyISAM;\n"
diff -Nru mariadb-10.3-10.3.18/sql/uniques.h mariadb-10.3-10.3.22/sql/uniques.h
--- mariadb-10.3-10.3.18/sql/uniques.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/uniques.h	2020-01-26 18:37:29.000000000 +0000
@@ -29,14 +29,20 @@
 class Unique :public Sql_alloc
 {
   DYNAMIC_ARRAY file_ptrs;
-  ulong max_elements;
+  ulong max_elements;   /* Total number of elements that will be stored in-memory */
   size_t max_in_memory_size;
   IO_CACHE file;
   TREE tree;
+ /* Number of elements filtered out due to min_dupl_count when storing results
+    to table. See Unique::get */
   ulong filtered_out_elems;
   uint size;
-  uint full_size;
-  uint min_dupl_count;   /* always 0 for unions, > 0 for intersections */
+
+  uint full_size;   /* Size of element + space needed to store the number of
+                       duplicates found for the element. */
+  uint min_dupl_count;   /* Minimum number of occurences of element required for
+                            it to be written to record_pointers.
+                            always 0 for unions, > 0 for intersections */
   bool with_counters;
 
   bool merge(TABLE *table, uchar *buff, bool without_last_merge);
diff -Nru mariadb-10.3-10.3.18/sql/unireg.cc mariadb-10.3-10.3.22/sql/unireg.cc
--- mariadb-10.3-10.3.18/sql/unireg.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/unireg.cc	2020-01-26 18:37:29.000000000 +0000
@@ -398,7 +398,8 @@
   pos+= reclength;
   int2store(pos, create_info->connect_string.length);
   pos+= 2;
-  memcpy(pos, create_info->connect_string.str, create_info->connect_string.length);
+  if (create_info->connect_string.length)
+    memcpy(pos, create_info->connect_string.str, create_info->connect_string.length);
   pos+= create_info->connect_string.length;
   int2store(pos, str_db_type.length);
   pos+= 2;
diff -Nru mariadb-10.3-10.3.18/sql/wsrep_dummy.cc mariadb-10.3-10.3.22/sql/wsrep_dummy.cc
--- mariadb-10.3-10.3.18/sql/wsrep_dummy.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/wsrep_dummy.cc	2020-01-26 18:37:29.000000000 +0000
@@ -110,8 +110,8 @@
 my_bool wsrep_thd_is_wsrep(THD *)
 { return 0; }
 
-char *wsrep_thd_query(THD *)
-{ return 0; }
+const char *wsrep_thd_query(THD *)
+{ return "NULL"; }
 
 enum wsrep_query_state wsrep_thd_query_state(THD *)
 { return QUERY_IDLE; }
diff -Nru mariadb-10.3-10.3.18/sql/wsrep_hton.cc mariadb-10.3-10.3.22/sql/wsrep_hton.cc
--- mariadb-10.3-10.3.18/sql/wsrep_hton.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/wsrep_hton.cc	2020-01-26 18:37:29.000000000 +0000
@@ -95,7 +95,7 @@
       {
         trans_register_ha(thd, all, wsrep_hton);
 
-        /* follow innodb read/write settting
+        /* follow innodb read/write setting
          * but, as an exception: CTAS with empty result set will not be
          * replicated unless we declare wsrep hton as read/write here
 	 */
@@ -275,7 +275,7 @@
     if (wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
     {
       DBUG_PRINT("wsrep", ("setting rollback fail"));
-      WSREP_ERROR("settting rollback fail: thd: %llu, schema: %s, SQL: %s",
+      WSREP_ERROR("setting rollback fail: thd: %llu, schema: %s, SQL: %s",
                   (long long)thd->real_id, thd->get_db(), thd->query());
     }
     wsrep_cleanup_transaction(thd);
@@ -316,7 +316,7 @@
         if (wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle))
         {
           DBUG_PRINT("wsrep", ("setting rollback fail"));
-          WSREP_ERROR("settting rollback fail: thd: %llu, schema: %s, SQL: %s",
+          WSREP_ERROR("setting rollback fail: thd: %llu, schema: %s, SQL: %s",
                       (long long)thd->real_id, thd->get_db(),
                       thd->query());
         }
@@ -488,11 +488,27 @@
 
   if (WSREP_UNDEFINED_TRX_ID == thd->wsrep_ws_handle.trx_id)
   {
-    WSREP_WARN("SQL statement was ineffective  thd: %lld  buf: %zu\n"
+    /*
+      Async replication slave may have applied some non-innodb workload,
+      and then has written replication "meta data" into gtid_slave_pos
+      innodb table. Writes to gtid_slave_pos must not be replicated,
+      but this activity has caused that innodb hton is registered for this
+       transaction, but no wsrep keys have been appended.
+       We enter in this code path, because IO cache has events for non-innodb
+       tables.
+       => we should not treat it an error if trx is not introduced for provider
+    */
+    if (thd->system_thread == SYSTEM_THREAD_SLAVE_SQL)
+    {
+      WSREP_DEBUG("skipping wsrep replication for async slave, error not raised");
+      DBUG_RETURN(WSREP_TRX_OK);
+    }
+
+    WSREP_WARN("SQL statement was ineffective  thd: %llu  buf: %zu\n"
                "schema: %s \n"
 	       "QUERY: %s\n"
 	       " => Skipping replication",
-	       (longlong) thd->thread_id, data_len,
+	       (ulonglong) thd->thread_id, data_len,
                thd->get_db(), thd->query());
     rcode = WSREP_TRX_FAIL;
   }
diff -Nru mariadb-10.3-10.3.18/sql/wsrep_mysqld.cc mariadb-10.3-10.3.22/sql/wsrep_mysqld.cc
--- mariadb-10.3-10.3.18/sql/wsrep_mysqld.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/wsrep_mysqld.cc	2020-01-26 18:37:29.000000000 +0000
@@ -37,8 +37,6 @@
 #include 
 #include 
 #include "log_event.h"
-#include 
-#include "sql_plugin.h"                         /* wsrep_plugins_pre_init() */
 
 wsrep_t *wsrep                  = NULL;
 /*
@@ -639,7 +637,6 @@
   {
     // enable normal operation in case no provider is specified
     wsrep_ready_set(TRUE);
-    wsrep_inited= 1;
     global_system_variables.wsrep_on = 0;
     wsrep_init_args args;
     args.logger_cb = wsrep_log_cb;
@@ -650,10 +647,15 @@
     {
       DBUG_PRINT("wsrep",("wsrep::init() failed: %d", rcode));
       WSREP_ERROR("wsrep::init() failed: %d, must shutdown", rcode);
+      wsrep_ready_set(FALSE);
       wsrep->free(wsrep);
       free(wsrep);
       wsrep = NULL;
     }
+    else
+    {
+      wsrep_inited= 1;
+    }
     return rcode;
   }
   else
@@ -1547,6 +1549,39 @@
     {
       return false;
     }
+    /*
+      If mariadb master has replicated a CTAS, we should not replicate the create table
+      part separately as TOI, but to replicate both create table and following inserts
+      as one write set.
+      Howver, if CTAS creates empty table, we should replicate the create table alone
+      as TOI. We have to do relay log event lookup to see if row events follow the
+      create table event.
+    */
+    if (thd->slave_thread && !(thd->rgi_slave->gtid_ev_flags2 & Gtid_log_event::FL_STANDALONE))
+    {
+      /* this is CTAS, either empty or populated table */
+      ulonglong event_size = 0;
+      enum Log_event_type ev_type= wsrep_peak_event(thd->rgi_slave, &event_size);
+      switch (ev_type)
+      {
+      case QUERY_EVENT:
+        /* CTAS with empty table, we replicate create table as TOI */
+        break;
+
+      case TABLE_MAP_EVENT:
+        WSREP_DEBUG("replicating CTAS of empty table as TOI");
+        // fall through
+      case WRITE_ROWS_EVENT:
+        /* CTAS with populated table, we replicate later at commit time */
+        WSREP_DEBUG("skipping create table of CTAS replication");
+        return false;
+
+      default:
+        WSREP_WARN("unexpected async replication event: %d", ev_type);
+      }
+      return true;
+    }
+    /* no next async replication event */
     return true;
 
   case SQLCOM_CREATE_VIEW:
@@ -1597,25 +1632,6 @@
   }
 }
 
-static const char* wsrep_get_query_or_msg(const THD* thd)
-{
-  switch(thd->lex->sql_command)
-  {
-    case SQLCOM_CREATE_USER:
-      return "CREATE USER";
-    case SQLCOM_GRANT:
-      return "GRANT";
-    case SQLCOM_REVOKE:
-      return "REVOKE";
-    case SQLCOM_SET_OPTION:
-      if (thd->lex->definer)
-	return "SET PASSWORD";
-      /* fallthrough */
-    default:
-      return thd->query();
-   }
-}
-
 /*
   returns: 
    0: statement was replicated as TOI
@@ -1639,7 +1655,7 @@
   }
 
   WSREP_DEBUG("TO BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
-              thd->wsrep_exec_mode, wsrep_get_query_or_msg(thd));
+              thd->wsrep_exec_mode, wsrep_thd_query(thd));
 
   switch (thd->lex->sql_command)
   {
@@ -1719,13 +1735,13 @@
   wsrep_to_isolation--;
 
   WSREP_DEBUG("TO END: %lld, %d: %s", (long long)wsrep_thd_trx_seqno(thd),
-              thd->wsrep_exec_mode, wsrep_get_query_or_msg(thd));
+              thd->wsrep_exec_mode, wsrep_thd_query(thd));
 
   wsrep_set_SE_checkpoint(thd->wsrep_trx_meta.gtid.uuid,
                           thd->wsrep_trx_meta.gtid.seqno);
   WSREP_DEBUG("TO END: %lld, update seqno",
               (long long)wsrep_thd_trx_seqno(thd));
-  
+
   if (WSREP_OK == (ret = wsrep->to_execute_end(wsrep, thd->thread_id))) {
     WSREP_DEBUG("TO END: %lld", (long long)wsrep_thd_trx_seqno(thd));
   }
@@ -1773,7 +1789,7 @@
     }
 
     my_error(ER_LOCK_DEADLOCK, MYF(0));
-    return(1);
+    return(-1);
   }
 
   wsrep_seqno_t seqno = wsrep->pause(wsrep);
@@ -2092,7 +2108,7 @@
     need to know the start of the stack so that we could check for
     stack overruns.
   */
-  DBUG_PRINT("wsrep", ("handle_one_connection called by thread %lld\n",
+  DBUG_PRINT("wsrep", ("handle_one_connection called by thread %lld",
                        (long long)thd->thread_id));
   /* now that we've called my_thread_init(), it is safe to call DBUG_* */
 
@@ -2290,6 +2306,7 @@
 
     if (is_committing_connection(tmp))
     {
+      mysql_mutex_unlock(&LOCK_thread_count);
       return TRUE;
     }
   }
@@ -2664,9 +2681,28 @@
 }
 
 
-char *wsrep_thd_query(THD *thd)
+const char *wsrep_thd_query(THD *thd)
 {
-  return (thd) ? thd->query() : NULL;
+  if (thd)
+  {
+    switch(thd->lex->sql_command)
+    {
+    case SQLCOM_CREATE_USER:
+      return "CREATE USER";
+    case SQLCOM_GRANT:
+      return "GRANT";
+    case SQLCOM_REVOKE:
+      return "REVOKE";
+    case SQLCOM_SET_OPTION:
+      if (thd->lex->definer)
+	return "SET PASSWORD";
+      /* fallthrough */
+    default:
+      if (thd->query())
+        return thd->query();
+    }
+  }
+  return "NULL";
 }
 
 
diff -Nru mariadb-10.3-10.3.18/sql/wsrep_thd.cc mariadb-10.3-10.3.22/sql/wsrep_thd.cc
--- mariadb-10.3-10.3.18/sql/wsrep_thd.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/wsrep_thd.cc	2020-01-26 18:37:29.000000000 +0000
@@ -415,43 +415,46 @@
   DBUG_VOID_RETURN;
 }
 
-static bool create_wsrep_THD(wsrep_thread_args* args)
+static bool create_wsrep_THD(wsrep_thread_args* args, bool thread_count_lock)
 {
-  mysql_mutex_lock(&LOCK_thread_count);
+  if (!thread_count_lock)
+    mysql_mutex_lock(&LOCK_thread_count);
+
   ulong old_wsrep_running_threads= wsrep_running_threads;
-#ifdef HAVE_PSI_THREAD_INTERFACE
-  PSI_thread_key key;
 
-  switch (args->thread_type)
+  DBUG_ASSERT(args->thread_type == WSREP_APPLIER_THREAD ||
+              args->thread_type == WSREP_ROLLBACKER_THREAD);
+
+  bool res= mysql_thread_create(args->thread_type == WSREP_APPLIER_THREAD
+                                ? key_wsrep_applier : key_wsrep_rollbacker,
+                                &args->thread_id, &connection_attrib,
+                                start_wsrep_THD, (void*)args);
+
+  if (res)
   {
-    case WSREP_APPLIER_THREAD:
-      key= key_wsrep_applier;
-      break;
-    case WSREP_ROLLBACKER_THREAD:
-      key= key_wsrep_rollbacker;
-      break;
-    default:
-      assert(0);
-      key= 0;
-      break;
+    WSREP_ERROR("Can't create wsrep thread");
   }
-#endif
 
-  bool res= mysql_thread_create(key, &args->thread_id, &connection_attrib, start_wsrep_THD,
-                           (void*)args);
   /*
     if starting a thread on server startup, wait until the this thread's THD
     is fully initialized (otherwise a THD initialization code might
     try to access a partially initialized server data structure - MDEV-8208).
   */
   if (!mysqld_server_initialized)
+  {
     while (old_wsrep_running_threads == wsrep_running_threads)
+    {
       mysql_cond_wait(&COND_thread_count, &LOCK_thread_count);
-  mysql_mutex_unlock(&LOCK_thread_count);
+    }
+  }
+
+  if (!thread_count_lock)
+    mysql_mutex_unlock(&LOCK_thread_count);
+
   return res;
 }
 
-void wsrep_create_appliers(long threads)
+bool wsrep_create_appliers(long threads, bool thread_count_lock)
 {
   if (!wsrep_connected)
   {
@@ -463,26 +466,32 @@
                   "connection at '%s'", wsrep_cluster_address);
       assert(0);
     }
-    return;
+    return false;
   }
 
-  long wsrep_threads=0;
+  long wsrep_threads= 0;
+
   while (wsrep_threads++ < threads) {
     wsrep_thread_args* arg;
-    if((arg = (wsrep_thread_args*)my_malloc(sizeof(wsrep_thread_args), MYF(0))) == NULL) {
+
+    if((arg= (wsrep_thread_args*)my_malloc(sizeof(wsrep_thread_args), MYF(0))) == NULL)
+    {
       WSREP_ERROR("Can't allocate memory for wsrep replication thread %ld\n", wsrep_threads);
       assert(0);
     }
 
-    arg->thread_type = WSREP_APPLIER_THREAD;
-    arg->processor = wsrep_replication_process;
+    arg->thread_type= WSREP_APPLIER_THREAD;
+    arg->processor= wsrep_replication_process;
 
-    if (create_wsrep_THD(arg)) {
-      WSREP_WARN("Can't create thread to manage wsrep replication");
+    if (create_wsrep_THD(arg, thread_count_lock))
+    {
+      WSREP_ERROR("Can't create thread to manage wsrep replication");
       my_free(arg);
-      return;
+      return true;
     }
   }
+
+  return false;
 }
 
 static void wsrep_rollback_process(THD *thd)
@@ -578,7 +587,7 @@
     arg->processor = wsrep_rollback_process;
 
     /* create rollbacker */
-    if (create_wsrep_THD(arg)) {
+    if (create_wsrep_THD(arg, false)) {
       WSREP_WARN("Can't create thread to manage wsrep rollback");
       my_free(arg);
       return;
diff -Nru mariadb-10.3-10.3.18/sql/wsrep_thd.h mariadb-10.3-10.3.22/sql/wsrep_thd.h
--- mariadb-10.3-10.3.18/sql/wsrep_thd.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/wsrep_thd.h	2020-01-26 18:37:29.000000000 +0000
@@ -26,7 +26,7 @@
                           enum enum_var_type scope);
 void wsrep_client_rollback(THD *thd);
 void wsrep_replay_transaction(THD *thd);
-void wsrep_create_appliers(long threads);
+bool wsrep_create_appliers(long threads, bool thread_count_lock=false);
 void wsrep_create_rollbacker();
 
 int  wsrep_abort_thd(void *bf_thd_ptr, void *victim_thd_ptr,
diff -Nru mariadb-10.3-10.3.18/sql/wsrep_var.cc mariadb-10.3-10.3.22/sql/wsrep_var.cc
--- mariadb-10.3-10.3.18/sql/wsrep_var.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql/wsrep_var.cc	2020-01-26 18:37:29.000000000 +0000
@@ -602,16 +602,22 @@
 
 bool wsrep_slave_threads_update (sys_var *self, THD* thd, enum_var_type type)
 {
+  mysql_mutex_lock(&LOCK_thread_count);
+  bool res= false;
+
   wsrep_slave_count_change_update();
 
   if (wsrep_slave_count_change > 0)
   {
     WSREP_DEBUG("Creating %d applier threads, total %ld", wsrep_slave_count_change, wsrep_slave_threads);
-    wsrep_create_appliers(wsrep_slave_count_change);
+    res= wsrep_create_appliers(wsrep_slave_count_change, true);
     WSREP_DEBUG("Running %lu applier threads", wsrep_running_applier_threads);
     wsrep_slave_count_change = 0;
   }
-  return false;
+
+  mysql_mutex_unlock(&LOCK_thread_count);
+
+  return res;
 }
 
 bool wsrep_desync_check (sys_var *self, THD* thd, set_var* var)
diff -Nru mariadb-10.3-10.3.18/sql-bench/bench-init.pl.sh mariadb-10.3-10.3.22/sql-bench/bench-init.pl.sh
--- mariadb-10.3-10.3.18/sql-bench/bench-init.pl.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql-bench/bench-init.pl.sh	2020-01-26 18:37:28.000000000 +0000
@@ -566,7 +566,7 @@
   When using --fast the suffix is automaticly set to '_fast'.
 
 --random
-  Inform test suite that we are generate random inital values for sequence of
+  Inform test suite that we are generate random initial values for sequence of
   test executions. It should be used for imitation of real conditions.
 
 --threads=#  **DEPRECATED**
diff -Nru mariadb-10.3-10.3.18/sql-common/client.c mariadb-10.3-10.3.22/sql-common/client.c
--- mariadb-10.3-10.3.18/sql-common/client.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql-common/client.c	2020-01-26 18:37:29.000000000 +0000
@@ -3341,7 +3341,10 @@
       scramble_data_len= pkt_scramble_len;
       scramble_plugin= scramble_data + scramble_data_len;
       if (scramble_data + scramble_data_len > pkt_end)
-        scramble_data_len= (int)(pkt_end - scramble_data);
+      {
+        set_mysql_error(mysql, CR_MALFORMED_PACKET, unknown_sqlstate);
+        goto error;
+      }
     }
     else
     {
@@ -3527,7 +3530,7 @@
   if (ctxt)
     my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
 
-  DBUG_PRINT("info", ("reconnect succeded"));
+  DBUG_PRINT("info", ("reconnect succeeded"));
   tmp_mysql.reconnect= 1;
   tmp_mysql.free_me= mysql->free_me;
 
diff -Nru mariadb-10.3-10.3.18/sql-common/client_plugin.c mariadb-10.3-10.3.22/sql-common/client_plugin.c
--- mariadb-10.3-10.3.18/sql-common/client_plugin.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/sql-common/client_plugin.c	2020-01-26 18:37:29.000000000 +0000
@@ -28,11 +28,6 @@
   There is no reference counting and no unloading either.
 */
 
-#if defined(_MSC_VER)
-/* Silence warnings about variable 'unused' being used. */
-#define FORCE_INIT_OF_VARS 1
-#endif
-
 #include 
 #include "mysql.h"
 #include 
@@ -243,12 +238,12 @@
   struct st_mysql_client_plugin **builtin;
   va_list unused;
   DBUG_ENTER("mysql_client_plugin_init");
-  LINT_INIT_STRUCT(unused);
 
   if (initialized)
     DBUG_RETURN(0);
 
   bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
+  bzero(&unused, sizeof unused);
 
   mysql_mutex_init(0, &LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
   init_alloc_root(&mem_root, "client_plugin", 128, 128, MYF(0));
@@ -306,9 +301,7 @@
 mysql_client_register_plugin(MYSQL *mysql,
                              struct st_mysql_client_plugin *plugin)
 {
-  va_list unused;
   DBUG_ENTER("mysql_client_register_plugin");
-  LINT_INIT_STRUCT(unused);
 
   if (is_not_initialized(mysql, plugin->name))
     DBUG_RETURN(NULL);
@@ -324,7 +317,11 @@
     plugin= NULL;
   }
   else
+  {
+    va_list unused;
+    bzero(&unused, sizeof unused);
     plugin= add_plugin(mysql, plugin, 0, 0, unused);
+  }
 
   mysql_mutex_unlock(&LOCK_load_client_plugin);
   DBUG_RETURN(plugin);
diff -Nru mariadb-10.3-10.3.18/storage/connect/CMakeLists.txt mariadb-10.3-10.3.22/storage/connect/CMakeLists.txt
--- mariadb-10.3-10.3.18/storage/connect/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -73,10 +73,6 @@
   tabwmi.cpp tabwmi.h tabmac.cpp tabmac.h macutil.cpp macutil.h)
   # Add exception handling to the CONNECT project)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
-  SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
-  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
-  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
-  SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /MD")
   SET(IPHLPAPI_LIBRARY iphlpapi.lib)
   IF(MSVC AND (CMAKE_CXX_COMPILER_ID MATCHES Clang))
     # Connect does not work with clang-cl
@@ -323,19 +319,27 @@
 
 IF(CONNECT_WITH_REST)
   MESSAGE(STATUS "=====> REST support is ON")
-  FIND_PACKAGE(cpprestsdk)
+  SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp tabrest.h)
+  add_definitions(-DREST_SUPPORT)
+  FIND_PACKAGE(cpprestsdk QUIET)
   IF (cpprestsdk_FOUND)
-    MESSAGE(STATUS "=====> cpprestsdk found")
 	IF(UNIX)
 #     INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR})
 #     If needed edit next line to set the path to libcpprest.so
       SET(REST_LIBRARY -lcpprest)
       MESSAGE (STATUS ${REST_LIBRARY})
+	ELSE(NOT UNIX)
+#     Next line sets debug compile mode matching cpprest_2_10d.dll
+#     when it was binary installed (can be change later in Visual Studio)
+#     Comment it out if not needed depending on your cpprestsdk installation.
+	  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
 	ENDIF(UNIX)
-    SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp restget.cpp tabrest.h)
-    add_definitions(-DREST_SUPPORT)
+#   IF(REST_LIBRARY)     why this? how about Windows
+    SET(CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp)
+    add_definitions(-DREST_SOURCE)
+#   ENDIF()
   ELSE(NOT cpprestsdk_FOUND)
-    MESSAGE(STATUS "=====> cpprestsdk package not found")
+#    MESSAGE(STATUS "=====> cpprestsdk package not found")
   ENDIF (cpprestsdk_FOUND)
 ENDIF(CONNECT_WITH_REST)
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/connect.cc mariadb-10.3-10.3.22/storage/connect/connect.cc
--- mariadb-10.3-10.3.18/storage/connect/connect.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/connect.cc	2020-01-26 18:37:29.000000000 +0000
@@ -16,7 +16,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
 
 /***********************************************************************/
-/*  Author Olivier BERTRAND  bertrandop@gmail.com         2004-2017    */
+/*  Author Olivier BERTRAND  bertrandop@gmail.com         2004-2019    */
 /*                                                                     */
 /*  WHAT THIS PROGRAM DOES:                                            */
 /*  -----------------------                                            */
@@ -389,6 +389,9 @@
 	try {
 		for (colp = tdbp->GetColumns(); rc == RC_OK && colp;
 			colp = colp->GetNext()) {
+			xtrc(2, "Going to read column %s of table %s\n",
+				colp->GetName(), tdbp->GetName());
+
 			if (reset)
 				colp->Reset();
 
@@ -563,7 +566,7 @@
 			rc = tdbp->DeleteDB(g, RC_EF);    // Specific A.M. delete routine
 
 	} else if (tdbp->GetMode() == MODE_UPDATE && tdbp->IsIndexed())
-		rc = ((PTDBDOX)tdbp)->Txfp->UpdateSortedRows(g);
+		rc = ((PTDBDOS)tdbp)->GetTxfp()->UpdateSortedRows(g);
 
 	switch (rc) {
 		case RC_FX:
@@ -590,7 +593,7 @@
 
 			if (!tdbp->IsRemote()) {
 				// Make all the eventual indexes
-				PTDBDOX tbxp = (PTDBDOX)tdbp;
+				PTDBDOS tbxp = (PTDBDOS)tdbp;
 				tbxp->ResetKindex(g, NULL);
 				tbxp->SetKey_Col(NULL);
 				rc = tbxp->ResetTableOpt(g, true, tbxp->GetDef()->Indexable() == 1);
@@ -619,8 +622,8 @@
 int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted)
   {
   PIXDEF  xdp;
-  PTDBDOX tdbp;
-  DOXDEF *dfp;
+  PTDBDOS tdbp;
+  DOSDEF *dfp;
 
   if (!ptdb)
     return -1;
@@ -630,9 +633,9 @@
   } else if (ptdb->GetDef()->Indexable() == 3) {
     return 1;
   } else
-    tdbp= (PTDBDOX)ptdb;
+    tdbp= (PTDBDOS)ptdb;
 
-  dfp= (DOXDEF*)tdbp->To_Def;
+  dfp= (DOSDEF*)tdbp->GetDef();
 
 //if (!(k= colp->GetKey()))
 //  if (colp->GetOpt() >= 2) {
@@ -642,16 +645,16 @@
       // This is a pseudo indexed sorted block optimized column
 //    return 0;
 
-  if (tdbp->To_Kindex)
-    if (((XXBASE*)tdbp->To_Kindex)->GetID() == id) {
-      tdbp->To_Kindex->Reset();                // Same index
-      return (tdbp->To_Kindex->IsMul()) ? 2 : 1;
+  if (tdbp->GetKindex())
+    if (((XXBASE*)tdbp->GetKindex())->GetID() == id) {
+      tdbp->GetKindex()->Reset();                // Same index
+      return (tdbp->GetKindex()->IsMul()) ? 2 : 1;
     } else {
-      tdbp->To_Kindex->Close();
-      tdbp->To_Kindex= NULL;
+      tdbp->GetKindex()->Close();
+      tdbp->SetKindex(NULL);
     } // endif colp
 
-  for (xdp= dfp->To_Indx; xdp; xdp= xdp->GetNext())
+  for (xdp= dfp->GetIndx(); xdp; xdp= xdp->GetNext())
     if (xdp->GetID() == id)
       break;
 
@@ -673,7 +676,7 @@
   if (tdbp->InitialyzeIndex(g, xdp, sorted))
     return 0;
 
-  return (tdbp->To_Kindex->IsMul()) ? 2 : 1;
+  return (tdbp->GetKindex()->IsMul()) ? 2 : 1;
   } // end of CntIndexInit
 
 #if defined(WORDS_BIGENDIAN)
@@ -707,7 +710,7 @@
   int     n, x;
   RCODE   rc;
   XXBASE *xbp;
-	PTDBDOX tdbp;
+	PTDBDOS tdbp;
 
   if (!ptdb)
     return RC_FX;
@@ -733,12 +736,12 @@
 
     goto rnd;
   } else
-    tdbp= (PTDBDOX)ptdb;
+    tdbp= (PTDBDOS)ptdb;
 
   // Set reference values and index operator
-  if (!tdbp->To_Link || !tdbp->To_Kindex) {
+  if (!tdbp->GetLink() || !tdbp->GetKindex()) {
 //  if (!tdbp->To_Xdp) {
-      sprintf(g->Message, "Index not initialized for table %s", tdbp->Name);
+      sprintf(g->Message, "Index not initialized for table %s", tdbp->GetName());
       return RC_FX;
 #if 0
       } // endif !To_Xdp
@@ -751,7 +754,7 @@
 #endif // 0
     } // endif !To_Kindex
 
-  xbp= (XXBASE*)tdbp->To_Kindex;
+  xbp= (XXBASE*)tdbp->GetKindex();
 
   if (kr) {
 		char   *kp= (char*)kr->key;
@@ -761,13 +764,13 @@
 		PVAL    valp;
 		PCOL    colp;
 
-    for (n= 0; n < tdbp->Knum; n++) {
-      colp= (PCOL)tdbp->To_Key_Col[n];
+    for (n= 0; n < tdbp->GetKnum(); n++) {
+      colp= (PCOL)tdbp->Key(n);
 
       if (colp->GetColUse(U_NULLS))
         kp++;                   // Skip null byte
 
-      valp= tdbp->To_Link[n]->GetValue();
+      valp= tdbp->Link(n)->GetValue();
 
       if (!valp->IsTypeNum()) {
         if (colp->GetColUse(U_VAR)) {
@@ -837,7 +840,7 @@
   bool    b, rcb;
   PVAL    valp;
   PCOL    colp;
-  PTDBDOX tdbp;
+  PTDBDOS tdbp;
   XXBASE *xbp;
 
   if (!ptdb)
@@ -862,35 +865,35 @@
 
     return k[1] - k[0] + 1;
   } else
-    tdbp= (PTDBDOX)ptdb;
+    tdbp= (PTDBDOS)ptdb;
 
-  if (!tdbp->To_Kindex || !tdbp->To_Link) {
-    if (!tdbp->To_Xdp) {
-      sprintf(g->Message, "Index not initialized for table %s", tdbp->Name);
+  if (!tdbp->GetKindex() || !tdbp->GetLink()) {
+    if (!tdbp->GetXdp()) {
+      sprintf(g->Message, "Index not initialized for table %s", tdbp->GetName());
       DBUG_PRINT("Range", ("%s", g->Message));
       return -1;
     } else       // Dynamic index
-      return tdbp->To_Xdp->GetMaxSame();     // TODO a better estimate
+      return tdbp->GetXdp()->GetMaxSame();     // TODO a better estimate
 
   } else
-    xbp= (XXBASE*)tdbp->To_Kindex;
+    xbp= (XXBASE*)tdbp->GetKindex();
 
   for (b= false, i= 0; i < 2; i++) {
     p= kp= key[i];
 
     if (kp) {
-      for (n= 0; n < tdbp->Knum; n++) {
+      for (n= 0; n < tdbp->GetKnum(); n++) {
         if (kmap[i] & (key_part_map)(1 << n)) {
           if (b == true)
             // Cannot do indexing with missing intermediate key
             return -1;
 
-          colp= (PCOL)tdbp->To_Key_Col[n];
+          colp= (PCOL)tdbp->Key(n);
 
           if (colp->GetColUse(U_NULLS))
             p++;                   // Skip null byte  ???
 
-          valp= tdbp->To_Link[n]->GetValue();
+          valp= tdbp->Link(n)->GetValue();
 
           if (!valp->IsTypeNum()) {
             if (colp->GetColUse(U_VAR)) {
diff -Nru mariadb-10.3-10.3.18/storage/connect/connect.h mariadb-10.3-10.3.22/storage/connect/connect.h
--- mariadb-10.3-10.3.18/storage/connect/connect.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/connect.h	2020-01-26 18:37:29.000000000 +0000
@@ -46,6 +46,7 @@
                     bool *incl, key_part_map *kmap);
 PGLOBAL CntExit(PGLOBAL g);
 
+#if 0
 /***********************************************************************/
 /*  Definition of classes XKPDEF, DOXDEF, TDBDOX                       */
 /*  These classes purpose is chiefly to access protected items!        */
@@ -76,3 +77,4 @@
  public:
   XKPDEF(const char *name, int n) : KPARTDEF((PSZ)name, n) {}
   }; // end of class XKPDEF
+#endif // 0
diff -Nru mariadb-10.3-10.3.18/storage/connect/filamzip.cpp mariadb-10.3-10.3.22/storage/connect/filamzip.cpp
--- mariadb-10.3-10.3.18/storage/connect/filamzip.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/filamzip.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -700,7 +700,7 @@
 	} // endif rc
 
 	if (trace(1))
-		htrc("Openning entry%s %s\n", fn, (entryopen) ? "oked" : "failed");
+		htrc("Opening entry%s %s\n", fn, (entryopen) ? "oked" : "failed");
 
 	return !entryopen;
 }	// end of openEntry
diff -Nru mariadb-10.3-10.3.18/storage/connect/filter.h mariadb-10.3-10.3.22/storage/connect/filter.h
--- mariadb-10.3-10.3.18/storage/connect/filter.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/filter.h	2020-01-26 18:37:29.000000000 +0000
@@ -48,7 +48,6 @@
           PVAL  &Val(int i) {return Test[i].Value;}
           bool  &Conv(int i) {return Test[i].Conv;}
           void   SetNext(PFIL filp) {Next = filp;}
-          bool MakeSelector(PGLOBAL g, PSTRG s);
 
   // Methods
   virtual void   Reset(void);
diff -Nru mariadb-10.3-10.3.18/storage/connect/ha_connect.cc mariadb-10.3-10.3.22/storage/connect/ha_connect.cc
--- mariadb-10.3-10.3.18/storage/connect/ha_connect.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/ha_connect.cc	2020-01-26 18:37:29.000000000 +0000
@@ -170,9 +170,9 @@
 #define JSONMAX      10             // JSON Default max grp size
 
 extern "C" {
-       char version[]= "Version 1.06.0010 June 01, 2019";
+       char version[]= "Version 1.07.0001 November 12, 2019";
 #if defined(__WIN__)
-       char compver[]= "Version 1.06.0010 " __DATE__ " "  __TIME__;
+       char compver[]= "Version 1.07.0001 " __DATE__ " "  __TIME__;
        char slash= '\\';
 #else   // !__WIN__
        char slash= '/';
@@ -704,9 +704,9 @@
   used by the default rename_table and delete_table method in
   handler.cc.
 
-  For engines that have two file name extentions (separate meta/index file
+  For engines that have two file name extensions (separate meta/index file
   and data file), the order of elements is relevant. First element of engine
-  file name extentions array should be meta/index file extention. Second
+  file name extensions array should be meta/index file extention. Second
   element - data file extention. This order is assumed by
   prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued.
 
@@ -1043,6 +1043,8 @@
 				case TAB_REST:
 					type = TAB_NIY;
 					break;
+				default:
+					break;
 			}	// endswitch type
 #endif   // REST_SUPPORT
 
@@ -2962,10 +2964,12 @@
 			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;
+#if MYSQL_VERSION_ID > 100200
 			case Item_func::LIKE_FUNC:
-				vop= OP_LIKE; 
-				neg= ((Item_func_opt_neg *)condf)->negated;
-				break;
+				vop = OP_LIKE;
+			  neg= ((Item_func_like*)condf)->negated;
+			  break;
+#endif // VERSION_ID > 100200
 			case Item_func::ISNOTNULL_FUNC:
 				neg= true;	
 				// fall through
@@ -3783,9 +3787,9 @@
     active_index= MAX_KEY;
     rc= HA_ERR_INTERNAL_ERROR;
   } else if (tdbp->GetKindex()) {
-    if (((PTDBDOX)tdbp)->To_Kindex->GetNum_K()) {
+    if (((PTDBDOS)tdbp)->GetKindex()->GetNum_K()) {
       if (tdbp->GetFtype() != RECFM_NAF)
-        ((PTDBDOX)tdbp)->GetTxfp()->ResetBuffer(g);
+        ((PTDBDOS)tdbp)->GetTxfp()->ResetBuffer(g);
 
       active_index= idx;
 //  } else {        // Void table
@@ -4501,34 +4505,15 @@
 		case TAB_DIR:
 		case TAB_ZIP:
 		case TAB_OEM:
-#ifdef NO_EMBEDDED_ACCESS_CHECKS
-			return false;
-			#endif
-
-			/*
-			Check FILE_ACL
-			If table or table->mdl_ticket is NULL - it's a DLL, e.g. CREATE TABLE.
-			if the table has an MDL_EXCLUSIVE lock - it's a DDL too, e.g. the
-			insert step of CREATE ... SELECT.
-			
-			Otherwise it's a DML, the table was normally opened, locked,
-			privilege were already checked, and table->grant.privilege is set.
-			With SQL SECURITY DEFINER, table->grant.privilege has definer's privileges.
-			
-			Unless we're in prelocking mode, in this case table->grant.privilege
-			is only checked in start_stmt(), not in external_lock().
-			*/
-			if (!table || !table->mdl_ticket || table->mdl_ticket->get_type() == MDL_EXCLUSIVE)
-			  return check_access(thd, FILE_ACL, db, NULL, NULL, 0, 0);
-
-			if ((!quick && thd->lex->requires_prelocking()) || table->grant.privilege & FILE_ACL)
-			  return false;
-
-			status_var_increment(thd->status_var.access_denied_errors);
-			my_error(access_denied_error_code(thd->password), MYF(0),
-			         thd->security_ctx->priv_user, thd->security_ctx->priv_host,
-			         (thd->password ?  ER(ER_YES) : ER(ER_NO)));
-			return true;
+      if (table && table->pos_in_table_list) // if SELECT
+      {
+#if MYSQL_VERSION_ID > 100200
+				Switch_to_definer_security_ctx backup_ctx(thd, table->pos_in_table_list);
+#endif // VERSION_ID > 100200
+        return check_global_access(thd, FILE_ACL);
+      }
+      else
+        return check_global_access(thd, FILE_ACL);
     case TAB_ODBC:
 		case TAB_JDBC:
 		case TAB_MONGO:
@@ -5651,6 +5636,8 @@
 				case TAB_CSV:
 					ttp = TAB_REST;
 					break;
+				default:
+					break;
 			}	// endswitch type
 #endif   // REST_SUPPORT
 		} // endif ttp
@@ -6060,7 +6047,7 @@
 				} // endif !nblin
 
 				for (i= 0; !rc && i < qrp->Nblin; i++) {
-					typ= len= prec= dec= 0;
+					typ= len= prec= dec= flg= 0;
 					tm= NOT_NULL_FLAG;
 					cnm= (char*)"noname";
 					dft= xtra= key= fmt= tn= NULL;
@@ -6101,6 +6088,9 @@
 									tm= 0;               // Nullable
 
 								break;
+							case FLD_FLAG:
+								flg = crp->Kdata->GetIntValue(i);
+								break;
 							case FLD_FORMAT:
 								fmt= (crp->Kdata) ? crp->Kdata->GetCharValue(i) : NULL;
 								break;
@@ -6231,7 +6221,7 @@
 
 						// Now add the field
 						if (add_field(&sql, cnm, typ, prec, dec, key, tm, rem, dft, xtra,
-							fmt, 0, dbf, v))
+							fmt, flg, dbf, v))
 							rc= HA_ERR_OUT_OF_MEM;
 				} // endfor i
 
@@ -7379,14 +7369,14 @@
   &connect_storage_engine,
   "CONNECT",
   "Olivier Bertrand",
-  "Management of External Data (SQL/NOSQL/MED), including many file formats",
+  "Management of External Data (SQL/NOSQL/MED), including Rest query results",
   PLUGIN_LICENSE_GPL,
   connect_init_func,                            /* Plugin Init */
   connect_done_func,                            /* Plugin Deinit */
-  0x0106,                                       /* version number (1.06) */
+  0x0107,                                       /* version number (1.07) */
   NULL,                                         /* status variables */
   connect_system_variables,                     /* system variables */
-  "1.06.0010",                                  /* string version */
+  "1.07.0001",                                  /* string version */
 	MariaDB_PLUGIN_MATURITY_STABLE                /* maturity */
 }
 maria_declare_plugin_end;
diff -Nru mariadb-10.3-10.3.18/storage/connect/javaconn.cpp mariadb-10.3-10.3.22/storage/connect/javaconn.cpp
--- mariadb-10.3-10.3.18/storage/connect/javaconn.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/javaconn.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -142,7 +142,7 @@
 			s = (jstring)env->CallObjectMethod(exc, tid);
 			Msg = GetUTFString(s);
 		} else
-			Msg = "Exception occured";
+			Msg = "Exception occurred";
 
 		env->ExceptionClear();
 	} else if (rc < 0) {
diff -Nru mariadb-10.3-10.3.18/storage/connect/jdbconn.cpp mariadb-10.3-10.3.22/storage/connect/jdbconn.cpp
--- mariadb-10.3-10.3.18/storage/connect/jdbconn.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/jdbconn.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -1196,9 +1196,14 @@
 	if ((rc = ExecuteQuery(sql)) != RC_OK)
 		return -1;
 
-	if ((rc = Fetch()) > 0)
-		SetColumnValue(1, NULL, colp->GetValue());
-	else
+	if ((rc = Fetch()) > 0) {
+		try {
+			SetColumnValue(1, NULL, colp->GetValue());
+		}	catch (...) {
+			return -4;
+		} // end catch
+
+	} else
 		return -2;
 
 	if ((rc = Fetch()) != 0)
diff -Nru mariadb-10.3-10.3.18/storage/connect/mycat.cc mariadb-10.3-10.3.22/storage/connect/mycat.cc
--- mariadb-10.3-10.3.18/storage/connect/mycat.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mycat.cc	2020-01-26 18:37:29.000000000 +0000
@@ -95,7 +95,7 @@
 #endif   // ZIP_SUPPORT
 #if defined(REST_SUPPORT)
 #include "tabrest.h"
-#endif   // Rest_SUPPORT
+#endif   // REST_SUPPORT
 #include "mycat.h"
 
 /***********************************************************************/
@@ -104,8 +104,9 @@
 #if defined(__WIN__)
 extern "C" HINSTANCE s_hModule;           // Saved module handle
 #endif  // !__WIN__
-
-PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info);
+#if defined(JAVA_SUPPORT) || defined(CMGO_SUPPORT)
+bool MongoEnabled(void);
+#endif   // JAVA_SUPPORT || CMGO_SUPPORT
 
 /***********************************************************************/
 /*  Get the plugin directory.                                          */
@@ -347,100 +348,6 @@
   return fnc;
   } // end of GetFuncID
 
-/***********************************************************************/
-/*  OEMColumn: Get table column info for an OEM table.                 */
-/***********************************************************************/
-PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char *tab, char *db, bool info)
-  {
-  typedef PQRYRES (__stdcall *XCOLDEF) (PGLOBAL, void*, char*, char*, bool);
-  const char *module, *subtype;
-  char    c, soname[_MAX_PATH], getname[40] = "Col";
-#if defined(__WIN__)
-  HANDLE  hdll;               /* Handle to the external DLL            */
-#else   // !__WIN__
-  void   *hdll;               /* Handle for the loaded shared library  */
-#endif  // !__WIN__
-  XCOLDEF coldef = NULL;
-  PQRYRES qrp = NULL;
-
-  module = topt->module;
-  subtype = topt->subtype;
-
-  if (!module || !subtype)
-    return NULL;
-
-  /*********************************************************************/
-  /*  Ensure that the .dll doesn't have a path.                        */
-  /*  This is done to ensure that only approved dll from the system    */
-  /*  directories are used (to make this even remotely secure).        */
-  /*********************************************************************/
-  if (check_valid_path(module, strlen(module))) {
-    strcpy(g->Message, "Module cannot contain a path");
-    return NULL;
-  } else
-    PlugSetPath(soname, module, GetPluginDir());
-
-  // The exported name is always in uppercase
-  for (int i = 0; ; i++) {
-    c = subtype[i];
-    getname[i + 3] = toupper(c);
-    if (!c) break;
-    } // endfor i
-
-#if defined(__WIN__)
-  // Load the Dll implementing the table
-  if (!(hdll = LoadLibrary(soname))) {
-    char  buf[256];
-    DWORD rc = GetLastError();
-
-    sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, soname);
-    FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
-                  FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0,
-                  (LPTSTR)buf, sizeof(buf), NULL);
-    strcat(strcat(g->Message, ": "), buf);
-    return NULL;
-    } // endif hDll
-
-  // Get the function returning an instance of the external DEF class
-  if (!(coldef = (XCOLDEF)GetProcAddress((HINSTANCE)hdll, getname))) {
-    sprintf(g->Message, MSG(PROCADD_ERROR), GetLastError(), getname);
-    FreeLibrary((HMODULE)hdll);
-    return NULL;
-    } // endif coldef
-#else   // !__WIN__
-  const char *error = NULL;
-
-  // Load the desired shared library
-  if (!(hdll = dlopen(soname, RTLD_LAZY))) {
-    error = dlerror();
-    sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
-    return NULL;
-    } // endif Hdll
-
-  // Get the function returning an instance of the external DEF class
-  if (!(coldef = (XCOLDEF)dlsym(hdll, getname))) {
-    error = dlerror();
-    sprintf(g->Message, MSG(GET_FUNC_ERR), getname, SVP(error));
-    dlclose(hdll);
-    return NULL;
-    } // endif coldef
-#endif  // !__WIN__
-
-  // Just in case the external Get function does not set error messages
-  sprintf(g->Message, "Error getting column info from %s", subtype);
-
-  // Get the table column definition
-  qrp = coldef(g, topt, tab, db, info);
-
-#if defined(__WIN__)
-  FreeLibrary((HMODULE)hdll);
-#else   // !__WIN__
-  dlclose(hdll);
-#endif  // !__WIN__
-
-  return qrp;
-  } // end of OEMColumns
-
 /* ------------------------- Class CATALOG --------------------------- */
 
 /***********************************************************************/
@@ -481,10 +388,10 @@
 /*  GetTableDesc: retrieve a table descriptor.                         */
 /*  Look for a table descriptor matching the name and type.            */
 /***********************************************************************/
-PRELDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep,
+PTABDEF MYCAT::GetTableDesc(PGLOBAL g, PTABLE tablep,
                                        LPCSTR type, PRELDEF *)
 {
-  PRELDEF tdp= NULL;
+  PTABDEF tdp= NULL;
 
   if (trace(1))
     htrc("GetTableDesc: name=%s am=%s\n", tablep->GetName(), SVP(type));
@@ -505,12 +412,12 @@
 /*  MakeTableDesc: make a table/view description.                      */
 /*  Note: caller must check if name already exists before calling it.  */
 /***********************************************************************/
-PRELDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am)
+PTABDEF MYCAT::MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am)
   {
   TABTYPE tc;
   LPCSTR  name= (PSZ)PlugDup(g, tablep->GetName());
   LPCSTR  schema= (PSZ)PlugDup(g, tablep->GetSchema());
-  PRELDEF tdp= NULL;
+  PTABDEF tdp= NULL;
 
   if (trace(1))
     htrc("MakeTableDesc: name=%s schema=%s am=%s\n",
@@ -578,8 +485,8 @@
     } // endswitch
 
   // Do make the table/view definition
-  if (tdp && tdp->Define(g, this, name, schema, am))
-    tdp= NULL;
+	if (tdp && tdp->Define(g, this, name, schema, am))
+		tdp = NULL;
 
   if (trace(1))
     htrc("Table %s made\n", am);
@@ -592,7 +499,7 @@
 /***********************************************************************/
 PTDB MYCAT::GetTable(PGLOBAL g, PTABLE tablep, MODE mode, LPCSTR type)
   {
-  PRELDEF tdp;
+  PTABDEF tdp;
   PTDB    tdbp= NULL;
 //  LPCSTR  name= tablep->GetName();
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/mycat.h mariadb-10.3-10.3.22/storage/connect/mycat.h
--- mariadb-10.3-10.3.18/storage/connect/mycat.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mycat.h	2020-01-26 18:37:29.000000000 +0000
@@ -102,14 +102,14 @@
   // Methods
   void    Reset(void);
   bool    StoreIndex(PGLOBAL, PTABDEF) {return false;}  // Temporary
-	PRELDEF GetTableDesc(PGLOBAL g, PTABLE tablep,
+	PTABDEF GetTableDesc(PGLOBAL g, PTABLE tablep,
 		                   LPCSTR type, PRELDEF *prp = NULL);
   PTDB    GetTable(PGLOBAL g, PTABLE tablep, 
                               MODE mode = MODE_READ, LPCSTR type = NULL);
   void    ClearDB(PGLOBAL g);
 
  protected:
-	PRELDEF MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am);
+	PTABDEF MakeTableDesc(PGLOBAL g, PTABLE tablep, LPCSTR am);
 
   // Members
   ha_connect *Hc;                          // The Connect handler
diff -Nru mariadb-10.3-10.3.18/storage/connect/myconn.cpp mariadb-10.3-10.3.22/storage/connect/myconn.cpp
--- mariadb-10.3-10.3.18/storage/connect/myconn.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/myconn.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -472,7 +472,7 @@
                             int pt, const char *csname)
   {
   const char *pipe = NULL;
-  uint        cto = 10, nrt = 20;
+  //uint      cto = 10, nrt = 20;
   my_bool     my_true= 1;
 
   m_DB = mysql_init(NULL);
@@ -485,11 +485,11 @@
 	if (trace(1))
 		htrc("MYSQLC Open: m_DB=%.4X size=%d\n", m_DB, (int)sizeof(*m_DB));
 
-	// Removed to do like FEDERATED do
+	// Removed to do like FEDERATED does
 //mysql_options(m_DB, MYSQL_READ_DEFAULT_GROUP, "client-mariadb");
-  mysql_options(m_DB, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL);
-  mysql_options(m_DB, MYSQL_OPT_CONNECT_TIMEOUT, &cto);
-  mysql_options(m_DB, MYSQL_OPT_READ_TIMEOUT, &nrt);
+//mysql_options(m_DB, MYSQL_OPT_USE_REMOTE_CONNECTION, NULL);
+//mysql_options(m_DB, MYSQL_OPT_CONNECT_TIMEOUT, &cto);
+//mysql_options(m_DB, MYSQL_OPT_READ_TIMEOUT, &nrt);
 //mysql_options(m_DB, MYSQL_OPT_WRITE_TIMEOUT, ...);
 
 #if defined(__WIN__)
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/disabled.def mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/disabled.def
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/disabled.def	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/disabled.def	2020-01-26 18:37:29.000000000 +0000
@@ -20,4 +20,5 @@
 mongo_java_2    : Need MongoDB running and its Java Driver installed
 mongo_java_3    : Need MongoDB running and its Java Driver installed
 tbl_thread      : Bug MDEV-9844,10179,14214 03/01/2018 OB Option THREAD removed
+grant2          : Until fixed
 #vcol            : Different error code on different versions
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/grant.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/grant.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/grant.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/grant.result	2020-01-26 18:37:29.000000000 +0000
@@ -15,7 +15,7 @@
 ftype CHAR(4) NOT NULL,
 size DOUBLE(12,0) NOT NULL flag=5
 ) ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.*';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -34,19 +34,19 @@
 user()
 user@localhost
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO t1 VALUES ();
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1 WHERE path='xxx';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET path='yyy' WHERE path='xxx';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -58,13 +58,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (1,1,1,1);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET path=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 disconnect user;
 connection default;
 SELECT user();
@@ -111,7 +111,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=BIN FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -123,23 +123,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -151,13 +151,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -173,7 +173,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
@@ -216,7 +216,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -228,23 +228,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -256,13 +256,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -278,7 +278,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
@@ -321,7 +321,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=DBF FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -333,23 +333,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -361,13 +361,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -383,7 +383,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
@@ -426,7 +426,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=FIX FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -438,23 +438,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -466,13 +466,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -488,7 +488,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
@@ -531,7 +531,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=VEC MAX_ROWS=100 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -543,23 +543,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -571,13 +571,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -593,7 +593,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/grant2.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/grant2.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/grant2.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/grant2.result	2020-01-26 18:37:29.000000000 +0000
@@ -21,12 +21,12 @@
 a
 10
 SELECT * FROM v1_baddefiner;
-ERROR 28000: Access denied for user 'root'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connect user,localhost,user,,;
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM v1_invoker;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM v1_definer;
 a
 10
@@ -44,9 +44,9 @@
 UPDATE v1_definer SET a=13;
 connection user;
 UPDATE t1 SET a=21;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker SET a=22;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_definer SET a=23;
 connection default;
 DROP VIEW v1_invoker, v1_definer;
@@ -62,9 +62,9 @@
 INSERT INTO v1_definer VALUES (13);
 connection user;
 INSERT INTO t1 VALUES (21);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_invoker VALUES (22);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_definer VALUES (23);
 connection default;
 DROP VIEW v1_invoker, v1_definer;
@@ -83,9 +83,9 @@
 ERROR 42000: CONNECT Unsupported command
 connection user;
 REPLACE INTO t1 VALUES (21);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO v1_invoker VALUES (22);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO v1_definer VALUES (23);
 ERROR 42000: CONNECT Unsupported command
 connection default;
@@ -102,9 +102,9 @@
 DELETE FROM v1_definer WHERE a=13;
 connection user;
 DELETE FROM t1 WHERE a=21;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1_invoker WHERE a=22;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1_definer WHERE a=23;
 connection default;
 DROP VIEW v1_invoker, v1_definer;
@@ -120,9 +120,9 @@
 LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer;
 connection user;
 LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_invoker;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 LOAD DATA LOCAL INFILE 'MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer;
 connection default;
 DROP VIEW v1_invoker, v1_definer;
@@ -135,7 +135,7 @@
 INSERT INTO t1 VALUES (11);
 connection user;
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_DROP_TABLE
@@ -144,7 +144,7 @@
 INSERT INTO t1 VALUES (10);
 connection user;
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_DROP_VIEW
@@ -165,7 +165,7 @@
 # Testing SQLCOM_CREATE_TABLE
 connection user;
 CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 # Testing SQLCOM_LOCK_TABLES
 connection default;
@@ -187,13 +187,13 @@
 UNLOCK TABLES;
 connection user;
 LOCK TABLE t1 READ;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 LOCK TABLE t1 WRITE;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 LOCK TABLE v1_invoker READ;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 LOCK TABLE v1_invoker WRITE;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 LOCK TABLE v1_definer READ;
 UNLOCK TABLES;
 LOCK TABLE v1_definer WRITE;
@@ -264,93 +264,93 @@
 UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 connection user;
 UPDATE t1         a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1         a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1         a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1         a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1         a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1         a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1         a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t2         a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t3         a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t3         a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t3         a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE t3         a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t3         a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE t3         a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t3         a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v1_invoker a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_definer a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_definer a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_definer a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v1_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v1_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v2_invoker a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_invoker a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_invoker a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_definer a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_definer a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_definer a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v2_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v2_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 connection default;
 DROP VIEW v1_invoker, v1_definer, v2_invoker, v2_definer;
@@ -418,93 +418,93 @@
 DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a;
 connection user;
 DELETE a1 FROM t1         a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t1         a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t1         a1,t3         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t1         a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t1         a1,v1_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t1         a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t1         a1,v2_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,t3         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,v1_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t2         a1,v2_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t3         a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t3         a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t3         a1,t3         a2 WHERE a1.a=a2.a;
 DELETE a1 FROM t3         a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t3         a1,v1_definer a2 WHERE a1.a=a2.a;
 DELETE a1 FROM t3         a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM t3         a1,v2_definer a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v1_invoker a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_invoker a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_invoker a1,t3         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_invoker a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_invoker a1,v1_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_invoker a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_invoker a1,v2_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_definer a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_definer a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_definer a1,t3         a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v1_definer a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_definer a1,v1_definer a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v1_definer a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v1_definer a1,v2_definer a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v2_invoker a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_invoker a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_invoker a1,t3         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_invoker a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_invoker a1,v1_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_invoker a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_invoker a1,v2_definer a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_definer a1,t1         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_definer a1,t2         a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_definer a1,t3         a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v2_definer a1,v1_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_definer a1,v1_definer a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v2_definer a1,v2_invoker a2 WHERE a1.a=a2.a;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a;
 connection default;
 DROP VIEW v1_invoker, v1_definer, v2_invoker, v2_definer;
@@ -521,9 +521,9 @@
 DROP VIEW v2;
 connection user;
 CREATE VIEW v2 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v2 AS SELECT * FROM v1_invoker;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v2 AS SELECT * FROM v1_definer;
 DROP VIEW v2;
 connection default;
@@ -546,21 +546,21 @@
 INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20;
 connection user;
 INSERT INTO t1         SELECT * FROM t1         WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO t1         SELECT * FROM v1_invoker WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO t1         SELECT * FROM v1_definer WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_invoker SELECT * FROM t1         WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_invoker SELECT * FROM v1_definer WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_definer SELECT * FROM t1         WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20;
 connection default;
 DROP VIEW v1_invoker, v1_definer;
@@ -591,17 +591,17 @@
 ERROR 42000: CONNECT Unsupported command
 connection user;
 REPLACE INTO t1         SELECT * FROM t1         WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO t1         SELECT * FROM v1_invoker WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO t1         SELECT * FROM v1_definer WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO v1_invoker SELECT * FROM t1         WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO v1_invoker SELECT * FROM v1_definer WHERE a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 REPLACE INTO v1_definer SELECT * FROM t1         WHERE a=20;
 ERROR 42000: CONNECT Unsupported command
 REPLACE INTO v1_definer SELECT * FROM v1_invoker WHERE a=20;
@@ -624,7 +624,7 @@
 RENAME TABLE t2 TO t1;
 connection user;
 RENAME TABLE t1 TO t2;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_ALTER_TABLE (for ALTER..RENAME)
@@ -640,7 +640,7 @@
 ALTER TABLE t2 RENAME TO t1;
 connection user;
 ALTER TABLE t1 RENAME TO t2;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_ALTER_TABLE (changing ENGINE to non-CONNECT)
@@ -653,7 +653,7 @@
 INSERT INTO t1 VALUES (10);
 connection user;
 ALTER TABLE t1 ENGINE=MyISAM;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_ALTER_TABLE (changing ENGINE to CONNECT)
@@ -669,7 +669,7 @@
 INSERT INTO t1 VALUES (10);
 connection user;
 ALTER TABLE t1 ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_OPTIMIZE
@@ -682,7 +682,7 @@
 connection user;
 OPTIMIZE TABLE t1;
 Table	Op	Msg_type	Msg_text
-test.t1	optimize	Error	Access denied for user 'user'@'localhost' (using password: NO)
+test.t1	optimize	Error	Access denied; you need (at least one of) the FILE privilege(s) for this operation
 test.t1	optimize	Error	Got error 122 'This operation requires the FILE privilege' from CONNECT
 test.t1	optimize	error	Corrupt
 connection default;
@@ -696,7 +696,7 @@
 Warning	1105	This is an outward table, table data were not modified.
 connection user;
 ALTER TABLE t1 ADD c INT;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_ALTER_TABLE (removing columns)
@@ -708,7 +708,7 @@
 Warning	1105	This is an outward table, table data were not modified.
 connection user;
 ALTER TABLE t1 DROP c;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_ALTER_TABLE (adding keys)
@@ -718,7 +718,7 @@
 ALTER TABLE t1 ADD KEY(a);
 connection user;
 ALTER TABLE t1 ADD KEY(b);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_ALTER_TABLE (removing keys)
@@ -728,7 +728,7 @@
 ALTER TABLE t1 DROP KEY a;
 connection user;
 ALTER TABLE t1 DROP KEY b;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing SQLCOM_CREATE_INDEX and SQLCOM_DROP_INDEX
@@ -740,9 +740,9 @@
 CREATE INDEX a ON t1 (a);
 connection user;
 CREATE INDEX b ON t1 (b);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP INDEX a ON t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 # Testing stored procedures
@@ -757,10 +757,10 @@
 CALL p_invoker();
 DROP TABLE t1;
 CALL p_baddefiner();
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection user;
 CALL p_invoker();
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CALL p_definer();
 connection default;
 DROP TABLE t1;
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/ini_grant.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/ini_grant.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/ini_grant.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/ini_grant.result	2020-01-26 18:37:29.000000000 +0000
@@ -34,7 +34,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -46,21 +46,21 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES ('sec2','val2');
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET val='val11';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -72,13 +72,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES ('sec3','val3');
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET val='val11';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 disconnect user;
 connection default;
 DROP VIEW v1;
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/mysql_grant.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/mysql_grant.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/mysql_grant.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/mysql_grant.result	2020-01-26 18:37:29.000000000 +0000
@@ -11,7 +11,7 @@
 user()
 user@localhost
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=PORT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -29,19 +29,19 @@
 user()
 user@localhost
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO t1 VALUES ('xxx');
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1 WHERE a='xxx';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a='yyy' WHERE a='xxx';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -53,13 +53,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 disconnect user;
 connection default;
 SELECT user();
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/xml2_grant.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/xml2_grant.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/xml2_grant.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/xml2_grant.result	2020-01-26 18:37:29.000000000 +0000
@@ -35,7 +35,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=libxml2,rownode=row' FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -47,23 +47,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -75,13 +75,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -97,7 +97,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/xml_grant.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/xml_grant.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/r/xml_grant.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/r/xml_grant.result	2020-01-26 18:37:29.000000000 +0000
@@ -33,7 +33,7 @@
 DROP VIEW v1;
 DROP TABLE t1;
 CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=XML OPTION_LIST='xmlsup=domdoc,rownode=row' FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -45,23 +45,23 @@
 user()
 user@localhost
 INSERT INTO t1 VALUES (10);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE t1 SET a=20;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 TRUNCATE TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 READONLY=1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 ALTER TABLE t1 FILE_NAME='t2.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DROP TABLE t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 CREATE VIEW v1 AS SELECT * FROM t1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 # Testing a VIEW created with FILE privileges but accessed with no FILE
 connection default;
 SELECT user();
@@ -73,13 +73,13 @@
 user()
 user@localhost
 SELECT * FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 INSERT INTO v1 VALUES (2);
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 UPDATE v1 SET a=123;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 DELETE FROM v1;
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 SELECT user();
 user()
@@ -95,7 +95,7 @@
 user()
 user@localhost
 ALTER TABLE t1 FILE_NAME='t1.EXT';
-ERROR 28000: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
 connection default;
 DROP TABLE t1;
 disconnect user;
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/grant.inc mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant.inc
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/grant.inc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant.inc	2020-01-26 18:37:29.000000000 +0000
@@ -25,7 +25,7 @@
 # Making sure DROP erased the data file
 --error 1
 --remove_file $MYSQLD_DATADIR/test/t1.$FILE_EXT
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT $TABLE_OPTIONS FILE_NAME='t1.EXT'
 --connection default
 SELECT user();
@@ -33,23 +33,23 @@
 INSERT INTO t1 VALUES (10);
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1 VALUES (10);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1 SET a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 TRUNCATE TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 READONLY=1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 FILE_NAME='t2.EXT';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DROP TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE VIEW v1 AS SELECT * FROM t1;
 --echo # Testing a VIEW created with FILE privileges but accessed with no FILE
 --connection default
@@ -57,13 +57,13 @@
 CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1;
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM v1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1 VALUES (2);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1 SET a=123;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM v1;
 --connection default
 SELECT user();
@@ -74,7 +74,7 @@
 INSERT INTO t1 VALUES (10);
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 FILE_NAME='t1.EXT';
 --connection default
 DROP TABLE t1;
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/grant.test mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant.test
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/grant.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant.test	2020-01-26 18:37:29.000000000 +0000
@@ -11,7 +11,7 @@
 --connect(user,localhost,user,,)
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE TABLE t1 (
   path VARCHAR(256) NOT NULL flag=1,
   fname VARCHAR(256) NOT NULL,
@@ -32,19 +32,19 @@
 
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1 VALUES ();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM t1 WHERE path='xxx';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1 SET path='yyy' WHERE path='xxx';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 TRUNCATE TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 READONLY=1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE VIEW v1 AS SELECT * FROM t1;
 
 --echo # Testing a VIEW created with FILE privileges but accessed with no FILE
@@ -53,13 +53,13 @@
 CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1;
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM v1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1 VALUES (1,1,1,1);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1 SET path=123;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM v1;
 
 --disconnect user
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/grant2.test mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant2.test
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/grant2.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/grant2.test	2020-01-26 18:37:29.000000000 +0000
@@ -23,13 +23,13 @@
 SELECT * FROM t1;
 SELECT * FROM v1_invoker;
 SELECT * FROM v1_definer;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM v1_baddefiner;
 
 --connect(user,localhost,user,,)
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM v1_invoker;
 SELECT * FROM v1_definer;
 --connection default
@@ -47,9 +47,9 @@
 UPDATE v1_invoker SET a=12;
 UPDATE v1_definer SET a=13;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1 SET a=21;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker SET a=22;
 UPDATE v1_definer SET a=23;
 --connection default
@@ -67,9 +67,9 @@
 INSERT INTO v1_invoker VALUES (12);
 INSERT INTO v1_definer VALUES (13);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1 VALUES (21);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1_invoker VALUES (22);
 INSERT INTO v1_definer VALUES (23);
 --connection default
@@ -79,7 +79,7 @@
 
 --echo # Testing SQLCOM_REPLACE
 # REPLACE is not supported by ConnectSE, so we're testing the difference
-# between ER_ACCESS_DENIED_ERROR vs ER_NOT_ALLOWED_COMMAND
+# between ER_SPECIFIC_ACCESS_DENIED_ERROR vs ER_NOT_ALLOWED_COMMAND
 --connection default
 CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
 INSERT INTO t1 VALUES (10);
@@ -92,9 +92,9 @@
 --error ER_NOT_ALLOWED_COMMAND
 REPLACE INTO v1_definer VALUES (13);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO t1 VALUES (21);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO v1_invoker VALUES (22);
 --error ER_NOT_ALLOWED_COMMAND
 REPLACE INTO v1_definer VALUES (23);
@@ -113,9 +113,9 @@
 DELETE FROM v1_invoker WHERE a=12;
 DELETE FROM v1_definer WHERE a=13;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM t1 WHERE a=21;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM v1_invoker WHERE a=22;
 DELETE FROM v1_definer WHERE a=23;
 --connection default
@@ -137,10 +137,10 @@
 --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer
 --connection user
 --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE t1
 --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_invoker
 --replace_result $MTR_SUITE_DIR MTR_SUITE_DIR
 --eval LOAD DATA LOCAL INFILE '$MTR_SUITE_DIR/std_data/boys.txt' INTO TABLE v1_definer
@@ -156,7 +156,7 @@
 TRUNCATE TABLE t1;
 INSERT INTO t1 VALUES (11);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 TRUNCATE TABLE t1;
 --connection default
 DROP TABLE t1;
@@ -168,7 +168,7 @@
 CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
 INSERT INTO t1 VALUES (10);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DROP TABLE t1;
 --connection default
 DROP TABLE t1;
@@ -193,7 +193,7 @@
 
 --echo # Testing SQLCOM_CREATE_TABLE
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
 --connection default
 
@@ -216,13 +216,13 @@
 LOCK TABLE v1_definer WRITE;
 UNLOCK TABLES;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 LOCK TABLE t1 READ;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 LOCK TABLE t1 WRITE;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 LOCK TABLE v1_invoker READ;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 LOCK TABLE v1_invoker WRITE;
 LOCK TABLE v1_definer READ;
 UNLOCK TABLES;
@@ -299,108 +299,108 @@
 --connection user
 
 # All queries with t1 should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1         a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
 # All queries with t2 should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t2         a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
 # t3 does not need FILE_ALC
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t3         a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t3         a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
 # This is OK:
 UPDATE t3         a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t3         a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
 # This is OK:
 UPDATE t3         a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t3         a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
 # This is OK:
 UPDATE t3         a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
 # All queries with v1_invoker should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
 # v1_definer does not need FILE_ACL from the invoker
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_definer a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_definer a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v1_definer a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v1_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v1_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
 # All queries with v2_invoker should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_invoker a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
 # v2_definer does not need FILE_ACL from the invoker
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_definer a1,t1         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_definer a1,t2         a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v2_definer a1,t3         a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_definer a1,v1_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v2_definer a1,v1_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v2_definer a1,v2_invoker a2 SET a1.a=50 WHERE a1.a=a2.a;
 UPDATE v2_definer a1,v2_definer a2 SET a1.a=50 WHERE a1.a=a2.a;
 
@@ -476,108 +476,108 @@
 --connection user
 
 # All queries with t1 should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,t2         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,v1_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,v2_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t1         a1,v2_definer a2 WHERE a1.a=a2.a;
 
 # All queries with t2 should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,t2         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,v1_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,v2_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t2         a1,v2_definer a2 WHERE a1.a=a2.a;
 
 # t3 does not need FILE_ALC
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t3         a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t3         a1,t2         a2 WHERE a1.a=a2.a;
 # This is OK:
 DELETE a1 FROM t3         a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t3         a1,v1_invoker a2 WHERE a1.a=a2.a;
 # This is OK:
 DELETE a1 FROM t3         a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM t3         a1,v2_invoker a2 WHERE a1.a=a2.a;
 # This is OK:
 DELETE a1 FROM t3         a1,v2_definer a2 WHERE a1.a=a2.a;
 
 # All queries with v1_invoker should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,t2         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,v1_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,v2_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_invoker a1,v2_definer a2 WHERE a1.a=a2.a;
 
 # v1_definer does not need FILE_ACL from the invoker
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_definer a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_definer a1,t2         a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v1_definer a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_definer a1,v1_invoker a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v1_definer a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v1_definer a1,v2_invoker a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v1_definer a1,v2_definer a2 WHERE a1.a=a2.a;
 
 # All queries with v2_invoker should fail
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,t2         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,v1_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,v2_invoker a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_invoker a1,v2_definer a2 WHERE a1.a=a2.a;
 
 # v2_definer does not need FILE_ACL from the invoker
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_definer a1,t1         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_definer a1,t2         a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v2_definer a1,t3         a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_definer a1,v1_invoker a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v2_definer a1,v1_definer a2 WHERE a1.a=a2.a;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE a1 FROM v2_definer a1,v2_invoker a2 WHERE a1.a=a2.a;
 DELETE a1 FROM v2_definer a1,v2_definer a2 WHERE a1.a=a2.a;
 
@@ -598,9 +598,9 @@
 CREATE VIEW v2 AS SELECT * FROM v1_definer;
 DROP VIEW v2;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE VIEW v2 AS SELECT * FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE VIEW v2 AS SELECT * FROM v1_invoker;
 CREATE VIEW v2 AS SELECT * FROM v1_definer;
 DROP VIEW v2;
@@ -625,21 +625,21 @@
 INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20;
 INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1         SELECT * FROM t1         WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1         SELECT * FROM v1_invoker WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1         SELECT * FROM v1_definer WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1_invoker SELECT * FROM t1         WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1_invoker SELECT * FROM v1_definer WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1_definer SELECT * FROM t1         WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1_definer SELECT * FROM v1_invoker WHERE a=20;
 # This is OK:
 INSERT INTO v1_definer SELECT * FROM v1_definer WHERE a=20;
@@ -650,7 +650,7 @@
 
 --echo # Testing SQLCOM_REPLACE_SELECT
 # REPLACE is not supported by CONNECT
-# so we're testing ER_NOT_ALLOWED_COMMAND vs ER_ACCESS_DENIED_ERROR here
+# so we're testing ER_NOT_ALLOWED_COMMAND vs ER_SPECIFIC_ACCESS_DENIED_ERROR here
 --connection default
 CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
 INSERT INTO t1 VALUES (10);
@@ -676,17 +676,17 @@
 REPLACE INTO v1_definer SELECT * FROM v1_definer WHERE a=20;
 
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO t1         SELECT * FROM t1         WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO t1         SELECT * FROM v1_invoker WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO t1         SELECT * FROM v1_definer WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO v1_invoker SELECT * FROM t1         WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO v1_invoker SELECT * FROM v1_invoker WHERE a=20;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 REPLACE INTO v1_invoker SELECT * FROM v1_definer WHERE a=20;
 --error ER_NOT_ALLOWED_COMMAND
 REPLACE INTO v1_definer SELECT * FROM t1         WHERE a=20;
@@ -708,7 +708,7 @@
 RENAME TABLE t2 TO t1;
 --connection user
 # TODO: Perhaps FILE_ACL is needed for RENAME. Discuss with Oliver.
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 RENAME TABLE t1 TO t2;
 --connection default
 DROP TABLE t1;
@@ -723,7 +723,7 @@
 ALTER TABLE t2 RENAME TO t1;
 --connection user
 # TODO: Perhaps FILE_ACL is not needed for ALTER..RENAME. Discuss with Olivier.
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 RENAME TO t2;
 --connection default
 DROP TABLE t1;
@@ -739,7 +739,7 @@
 CREATE TABLE t1 (a INT) ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
 INSERT INTO t1 VALUES (10);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 ENGINE=MyISAM;
 --connection default
 DROP TABLE t1;
@@ -756,7 +756,7 @@
 CREATE TABLE t1 (a INT) ENGINE=MyISAM;
 INSERT INTO t1 VALUES (10);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 ENGINE=CONNECT TABLE_TYPE=fix FILE_NAME='t1.fix';
 --connection default
 DROP TABLE t1;
@@ -779,7 +779,7 @@
 INSERT INTO t1 VALUES (10);
 ALTER TABLE t1 ADD b INT;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 ADD c INT;
 --connection default
 DROP TABLE t1;
@@ -791,7 +791,7 @@
 INSERT INTO t1 VALUES (10,10,10);
 ALTER TABLE t1 DROP b;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 DROP c;
 --connection default
 DROP TABLE t1;
@@ -803,7 +803,7 @@
 INSERT INTO t1 VALUES (10,10);
 ALTER TABLE t1 ADD KEY(a);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 ADD KEY(b);
 --connection default
 DROP TABLE t1;
@@ -816,7 +816,7 @@
 INSERT INTO t1 VALUES (10,10);
 ALTER TABLE t1 DROP KEY a;
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 DROP KEY b;
 --connection default
 DROP TABLE t1;
@@ -831,9 +831,9 @@
 DROP INDEX a ON t1;
 CREATE INDEX a ON t1 (a);
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE INDEX b ON t1 (b);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DROP INDEX a ON t1;
 --connection default
 DROP TABLE t1;
@@ -852,11 +852,11 @@
 DROP TABLE t1;
 CALL p_invoker();
 DROP TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CALL p_baddefiner();
 
 --connection user
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CALL p_invoker();
 CALL p_definer();
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/ini_grant.result mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/ini_grant.result
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/ini_grant.result	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/ini_grant.result	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,89 @@
+#
+# Checking FILE privileges
+#
+set sql_mode="";
+GRANT ALL PRIVILEGES ON *.* TO user@localhost;
+REVOKE FILE ON *.* FROM user@localhost;
+set sql_mode=default;
+connect user,localhost,user,,;
+connection user;
+SELECT user();
+user()
+user@localhost
+CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI;
+Warnings:
+Warning	1105	No file name. Table will use t1.ini
+INSERT INTO t1 VALUES ('sec1','val1');
+SELECT * FROM t1;
+sec	val
+sec1	val1
+UPDATE t1 SET val='val11';
+SELECT * FROM t1;
+sec	val
+sec1	val11
+DELETE FROM t1;
+SELECT * FROM t1;
+sec	val
+INSERT INTO t1 VALUES('sec2','val2');
+TRUNCATE TABLE t1;
+SELECT * FROM t1;
+sec	val
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT * FROM v1;
+sec	val
+DROP VIEW v1;
+DROP TABLE t1;
+CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT';
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+connection default;
+SELECT user();
+user()
+root@localhost
+CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT';
+INSERT INTO t1 VALUES ('sec1','val1');
+connection user;
+SELECT user();
+user()
+user@localhost
+INSERT INTO t1 VALUES ('sec2','val2');
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+SELECT * FROM t1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+UPDATE t1 SET val='val11';
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+DELETE FROM t1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+TRUNCATE TABLE t1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+ALTER TABLE t1 READONLY=1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+DROP TABLE t1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+CREATE VIEW v1 AS SELECT * FROM t1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+# Testing a VIEW created with FILE privileges but accessed with no FILE
+connection default;
+SELECT user();
+user()
+root@localhost
+CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1;
+connection user;
+SELECT user();
+user()
+user@localhost
+SELECT * FROM v1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+INSERT INTO v1 VALUES ('sec3','val3');
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+UPDATE v1 SET val='val11';
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+DELETE FROM v1;
+ERROR 42000: Access denied; you need (at least one of) the FILE privilege(s) for this operation
+disconnect user;
+connection default;
+DROP VIEW v1;
+DROP TABLE t1;
+DROP USER user@localhost;
+#
+# Checking FILE privileges: done
+#
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/ini_grant.test mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/ini_grant.test
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/ini_grant.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/ini_grant.test	2020-01-26 18:37:29.000000000 +0000
@@ -29,7 +29,7 @@
 # Making sure DROP erased the data file
 --error 1
 --remove_file $MYSQLD_DATADIR/test/t1.ini
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE TABLE t1 (sec CHAR(10) NOT NULL FLAG=1, val CHAR(10) NOT NULL) ENGINE=CONNECT TABLE_TYPE=INI FILE_NAME='t1.EXT';
 --connection default
 SELECT user();
@@ -37,21 +37,21 @@
 INSERT INTO t1 VALUES ('sec1','val1');
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1 VALUES ('sec2','val2');
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1 SET val='val11';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 TRUNCATE TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 READONLY=1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DROP TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE VIEW v1 AS SELECT * FROM t1;
 --echo # Testing a VIEW created with FILE privileges but accessed with no FILE
 --connection default
@@ -59,13 +59,13 @@
 CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1;
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM v1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1 VALUES ('sec3','val3');
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1 SET val='val11';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM v1;
 --disconnect user
 --connection default
diff -Nru mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/mysql_grant.test mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/mysql_grant.test
--- mariadb-10.3-10.3.18/storage/connect/mysql-test/connect/t/mysql_grant.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/mysql-test/connect/t/mysql_grant.test	2020-01-26 18:37:29.000000000 +0000
@@ -27,7 +27,7 @@
 --connection user
 SELECT user();
 --replace_result $PORT PORT
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 --eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=CONNECT TABLE_TYPE=MySQL OPTION_LIST='host=localhost,user=root1,port=$PORT'
 --connection default
 SELECT user();
@@ -38,19 +38,19 @@
 SELECT * FROM t1;
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO t1 VALUES ('xxx');
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM t1 WHERE a='xxx';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE t1 SET a='yyy' WHERE a='xxx';
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 TRUNCATE TABLE t1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 ALTER TABLE t1 READONLY=1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 CREATE VIEW v1 AS SELECT * FROM t1;
 
 --echo # Testing a VIEW created with FILE privileges but accessed with no FILE
@@ -59,13 +59,13 @@
 CREATE SQL SECURITY INVOKER VIEW v1 AS SELECT * FROM t1;
 --connection user
 SELECT user();
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 SELECT * FROM v1;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 INSERT INTO v1 VALUES (2);
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 UPDATE v1 SET a=123;
---error ER_ACCESS_DENIED_ERROR
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
 DELETE FROM v1;
 
 --disconnect user
diff -Nru mariadb-10.3-10.3.18/storage/connect/plgdbsem.h mariadb-10.3-10.3.22/storage/connect/plgdbsem.h
--- mariadb-10.3-10.3.18/storage/connect/plgdbsem.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/plgdbsem.h	2020-01-26 18:37:29.000000000 +0000
@@ -149,16 +149,22 @@
 	        TYPE_AM_MGO   = 194,				/* MGO access method type no     */
 					TYPE_AM_OUT   = 200};       /* Output relations (storage)    */
 
-enum RECFM {RECFM_NAF   =    -2,      /* Not a file                    */
-            RECFM_OEM   =    -1,      /* OEM file access method        */
-            RECFM_VAR   =     0,      /* Varying length DOS files      */
-            RECFM_FIX   =     1,      /* Fixed length DOS files        */
-            RECFM_BIN   =     2,      /* Binary DOS files (also fixed) */
-            RECFM_VCT   =     3,      /* VCT formatted files           */
-            RECFM_ODBC  =     4,      /* Table accessed via ODBC       */
-						RECFM_JDBC  =     5,      /* Table accessed via JDBC       */
-						RECFM_PLG   =     6,      /* Table accessed via PLGconn    */
-            RECFM_DBF   =     7};     /* DBase formatted file          */
+enum RECFM {RECFM_DFLT  =     0,      /* Default table type            */
+            RECFM_NAF   =     1,      /* Not a file table              */
+            RECFM_OEM   =     2,      /* OEM table                     */
+            RECFM_VAR   =     3,      /* Varying length DOS files      */
+            RECFM_FIX   =     4,      /* Fixed length DOS files        */
+            RECFM_BIN   =     5,      /* Binary DOS files (also fixed) */
+						RECFM_DBF   =     6,      /* DBase formatted file          */
+						RECFM_CSV   =     7,      /* CSV file                      */
+						RECFM_FMT   =     8,      /* FMT formatted file            */
+						RECFM_VCT   =     9,      /* VCT formatted files           */
+						RECFM_XML   =    10,      /* XML formatted files           */
+						RECFM_JASON =    11,      /* JASON formatted files         */
+						RECFM_DIR   =    12,      /* DIR table                     */
+						RECFM_ODBC  =    13,      /* Table accessed via ODBC       */
+						RECFM_JDBC  =    14,      /* Table accessed via JDBC       */
+						RECFM_PLG   =    15};     /* Table accessed via PLGconn    */
 
 enum MISC {DB_TABNO     =     1,      /* DB routines in Utility Table  */
            MAX_MULT_KEY =    10,      /* Max multiple key number       */
@@ -537,7 +543,8 @@
            FLD_FORMAT   = 16,         /* Field format                  */
            FLD_CAT      = 17,         /* Table catalog                 */
            FLD_SCHEM    = 18,         /* Table schema                  */
-           FLD_TABNAME  = 19};        /* Column Table name             */
+           FLD_TABNAME  = 19,         /* Column Table name             */
+					 FLD_FLAG     = 20};        /* Field flag (CONNECT specific) */
 
 /***********************************************************************/
 /*  Result of last SQL noconv query.                                   */
diff -Nru mariadb-10.3-10.3.18/storage/connect/reldef.cpp mariadb-10.3-10.3.22/storage/connect/reldef.cpp
--- mariadb-10.3-10.3.18/storage/connect/reldef.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/reldef.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -1,11 +1,11 @@
 /************* RelDef CPP Program Source Code File (.CPP) **************/
 /* PROGRAM NAME: RELDEF                                                */
 /* -------------                                                       */
-/*  Version 1.6                                                        */
+/*  Version 1.7                                                        */
 /*                                                                     */
 /* COPYRIGHT:                                                          */
 /* ----------                                                          */
-/*  (C) Copyright to the author Olivier BERTRAND          2004-2016    */
+/*  (C) Copyright to the author Olivier BERTRAND          2004-2019    */
 /*                                                                     */
 /* WHAT THIS PROGRAM DOES:                                             */
 /* -----------------------                                             */
@@ -20,7 +20,7 @@
 #if defined(__WIN__)
 #include 
 #else
-#include           // dlopen(), dlclose(), dlsym() ...
+//#include           // dlopen(), dlclose(), dlsym() ...
 #include "osutil.h"
 //#include "sqlext.h"
 #endif
@@ -61,6 +61,102 @@
 /***********************************************************************/
 USETEMP UseTemp(void);
 char   *GetPluginDir(void);
+PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info);
+
+/***********************************************************************/
+/*  OEMColumns: Get table column info for an OEM table.                */
+/***********************************************************************/
+PQRYRES OEMColumns(PGLOBAL g, PTOS topt, char* tab, char* db, bool info)
+{
+	typedef PQRYRES(__stdcall* XCOLDEF) (PGLOBAL, void*, char*, char*, bool);
+	const char* module, * subtype;
+	char    c, soname[_MAX_PATH], getname[40] = "Col";
+#if defined(__WIN__)
+	HANDLE  hdll;               /* Handle to the external DLL            */
+#else   // !__WIN__
+	void* hdll;               /* Handle for the loaded shared library  */
+#endif  // !__WIN__
+	XCOLDEF coldef = NULL;
+	PQRYRES qrp = NULL;
+
+	module = topt->module;
+	subtype = topt->subtype;
+
+	if (!module || !subtype)
+		return NULL;
+
+	/*********************************************************************/
+	/*  Ensure that the .dll doesn't have a path.                        */
+	/*  This is done to ensure that only approved dll from the system    */
+	/*  directories are used (to make this even remotely secure).        */
+	/*********************************************************************/
+	if (check_valid_path(module, strlen(module))) {
+		strcpy(g->Message, "Module cannot contain a path");
+		return NULL;
+	}
+	else
+		PlugSetPath(soname, module, GetPluginDir());
+
+	// The exported name is always in uppercase
+	for (int i = 0; ; i++) {
+		c = subtype[i];
+		getname[i + 3] = toupper(c);
+		if (!c) break;
+	} // endfor i
+
+#if defined(__WIN__)
+	// Load the Dll implementing the table
+	if (!(hdll = LoadLibrary(soname))) {
+		char  buf[256];
+		DWORD rc = GetLastError();
+
+		sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, soname);
+		FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+			FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0,
+			(LPTSTR)buf, sizeof(buf), NULL);
+		strcat(strcat(g->Message, ": "), buf);
+		return NULL;
+	} // endif hDll
+
+// Get the function returning an instance of the external DEF class
+	if (!(coldef = (XCOLDEF)GetProcAddress((HINSTANCE)hdll, getname))) {
+		sprintf(g->Message, MSG(PROCADD_ERROR), GetLastError(), getname);
+		FreeLibrary((HMODULE)hdll);
+		return NULL;
+	} // endif coldef
+#else   // !__WIN__
+	const char* error = NULL;
+
+	// Load the desired shared library
+	if (!(hdll = dlopen(soname, RTLD_LAZY))) {
+		error = dlerror();
+		sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
+		return NULL;
+	} // endif Hdll
+
+// Get the function returning an instance of the external DEF class
+	if (!(coldef = (XCOLDEF)dlsym(hdll, getname))) {
+		error = dlerror();
+		sprintf(g->Message, MSG(GET_FUNC_ERR), getname, SVP(error));
+		dlclose(hdll);
+		return NULL;
+	} // endif coldef
+#endif  // !__WIN__
+
+	// Just in case the external Get function does not set error messages
+	sprintf(g->Message, "Error getting column info from %s", subtype);
+
+	// Get the table column definition
+	qrp = coldef(g, topt, tab, db, info);
+
+#if defined(__WIN__)
+	FreeLibrary((HMODULE)hdll);
+#else   // !__WIN__
+	dlclose(hdll);
+#endif  // !__WIN__
+
+	return qrp;
+} // end of OEMColumns
 
 /* --------------------------- Class RELDEF -------------------------- */
 
@@ -208,6 +304,7 @@
   {
   Schema = NULL;
   Desc = NULL;
+	Recfm = RECFM_DFLT;
   Catfunc = FNC_NO;
   Card = 0;
   Elemt = 0;
@@ -221,11 +318,38 @@
   } // end of TABDEF constructor
 
 /***********************************************************************/
+/*  Return the table format.                                           */
+/***********************************************************************/
+RECFM TABDEF::GetTableFormat(const char* type)
+{
+	RECFM recfm = Recfm;
+
+	if (Catfunc != FNC_NO)
+		recfm = RECFM_NAF;
+	else if (recfm == RECFM_DFLT)
+		// Default format depends on the table type
+		switch (GetTypeID(type)) {
+		case TAB_DOS: recfm = RECFM_VAR; break;
+		case TAB_CSV: recfm = RECFM_CSV; break;
+		case TAB_FMT: recfm = RECFM_FMT; break;
+		case TAB_FIX: recfm = RECFM_FIX; break;
+		case TAB_BIN: recfm = RECFM_BIN; break;
+		case TAB_VEC: recfm = RECFM_VCT; break;
+		case TAB_DBF: recfm = RECFM_DBF; break;
+		case TAB_XML: recfm = RECFM_XML; break;
+		case TAB_DIR: recfm = RECFM_DIR; break;
+		default:			recfm = RECFM_NAF; break;
+		} // endswitch type
+
+	return recfm;
+} // end of GetTableFormat
+
+/***********************************************************************/
 /*  Define: initialize the table definition block from XDB file.       */
 /***********************************************************************/
 bool TABDEF::Define(PGLOBAL g, PCATLG cat,
                     LPCSTR name, LPCSTR schema, LPCSTR am)
-  {
+{
   int   poff = 0;
 
   Hc = ((MYCAT*)cat)->GetHandler();
@@ -243,13 +367,17 @@
                   NULL;
   csname = GetStringCatInfo(g, "Table_charset", NULL);
 
-  // Get The column definitions
-  if ((poff = GetColCatInfo(g)) < 0)
-    return true;
-
-  // Do the definition of AM specific fields
-  return DefineAM(g, am, poff);
-  } // end of Define
+	// Do the definition of AM specific fields
+	if (DefineAM(g, am, 0))
+		return true;
+
+	// Get The column definitions
+	if (stricmp(am, "OEM") && GetColCatInfo(g) < 0)
+		return true;
+
+	Hc->tshp = NULL;    // TO BE CHECKED
+	return false;
+} // end of Define
 
 /***********************************************************************/
 /*  This function returns the database data path.                      */
@@ -264,71 +392,71 @@
 /***********************************************************************/
 int TABDEF::GetColCatInfo(PGLOBAL g)
   {
-  char    *type= GetStringCatInfo(g, "Type", "*");
+  char    *type = GetStringCatInfo(g, "Type", "*");
   char     c, fty, eds;
   int      i, n, loff, poff, nof, nlg;
-  void    *field= NULL;
-  TABTYPE  tc;
-  PCOLDEF  cdp, lcdp= NULL, tocols= NULL;
+  void    *field = NULL;
+  RECFM    trf;
+  PCOLDEF  cdp, lcdp = NULL, tocols= NULL;
   PCOLINFO pcf= (PCOLINFO)PlugSubAlloc(g, NULL, sizeof(COLINFO));
 
   memset(pcf, 0, sizeof(COLINFO));
 
-  // Get a unique char identifier for type
-  tc= (Catfunc == FNC_NO) ? GetTypeID(type) : TAB_PRX;
+  // Get the table format
+	trf = GetTableFormat(type);
 
   // Take care of the column definitions
   i= poff= nof= nlg= 0;
 
 #if defined(__WIN__)
   // Offsets of HTML and DIR tables start from 0, DBF at 1
-  loff= (tc == TAB_DBF) ? 1 : (tc == TAB_XML || tc == TAB_DIR) ? -1 : 0;
+  loff= (trf == RECFM_DBF) ? 1 : (trf  == RECFM_XML || trf  == RECFM_DIR) ? -1 : 0;
 #else   // !__WIN__
   // Offsets of HTML tables start from 0, DIR and DBF at 1
-  loff = (tc == TAB_DBF || tc == TAB_DIR) ? 1 : (tc == TAB_XML) ? -1 : 0;
+  loff = (trf  == RECFM_DBF || trf  == RECFM_DIR) ? 1 : (trf  == RECFM_XML) ? -1 : 0;
 #endif  // !__WIN__
 
   while (true) {
-    // Default Offset depends on table type
-    switch (tc) {
-      case TAB_DOS:
-      case TAB_FIX:
-      case TAB_BIN:
-      case TAB_VEC:
-      case TAB_DBF:
+    // Default Offset depends on table format
+    switch (trf ) {
+      case RECFM_VAR:
+      case RECFM_FIX:
+      case RECFM_BIN:
+      case RECFM_VCT:
+      case RECFM_DBF:
         poff= loff + nof;        // Default next offset
         nlg= MY_MAX(nlg, poff);    // Default lrecl
         break;
-      case TAB_CSV:
-      case TAB_FMT:
+      case RECFM_CSV:
+      case RECFM_FMT:
         nlg+= nof;
-      case TAB_DIR:
-      case TAB_XML:
+      case RECFM_DIR:
+      case RECFM_XML:
         poff= loff + (pcf->Flags & U_VIRTUAL ? 0 : 1);
         break;
-      case TAB_INI:
-      case TAB_MAC:
-      case TAB_TBL:
-      case TAB_XCL:
-      case TAB_OCCUR:
-      case TAB_PRX:
-      case TAB_OEM:
+      //case RECFM_INI:
+      //case RECFM_MAC:
+      //case RECFM_TBL:
+      //case RECFM_XCL:
+      //case RECFM_OCCUR:
+      //case RECFM_PRX:
+      case RECFM_OEM:
         poff = 0;      // Offset represents an independant flag
         break;
-      default:         // VCT PLG ODBC JDBC MYSQL WMI...
+      default:         // PLG ODBC JDBC MYSQL WMI...
         poff = 0;      // NA
         break;
-      } // endswitch tc
+      } // endswitch trf 
 
 //    do {
       field= Hc->GetColumnOption(g, field, pcf);
 //    } while (field && (*pcf->Name =='*' /*|| pcf->Flags & U_VIRTUAL*/));
 
-    if (tc == TAB_DBF && pcf->Type == TYPE_DATE && !pcf->Datefmt) {
+    if (trf  == RECFM_DBF && pcf->Type == TYPE_DATE && !pcf->Datefmt) {
       // DBF date format defaults to 'YYYMMDD'
       pcf->Datefmt= "YYYYMMDD";
       pcf->Length= 8;
-      } // endif tc
+      } // endif trf 
 
     if (!field)
       break;
@@ -341,10 +469,10 @@
     else
       loff= cdp->GetOffset();
 
-    switch (tc) {
-      case TAB_VEC:
+    switch (trf ) {
+      case RECFM_VCT:
         cdp->SetOffset(0);     // Not to have shift
-      case TAB_BIN:
+      case RECFM_BIN:
         // BIN/VEC are packed by default
         if (nof) {
           // Field width is the internal representation width
@@ -395,7 +523,7 @@
 
       default:
         break;
-      } // endswitch tc
+      } // endswitch trf 
 
     if (lcdp)
       lcdp->SetNext(cdp);
@@ -413,21 +541,15 @@
   if (GetDefType() == TYPE_AM_DOS) {
     int     ending, recln= 0;
 
-    // Was commented because sometimes ending is 0 even when
-    // not specified (for instance if quoted is specified)
-//  if ((ending= Hc->GetIntegerOption("Ending")) < 0) {
-    if ((ending= Hc->GetIntegerOption("Ending")) <= 0) {
-      ending= (tc == TAB_BIN || tc == TAB_VEC) ? 0 : CRLF;
-      Hc->SetIntegerOption("Ending", ending);
-      } // endif ending
+		ending = Hc->GetIntegerOption("Ending");
 
     // Calculate the default record size
-    switch (tc) {
-      case TAB_FIX:
-      case TAB_BIN:
+    switch (trf ) {
+      case RECFM_FIX:
+      case RECFM_BIN:
         recln= nlg + ending;     // + length of line ending
         break;
-      case TAB_VEC:
+      case RECFM_VCT:
         recln= nlg;
 
 //      if ((k= (pak < 0) ? 8 : pak) > 1)
@@ -436,18 +558,18 @@
 //        recln= ((recln + k - 1) / k) * k;
 
         break;
-      case TAB_DOS:
-      case TAB_DBF:
+      case RECFM_VAR:
+      case RECFM_DBF:
         recln= nlg;
         break;
-      case TAB_CSV:
-      case TAB_FMT:
+      case RECFM_CSV:
+      case RECFM_FMT:
         // The number of separators (assuming an extra one can exist)
 //      recln= poff * ((qotd) ? 3 : 1);  to be investigated
         recln= nlg + poff * 3;     // To be safe
       default:
         break;
-      } // endswitch tc
+      } // endswitch trf 
 
     // lrecl must be at least recln to avoid buffer overflow
     if (trace(1))
@@ -461,7 +583,7 @@
     if (trace(1))
       htrc("Lrecl set to %d\n", recln);
 
-    } // endif Lrecl
+    } // endif TYPE
 
   // Attach the column definition to the tabdef
   SetCols(tocols);
@@ -500,7 +622,8 @@
     return NULL;
   } else
 //  PlugSetPath(soname, Module, GetPluginDir());  // Crashes on Fedora
-    strncat(strcpy(soname, GetPluginDir()), Module, _MAX_PATH);
+    strncat(strcpy(soname, GetPluginDir()), Module,
+			sizeof(soname) - strlen(soname) - 1);
 
 #if defined(__WIN__)
   // Is the DLL already loaded?
@@ -596,10 +719,6 @@
     cat->Cbuf = (char*)PlugSubAlloc(g, NULL, cat->Cblen);
     } // endif Cbuf
 
-  // Here "OEM" should be replace by a more useful value
-  if (xdefp->Define(g, cat, Name, Schema, "OEM"))
-    return NULL;
-
   // Ok, return external block
   return xdefp;
   } // end of GetXdef
@@ -622,7 +741,7 @@
 /***********************************************************************/
 bool OEMDEF::DefineAM(PGLOBAL g, LPCSTR, int)
   {
-  Module = GetStringCatInfo(g, "Module", "");
+	Module = GetStringCatInfo(g, "Module", "");
   Subtype = GetStringCatInfo(g, "Subtype", Module);
 
   if (!*Module)
@@ -632,7 +751,13 @@
                                           + strlen(Subtype) + 3);
   sprintf(desc, "%s(%s)", Module, Subtype);
   Desc = desc;
-  return false;
+
+	// If define block not here yet, get it now
+	if (!Pxdef && !(Pxdef = GetXdef(g)))
+		return true;            // Error
+
+	// Here "OEM" should be replace by a more useful value
+  return Pxdef->Define(g, Cat, Name, Schema, Subtype);
   } // end of DefineAM
 
 /***********************************************************************/
@@ -640,7 +765,6 @@
 /***********************************************************************/
 PTDB OEMDEF::GetTable(PGLOBAL g, MODE mode)
   {
-  RECFM rfm;
   PTDB  tdbp = NULL;
 
   // If define block not here yet, get it now
@@ -653,18 +777,10 @@
   /*********************************************************************/
   if (!(tdbp = Pxdef->GetTable(g, mode)))
     return NULL;
-  else
-    rfm = tdbp->GetFtype();
-
-  if (rfm == RECFM_NAF)
-    return tdbp;
-  else if (rfm == RECFM_OEM) {
-    if (Multiple)
-      tdbp = new(g) TDBMUL(tdbp);       // No block optimization yet
-
-    return tdbp;
-    } // endif OEM
+  else if (Multiple && tdbp->GetFtype() == RECFM_OEM)
+    tdbp = new(g) TDBMUL(tdbp);       // No block optimization yet
 
+#if 0
   /*********************************************************************/
   /*  The OEM table is based on a file type (currently DOS+ only)      */
   /*********************************************************************/
@@ -723,7 +839,7 @@
 
   if (Multiple)
     tdbp = new(g) TDBMUL(tdbp);
-
+#endif // 0
   return tdbp;
   } // end of GetTable
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/reldef.h mariadb-10.3-10.3.22/storage/connect/reldef.h
--- mariadb-10.3-10.3.18/storage/connect/reldef.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/reldef.h	2020-01-26 18:37:29.000000000 +0000
@@ -84,10 +84,12 @@
   void    SetNext(PTABDEF tdfp) {Next = tdfp;}
   int     GetMultiple(void) {return Multiple;}
   int     GetPseudo(void) {return Pseudo;}
-  PCSZ    GetPath(void);
+	RECFM   GetRecfm(void) {return Recfm;}
+	PCSZ    GetPath(void);
 //PSZ     GetPath(void)
 //          {return (Database) ? (PSZ)Database : Cat->GetDataPath();}
-  bool    SepIndex(void) {return GetBoolCatInfo("SepIndex", false);}
+	RECFM   GetTableFormat(const char* type);
+	bool    SepIndex(void) {return GetBoolCatInfo("SepIndex", false);}
   bool    IsReadOnly(void) {return Read_Only;}
   virtual AMT    GetDefType(void) {return TYPE_AM_TAB;}
   virtual PIXDEF GetIndx(void) {return NULL;}
@@ -108,7 +110,8 @@
   // Members
   PCSZ    Schema;               /* Table schema (for ODBC)             */
   PCSZ    Desc;                 /* Table description                   */
-  uint    Catfunc;              /* Catalog function ID                 */
+	RECFM   Recfm;                /* File or table format                */
+	uint    Catfunc;              /* Catalog function ID                 */
   int     Card;                 /* (max) number of rows in table       */
   int     Elemt;                /* Number of rows in blocks or rowset  */
   int     Sort;                 /* Table already sorted ???            */
diff -Nru mariadb-10.3-10.3.18/storage/connect/rest.h mariadb-10.3-10.3.22/storage/connect/rest.h
--- mariadb-10.3-10.3.18/storage/connect/rest.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/rest.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,33 +0,0 @@
-/***********************************************************************/
-/*  Definitions needed by the included files.                          */
-/***********************************************************************/
-#if !defined(MY_GLOBAL_H)
-#define MY_GLOBAL_H
-typedef unsigned int uint;
-typedef unsigned int uint32;
-typedef unsigned short ushort;
-typedef unsigned long ulong;
-typedef unsigned long DWORD;
-typedef char *LPSTR;
-typedef const char *LPCSTR;
-typedef int BOOL;
-#if defined(_WINDOWS)
-typedef void *HANDLE;
-#else
-typedef int HANDLE;
-#endif
-typedef char *PSZ;
-typedef const char *PCSZ;
-typedef unsigned char BYTE;
-typedef unsigned char uchar;
-typedef long long longlong;
-typedef unsigned long long ulonglong;
-typedef char my_bool;
-struct charset_info_st {};
-typedef const charset_info_st CHARSET_INFO;
-#define FALSE 0
-#define TRUE  1
-#define Item char
-#define MY_MAX(a,b) ((a>b)?(a):(b))
-#define MY_MIN(a,b) ((a
 #include 
-#if defined(MARIADB)
-#include 
-#else
-#include "mini-global.h"
-#define _OS_H_INCLUDED     // Prevent os.h to be called
-#endif
 
 using namespace utility::conversions; // String conversions utilities
 using namespace web;                  // Common features like URIs.
@@ -17,24 +11,26 @@
 using namespace web::http::client;    // HTTP client features
 using namespace concurrency::streams; // Asynchronous streams
 
-#include "global.h"
+typedef const char* PCSZ;
+
+extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn);
 
 /***********************************************************************/
 /*  Make a local copy of the requested file.                           */
 /***********************************************************************/
-int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn)
+int restGetFile(char *m, bool xt, PCSZ http, PCSZ uri, PCSZ fn)
 {
   int  rc = 0;
-	bool xt = trace(515);
   auto fileStream = std::make_shared();
 
   if (!http || !fn) {
-    strcpy(g->Message, "Missing http or filename");
-    return 2;
+    //strcpy(g->Message, "Missing http or filename");
+		strcpy(m, "Missing http or filename");
+		return 2;
   } // endif
 
 	if (xt)
-	  htrc("restGetFile: fn=%s\n", fn);
+		fprintf(stderr, "restGetFile: fn=%s\n", fn);
 
   // Open stream to output file.
   pplx::task requestTask = fstream::open_ostream(to_string_t(fn))
@@ -42,7 +38,7 @@
       *fileStream= outFile;
 
 			if (xt)
-				htrc("Outfile isopen=%d\n", outFile.is_open());
+				fprintf(stderr, "Outfile isopen=%d\n", outFile.is_open());
 
       // Create http_client to send the request.
       http_client client(to_string_t(http));
@@ -58,8 +54,8 @@
     // Handle response headers arriving.
     .then([=](http_response response) {
 			if (xt)
-				htrc("Received response status code:%u\n",
-                       response.status_code());
+				fprintf(stderr, "Received response status code:%u\n",
+                                  response.status_code());
 
       // Write response body into the file.
       return response.body().read_to_end(fileStream->streambuf());
@@ -68,27 +64,27 @@
     // Close the file stream.
     .then([=](size_t n) {
 			if (xt)
-			  htrc("Return size=%u\n", n);
+				fprintf(stderr, "Return size=%zu\n", n);
 
       return fileStream->close();
     });
 
   // Wait for all the outstanding I/O to complete and handle any exceptions
   try {
-    requestTask.wait();
-
 		if (xt)
-      htrc("In Wait\n");
+			fprintf(stderr, "Waiting\n");
 
+		requestTask.wait();
   } catch (const std::exception &e) {
 		if (xt)
-		  htrc("Error exception: %s\n", e.what());
-    sprintf(g->Message, "Error exception: %s", e.what());
-    rc= 1;
+			fprintf(stderr, "Error exception: %s\n", e.what());
+
+		sprintf(m, "Error exception: %s", e.what());
+		rc= 1;
   } // end try/catch
 
 	if (xt)
-	  htrc("restget done: rc=%d\n", rc);
+		fprintf(stderr, "restget done: rc=%d\n", rc);
 
   return rc;
 } // end of restGetFile
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabcmg.cpp mariadb-10.3-10.3.22/storage/connect/tabcmg.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabcmg.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabcmg.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -53,25 +53,30 @@
 {
 	if (!doc || bson_iter_init(iter, doc)) {
 		const char *key;
-		char  colname[65];
-		char 	fmt[129];
-		bool  newcol;
+		char   colname[65];
+		char 	 fmt[129];
+		bool   newcol;
+		size_t n;
 
 		while (bson_iter_next(iter)) {
 			key = bson_iter_key(iter);
 			newcol = true;
 
 			if (pcn) {
-				strncpy(colname, pcn, 64);
-				colname[64] = 0;
-				strncat(strncat(colname, "_", 65), key, 65);
+				n = sizeof(colname) - 1;
+				strncpy(colname, pcn, n);
+				colname[n] = 0;
+				n -= strlen(colname);
+				strncat(strncat(colname, "_", n), key, n - 1);
 			}	else
 				strcpy(colname, key);
 
 			if (pfmt) {
-				strncpy(fmt, pfmt, 128);
-				fmt[128] = 0;
-				strncat(strncat(fmt, ".", 129), key, 129);
+				n = sizeof(fmt) - 1;
+				strncpy(fmt, pfmt, n);
+				fmt[n] = 0;
+				n -= strlen(fmt);
+				strncat(strncat(fmt, ".", n), key, n - 1);
 			} else
 				strcpy(fmt, key);
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabdos.cpp mariadb-10.3-10.3.22/storage/connect/tabdos.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabdos.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabdos.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -45,7 +45,7 @@
 #include "global.h"
 #include "osutil.h"
 #include "plgdbsem.h"
-#include "catalog.h"
+//#include "catalog.h"
 #include "mycat.h"
 #include "xindex.h"
 #include "filamap.h"
@@ -161,7 +161,12 @@
 //Last = GetIntCatInfo("Last", 0);
   Ending = GetIntCatInfo("Ending", CRLF);
 
-  if (Recfm == RECFM_FIX || Recfm == RECFM_BIN) {
+	if (Ending <= 0) {
+		Ending = (Recfm == RECFM_BIN || Recfm == RECFM_VCT) ? 0 : CRLF;
+		SetIntCatInfo("Ending", Ending);
+	} // endif ending
+
+	if (Recfm == RECFM_FIX || Recfm == RECFM_BIN) {
     Huge = GetBoolCatInfo("Huge", Cat->GetDefHuge());
     Padded = GetBoolCatInfo("Padded", false);
     Blksize = GetIntCatInfo("Blksize", 0);
@@ -191,7 +196,8 @@
     case RECFM_FIX: ftype = ".fop"; break;
     case RECFM_BIN: ftype = ".bop"; break;
     case RECFM_VCT: ftype = ".vop"; break;
-    case RECFM_DBF: ftype = ".dbp"; break;
+		case RECFM_CSV: ftype = ".cop"; break;
+		case RECFM_DBF: ftype = ".dbp"; break;
     default:
       sprintf(g->Message, MSG(INVALID_FTYPE), Recfm);
       return true;
@@ -261,7 +267,8 @@
     case RECFM_FIX: ftype = ".fnx"; break;
     case RECFM_BIN: ftype = ".bnx"; break;
     case RECFM_VCT: ftype = ".vnx"; break;
-    case RECFM_DBF: ftype = ".dbx"; break;
+		case RECFM_CSV: ftype = ".cnx"; break;
+		case RECFM_DBF: ftype = ".dbx"; break;
     default:
       sprintf(g->Message, MSG(BAD_RECFM_VAL), Recfm);
       return true;
@@ -2257,7 +2264,7 @@
 /***********************************************************************/
 bool TDBDOS::PrepareWriting(PGLOBAL)
   {
-  if (!Ftype && (Mode == MODE_INSERT || Txfp->GetUseTemp())) {
+  if (Ftype == RECFM_VAR && (Mode == MODE_INSERT || Txfp->GetUseTemp())) {
     char *p;
 
     /*******************************************************************/
@@ -2542,7 +2549,8 @@
   /*********************************************************************/
   /*  For a variable length file, check if the field exists.           */
   /*********************************************************************/
-  if (tdbp->Ftype == RECFM_VAR && strlen(tdbp->To_Line) < (unsigned)Deplac)
+  if ((tdbp->Ftype == RECFM_VAR || tdbp->Ftype == RECFM_CSV)
+				&& strlen(tdbp->To_Line) < (unsigned)Deplac)
     field = 0;
   else if (Dsp)
     for(i = 0; i < field; i++)
@@ -2552,7 +2560,8 @@
   switch (tdbp->Ftype) {
     case RECFM_VAR:
     case RECFM_FIX:            // Fixed length text file
-    case RECFM_DBF:            // Fixed length DBase file
+		case RECFM_CSV:            // Variable length CSV or FMT file
+		case RECFM_DBF:            // Fixed length DBase file
       if (Nod) switch (Buf_Type) {
         case TYPE_INT:
         case TYPE_SHORT:
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabdos.h mariadb-10.3-10.3.22/storage/connect/tabdos.h
--- mariadb-10.3-10.3.18/storage/connect/tabdos.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabdos.h	2020-01-26 18:37:29.000000000 +0000
@@ -80,7 +80,6 @@
 	PCSZ    Entry;						  /* Zip entry name or pattern						 */
 	PCSZ    Pwd;						    /* Zip password             						 */
 	PIXDEF  To_Indx;            /* To index definitions blocks           */
-  RECFM   Recfm;              /* 0:VAR, 1:FIX, 2:BIN, 3:VCT, 6:DBF     */
   bool    Mapped;             /* 0: disk file, 1: memory mapped file   */
 	bool    Zipped;             /* true for zipped table file            */
 	bool    Mulentries;         /* true for multiple entries             */
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabfix.cpp mariadb-10.3-10.3.22/storage/connect/tabfix.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabfix.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabfix.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -84,7 +84,7 @@
 
   tp = new(g) TDBFIX(g, this);
 
-  if (Ftype < 2) {
+  if (Ftype == RECFM_VAR || Ftype == RECFM_FIX) {
     // File is text
     PDOSCOL cp1, cp2;
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabfmt.cpp mariadb-10.3-10.3.22/storage/connect/tabfmt.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabfmt.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabfmt.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -1,11 +1,11 @@
 /************* TabFmt C++ Program Source Code File (.CPP) **************/
 /* PROGRAM NAME: TABFMT                                                */
 /* -------------                                                       */
-/*  Version 3.9.2                                                      */
+/*  Version 3.9.3                                                      */
 /*                                                                     */
 /* COPYRIGHT:                                                          */
 /* ----------                                                          */
-/*  (C) Copyright to the author Olivier BERTRAND          2001 - 2017  */
+/*  (C) Copyright to the author Olivier BERTRAND          2001 - 2019  */
 /*                                                                     */
 /* WHAT THIS PROGRAM DOES:                                             */
 /* -----------------------                                             */
@@ -477,6 +477,7 @@
   if (DOSDEF::DefineAM(g, "CSV", poff))
     return true;
 
+	Recfm = RECFM_CSV;
   GetCharCatInfo("Separator", ",", buf, sizeof(buf));
   Sep = (strlen(buf) == 2 && buf[0] == '\\' && buf[1] == 't') ? '\t' : *buf;
   Quoted = GetIntCatInfo("Quoted", -1);
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabjson.cpp mariadb-10.3-10.3.22/storage/connect/tabjson.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabjson.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabjson.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -394,10 +394,11 @@
 
 bool JSONDISC::Find(PGLOBAL g, PJVAL jvp, PCSZ key, int j)
 {
-  char *p, *pc = colname + strlen(colname);
-  int   ars;
-  PJOB  job;
-  PJAR  jar;
+  char  *p, *pc = colname + strlen(colname);
+  int    ars;
+	size_t n;
+  PJOB   job;
+  PJAR   jar;
 
   if ((valp = jvp ? jvp->GetValue() : NULL)) {
     jcol.Type = valp->GetType();
@@ -423,8 +424,10 @@
           PCSZ k = jrp->GetKey();
 
           if (*k != '$') {
-            strncat(strncat(fmt, sep, 128), k, 128);
-            strncat(strncat(colname, "_", 64), k, 64);
+						n = sizeof(fmt) - strlen(fmt) -1;
+						strncat(strncat(fmt, sep, n), k, n - strlen(sep));
+						n = sizeof(colname) - strlen(colname) - 1;
+						strncat(strncat(colname, "_", n), k, n - 1);
           } // endif Key
 
           if (Find(g, jrp->GetVal(), k, j + 1))
@@ -443,19 +446,26 @@
           ars = MY_MIN(jar->GetSize(false), 1);
 
         for (int k = 0; k < ars; k++) {
-          if (!tdp->Xcol || stricmp(tdp->Xcol, key)) {
-            sprintf(buf, "%d", k);
-
-            if (tdp->Uri)
-              strncat(strncat(fmt, sep, 128), buf, 128);
-            else
-              strncat(strncat(strncat(fmt, "[", 128), buf, 128), "]", 128);
+					n = sizeof(fmt) - (strlen(fmt) + 1);
 
-            if (all)
-              strncat(strncat(colname, "_", 64), buf, 64);
+					if (!tdp->Xcol || stricmp(tdp->Xcol, key)) {
+            sprintf(buf, "%d", k);
 
-          } else
-            strncat(fmt, (tdp->Uri ? sep : "[*]"), 128);
+						if (tdp->Uri) {
+							strncat(strncat(fmt, sep, n), buf, n - strlen(sep));
+						} else {
+							strncat(strncat(fmt, "[", n), buf, n - 1);
+							strncat(fmt, "]", n - (strlen(buf) + 1));
+						} // endif uri
+
+						if (all) {
+							n = sizeof(colname) - (strlen(colname) + 1);
+							strncat(strncat(colname, "_", n), buf, n - 1);
+						} // endif all
+
+					} else {
+						strncat(fmt, (tdp->Uri ? sep : "[*]"), n);
+					}
 
           if (Find(g, jar->GetValue(k), "", j))
             return true;
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabmysql.cpp mariadb-10.3-10.3.22/storage/connect/tabmysql.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabmysql.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabmysql.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -342,11 +342,13 @@
     Delayed = !!GetIntCatInfo("Delayed", 0);
   } else {
     // MYSQL access from a PROXY table 
-    Tabschema = GetStringCatInfo(g, "Database", Tabschema ? Tabschema : PlugDup(g, "*"));
+		TABLE_SHARE* s;
+
+		Tabschema = GetStringCatInfo(g, "Database", Tabschema ? Tabschema : PlugDup(g, "*"));
     Isview = GetBoolCatInfo("View", false);
 
     // We must get other connection parms from the calling table
-    Remove_tshp(Cat);
+    s = Remove_tshp(Cat);
     url = GetStringCatInfo(g, "Connect", NULL);
 
     if (!url || !*url) { 
@@ -365,6 +367,9 @@
     } // endif url
 
     Tabname = Name;
+
+		// Needed for column description
+		Restore_tshp(Cat, s);
   } // endif am
 
   if ((Srcdef = GetStringCatInfo(g, "Srcdef", NULL))) {
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabodbc.cpp mariadb-10.3-10.3.22/storage/connect/tabodbc.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabodbc.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabodbc.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -605,8 +605,10 @@
         Cnp->InitValue(g);
 
         if ((n = Ocp->GetResultSize(Query->GetStr(), Cnp)) < 0) {
-          strcpy(g->Message, "Cannot get result size");
-          return true;
+					char* msg = PlugDup(g, g->Message);
+
+					sprintf(g->Message, "Get result size: %s (rc=%d)", msg, n);
+					return true;
 				} else if (n) {
 					Ocp->m_Rows = n;
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabrest.cpp mariadb-10.3-10.3.22/storage/connect/tabrest.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabrest.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabrest.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -1,5 +1,5 @@
-/*************** Rest C++ Program Source Code File (.CPP) **************/
-/* PROGRAM NAME: Rest   Version 1.5                                    */
+/************** tabrest C++ Program Source Code File (.CPP) ************/
+/* PROGRAM NAME: tabrest   Version 1.7                                 */
 /*  (C) Copyright to the author Olivier BERTRAND          2018 - 2019  */
 /*  This program is the REST Web API support for MariaDB.              */
 /*  When compiled without MARIADB defined, it is the EOM module code.  */
@@ -9,13 +9,18 @@
 /*  Definitions needed by the included files.                          */
 /***********************************************************************/
 #if defined(MARIADB)
-#include  // All MariaDB stuff
+#include     // All MariaDB stuff
 #else   // !MARIADB       OEM module
 #include "mini-global.h"
 #define _MAX_PATH 260
-#if !defined(__WIN__)
+#if !defined(REST_SOURCE)
+#if defined(__WIN__) || defined(_WINDOWS)
+#include 
+#else		 // !__WIN__
 #define __stdcall
+#include          // dlopen(), dlclose(), dlsym() ...
 #endif   // !__WIN__
+#endif	 // !REST_SOURCE
 #define _OS_H_INCLUDED     // Prevent os.h to be called
 #endif  // !MARIADB
 
@@ -23,7 +28,6 @@
 /*  Include application header files:                                  */
 /*  global.h    is header containing all global declarations.          */
 /*  plgdbsem.h  is header containing the DB application declarations.  */
-/*  (x)table.h  is header containing the TDBASE declarations.          */
 /***********************************************************************/
 #include "global.h"
 #include "plgdbsem.h"
@@ -31,22 +35,14 @@
 #include "filamtxt.h"
 #include "tabdos.h"
 #include "plgxml.h"
+#if defined(XML_SUPPORT)
 #include "tabxml.h"
+#endif   // XML_SUPPORT
 #include "tabjson.h"
 #include "tabfmt.h"
 #include "tabrest.h"
 
-/***********************************************************************/
-/*  Get the file from the Web.                                         */
-/***********************************************************************/
-int restGetFile(PGLOBAL g, PCSZ http, PCSZ uri, PCSZ fn);
-
-#if defined(__WIN__)
-static PCSZ slash = "\\";
-#else // !__WIN__
-static PCSZ slash = "/";
-#define stricmp strcasecmp
-#endif // !__WIN__
+static XGETREST getRestFnc = NULL;
 
 #if !defined(MARIADB)
 /***********************************************************************/
@@ -76,6 +72,74 @@
 #endif   // !MARIADB
 
 /***********************************************************************/
+/*  GetREST: get the external TABDEF from OEM module.                  */
+/***********************************************************************/
+XGETREST GetRestFunction(PGLOBAL g)
+{
+	if (getRestFnc)
+		return getRestFnc;
+	
+#if !defined(MARIADB) || !defined(REST_SOURCE)
+	if (trace(515))
+		htrc("Looking for GetRest library\n");
+
+#if defined(__WIN__) || defined(_WINDOWS)
+	HANDLE Hdll;
+	const char* soname = "GetRest.dll";   // Module name
+
+	if (!(Hdll = LoadLibrary(soname))) {
+		char  buf[256];
+		DWORD rc = GetLastError();
+
+		sprintf(g->Message, MSG(DLL_LOAD_ERROR), rc, soname);
+		FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+			FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0,
+			(LPTSTR)buf, sizeof(buf), NULL);
+		strcat(strcat(g->Message, ": "), buf);
+		return NULL;
+	} // endif Hdll
+
+// Get the function returning an instance of the external DEF class
+	if (!(getRestFnc = (XGETREST)GetProcAddress((HINSTANCE)Hdll, "restGetFile"))) {
+		char  buf[256];
+		DWORD rc = GetLastError();
+
+		sprintf(g->Message, MSG(PROCADD_ERROR), rc, "restGetFile");
+		FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM |
+			FORMAT_MESSAGE_IGNORE_INSERTS, NULL, rc, 0,
+			(LPTSTR)buf, sizeof(buf), NULL);
+		strcat(strcat(g->Message, ": "), buf);
+		FreeLibrary((HMODULE)Hdll);
+		return NULL;
+	} // endif getRestFnc
+#else   // !__WIN__
+	void* Hso;
+	const char* error = NULL;
+	const char* soname = "GetRest.so";   // Module name
+
+	// Load the desired shared library
+	if (!(Hso = dlopen(soname, RTLD_LAZY))) {
+		error = dlerror();
+		sprintf(g->Message, MSG(SHARED_LIB_ERR), soname, SVP(error));
+		return NULL;
+	} // endif Hdll
+
+// Get the function returning an instance of the external DEF class
+	if (!(getRestFnc = (XGETREST)dlsym(Hso, "restGetFile"))) {
+		error = dlerror();
+		sprintf(g->Message, MSG(GET_FUNC_ERR), "restGetFile", SVP(error));
+		dlclose(Hso);
+		return NULL;
+	} // endif getdef
+#endif  // !__WIN__
+#else
+	getRestFnc = restGetFile;
+#endif
+
+	return getRestFnc;
+} // end of GetRestFunction
+
+/***********************************************************************/
 /*  Return the columns definition to MariaDB.                          */
 /***********************************************************************/
 #if defined(MARIADB)
@@ -87,6 +151,10 @@
   PQRYRES qrp= NULL;
   char filename[_MAX_PATH + 1];  // MAX PATH ???
   PCSZ http, uri, fn, ftype;
+	XGETREST grf = GetRestFunction(g);
+
+	if (!grf)
+		return NULL;
 
   http = GetStringTableOption(g, tp, "Http", NULL);
   uri = GetStringTableOption(g, tp, "Uri", NULL);
@@ -100,18 +168,20 @@
 
   //  We used the file name relative to recorded datapath
   strcat(strcat(strcat(strcpy(filename, "."), slash), db), slash);
-  strncat(filename, fn, _MAX_PATH);
+  strncat(filename, fn, _MAX_PATH - strlen(filename));
 
   // Retrieve the file from the web and copy it locally
-  if (http && restGetFile(g, http, uri, filename)) {
-    // sprintf(g->Message, "Failed to get file at %s", http);
-  } else if (!stricmp(ftype, "XML"))
-    qrp = XMLColumns(g, db, tab, tp, info);
-  else if (!stricmp(ftype, "JSON"))
+	if (http && grf(g->Message, trace(515), http, uri, filename)) {
+			// sprintf(g->Message, "Failed to get file at %s", http);
+  } else if (!stricmp(ftype, "JSON"))
     qrp = JSONColumns(g, db, NULL, tp, info);
   else if (!stricmp(ftype, "CSV"))
     qrp = CSVColumns(g, NULL, tp, info);
-  else
+#if defined(XML_SUPPORT)
+	else if (!stricmp(ftype, "XML"))
+		qrp = XMLColumns(g, db, tab, tp, info);
+#endif   // XML_SUPPORT
+	else
     sprintf(g->Message, "Usupported file type %s", ftype);
 
   return qrp;
@@ -124,9 +194,14 @@
 /***********************************************************************/
 bool RESTDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff)
 {
-  char    filename[_MAX_PATH + 1];
+	char    filename[_MAX_PATH + 1];
   int     rc = 0, n;
-  LPCSTR  ftype;
+	bool    xt = trace(515);
+	LPCSTR  ftype;
+	XGETREST grf = GetRestFunction(g);
+
+	if (!grf)
+		return true;
 
 #if defined(MARIADB)
   ftype = GetStringCatInfo(g, "Type", "JSON");
@@ -135,11 +210,13 @@
   ftype = GetStringCatInfo(g, "Ftype", "JSON");
 #endif  // !MARIADB
 
-  if (trace(515))
+  if (xt)
     htrc("ftype = %s am = %s\n", ftype, SVP(am));
 
   n = (!stricmp(ftype, "JSON")) ? 1
+#if defined(XML_SUPPORT)
     : (!stricmp(ftype, "XML"))  ? 2
+#endif   // XML_SUPPORT
     : (!stricmp(ftype, "CSV"))  ? 3 : 0;
 
   if (n == 0) {
@@ -154,19 +231,22 @@
 
   //  We used the file name relative to recorded datapath
   //PlugSetPath(filename, Fn, GetPath());
-  strncat(strcpy(filename, GetPath()), Fn, _MAX_PATH);
+  strcpy(filename, GetPath());
+	strncat(filename, Fn, _MAX_PATH - strlen(filename));
 
   // Retrieve the file from the web and copy it locally
-  rc = restGetFile(g, Http, Uri, filename);
+	rc = grf(g->Message, xt, Http, Uri, filename);
 
-  if (trace(515))
+  if (xt)
     htrc("Return from restGetFile: rc=%d\n", rc);
 
   if (rc)
     return true;
   else switch (n) {
     case 1: Tdp = new (g) JSONDEF; break;
-    case 2: Tdp = new (g) XMLDEF;  break;
+#if defined(XML_SUPPORT)
+		case 2: Tdp = new (g) XMLDEF;  break;
+#endif   // XML_SUPPORT
     case 3: Tdp = new (g) CSVDEF;  break;
     default: Tdp = NULL;
   } // endswitch n
@@ -175,7 +255,7 @@
   if (Tdp && Tdp->Define(g, Cat, Name, Schema, "REST"))
     Tdp = NULL; // Error occured
 
-  if (trace(515))
+  if (xt)
     htrc("Tdp defined\n", rc);
 
   // Return true in case of error
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabrest.h mariadb-10.3-10.3.22/storage/connect/tabrest.h
--- mariadb-10.3-10.3.18/storage/connect/tabrest.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabrest.h	2020-01-26 18:37:29.000000000 +0000
@@ -5,6 +5,27 @@
 /***********************************************************************/
 #pragma once
 
+#if defined(__WIN__)
+static PCSZ slash = "\\";
+#else // !__WIN__
+static PCSZ slash = "/";
+#define stricmp strcasecmp
+#endif // !__WIN__
+
+typedef int(__stdcall* XGETREST) (char*, bool, PCSZ, PCSZ, PCSZ);
+
+/***********************************************************************/
+/*  Functions used by REST.                                            */
+/***********************************************************************/
+XGETREST GetRestFunction(PGLOBAL g);
+#if defined(REST_SOURCE)
+extern "C" int restGetFile(char* m, bool xt, PCSZ http, PCSZ uri, PCSZ fn);
+#endif   // REST_SOURCE
+#if defined(MARIADB)
+PQRYRES RESTColumns(PGLOBAL g, PTOS tp, char* tab, char* db, bool info);
+#endif  // !MARIADB
+
+
 /***********************************************************************/
 /*  Restest table.                                                     */
 /***********************************************************************/
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabutil.cpp mariadb-10.3-10.3.22/storage/connect/tabutil.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabutil.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabutil.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -59,12 +59,24 @@
 /*  Used by MYSQL tables to get MySQL parameters from the calling proxy */
 /*  table (PROXY, TBL, XCL, or OCCUR) when used by one of these.        */
 /************************************************************************/
-void Remove_tshp(PCATLG cat)
+TABLE_SHARE *Remove_tshp(PCATLG cat)
 {
-  ((MYCAT*)cat)->GetHandler()->tshp = NULL;
+  TABLE_SHARE *s = ((MYCAT*)cat)->GetHandler()->tshp;
+
+	((MYCAT*)cat)->GetHandler()->tshp = NULL;
+	return s;
 } // end of Remove_thsp
 
 /************************************************************************/
+/*  Used by MYSQL tables to get MySQL parameters from the calling proxy */
+/*  table (PROXY, TBL, XCL, or OCCUR) when used by one of these.        */
+/************************************************************************/
+void Restore_tshp(PCATLG cat, TABLE_SHARE *s)
+{
+	((MYCAT*)cat)->GetHandler()->tshp = s;
+} // end of Restore_thsp
+
+/************************************************************************/
 /*  GetTableShare: allocates and open a table share.                    */
 /************************************************************************/
 TABLE_SHARE *GetTableShare(PGLOBAL g, THD *thd, const char *db, 
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabutil.h mariadb-10.3-10.3.22/storage/connect/tabutil.h
--- mariadb-10.3-10.3.18/storage/connect/tabutil.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabutil.h	2020-01-26 18:37:29.000000000 +0000
@@ -18,7 +18,8 @@
 PQRYRES TabColumns(PGLOBAL g, THD *thd, const char *db, 
                                         const char *name, bool& info);
 
-void Remove_tshp(PCATLG cat);
+TABLE_SHARE *Remove_tshp(PCATLG cat);
+void Restore_tshp(PCATLG cat, TABLE_SHARE *s);
 
 /* -------------------------- PROXY classes -------------------------- */
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabvct.cpp mariadb-10.3-10.3.22/storage/connect/tabvct.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabvct.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabvct.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -115,11 +115,14 @@
 
   Recfm = RECFM_VCT;
 
+	// poff is no more in use; This will have to be revisited
+#if 0
   // For packed files the logical record length is calculated in poff
   if (poff != Lrecl) {
     Lrecl = poff;
     SetIntCatInfo("Lrecl", poff);
     } // endif poff
+#endif // 0
 
   Padded = false;
   Blksize = 0;
diff -Nru mariadb-10.3-10.3.18/storage/connect/tabxml.cpp mariadb-10.3-10.3.22/storage/connect/tabxml.cpp
--- mariadb-10.3-10.3.18/storage/connect/tabxml.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/tabxml.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -240,7 +240,9 @@
 
      more:
       if (vp->atp) {
-        strncpy(colname, vp->atp->GetName(g), sizeof(colname));
+				size_t z = sizeof(colname) - 1;
+        strncpy(colname, vp->atp->GetName(g), z);
+				colname[z] = 0;
 				strncat(xcol->Name, colname, XLEN(xcol->Name));
 
         switch (vp->atp->GetText(g, buf, sizeof(buf))) {
diff -Nru mariadb-10.3-10.3.18/storage/connect/valblk.cpp mariadb-10.3-10.3.22/storage/connect/valblk.cpp
--- mariadb-10.3-10.3.18/storage/connect/valblk.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/valblk.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -206,6 +206,7 @@
   {
   if (n < 0 || n >= Nval) {
     PGLOBAL& g = Global;
+		xtrc(1, "ChkIndx: n=%d Nval=%d\n", n, Nval);
     strcpy(g->Message, MSG(BAD_VALBLK_INDX));
 		throw Type;
 	} // endif n
@@ -216,7 +217,8 @@
   {
   if (Check && (Type != v->GetType() || Unsigned != v->IsUnsigned())) {
     PGLOBAL& g = Global;
-    strcpy(g->Message, MSG(VALTYPE_NOMATCH));
+		xtrc(1, "ChkTyp: Type=%d valType=%d\n", Type, v->GetType());
+		strcpy(g->Message, MSG(VALTYPE_NOMATCH));
 		throw Type;
 	} // endif Type
 
diff -Nru mariadb-10.3-10.3.18/storage/connect/value.cpp mariadb-10.3-10.3.22/storage/connect/value.cpp
--- mariadb-10.3-10.3.18/storage/connect/value.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/value.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -123,7 +123,7 @@
     case '+':
       p++;
       break;
-    } // endswitch *p
+  } // endswitch *p
 
   for (val = 0; p < p2 && (c = (uchar)(*p - '0')) < 10; p++)
     if (val > (maxval - c) / 10) {
@@ -140,7 +140,7 @@
 /*  GetTypeName: returns the PlugDB internal type name.                */
 /***********************************************************************/
 PCSZ GetTypeName(int type)
-  {
+{
   PCSZ name;
 
   switch (type) {
@@ -155,17 +155,17 @@
     case TYPE_BIN:    name = "BINARY";   break;
     case TYPE_PCHAR:  name = "PCHAR";    break;
     default:          name = "UNKNOWN";  break;
-    } // endswitch type
+  } // endswitch type
 
   return name;
-  } // end of GetTypeName
+} // end of GetTypeName
 
 /***********************************************************************/
 /*  GetTypeSize: returns the PlugDB internal type size.                */
 /***********************************************************************/
 int GetTypeSize(int type, int len)
   {
-  switch (type) {
+	switch (type) {
     case TYPE_DECIM:
     case TYPE_BIN:
     case TYPE_STRING: len = len * sizeof(char); break;
@@ -177,16 +177,16 @@
     case TYPE_TINY:   len = sizeof(char);       break;
     case TYPE_PCHAR:  len = sizeof(char*);      break;
     default:          len = -1;
-    } // endswitch type
+  } // endswitch type
 
   return len;
-  } // end of GetTypeSize
+} // end of GetTypeSize
 
 /***********************************************************************/
 /*  GetFormatType: returns the FORMAT character(s) according to type.  */
 /***********************************************************************/
 const char *GetFormatType(int type)
-  {
+{
   const char *c = "X";
 
   switch (type) {
@@ -200,16 +200,16 @@
     case TYPE_DECIM:  c = "M"; break;
     case TYPE_BIN:    c = "B"; break;
     case TYPE_PCHAR:  c = "P"; break;
-    } // endswitch type
+  } // endswitch type
 
   return c;
-  } // end of GetFormatType
+} // end of GetFormatType
 
 /***********************************************************************/
 /*  GetFormatType: returns the FORMAT type according to character.     */
 /***********************************************************************/
 int GetFormatType(char c)
-  {
+{
   int type = TYPE_ERROR;
 
   switch (c) {
@@ -223,31 +223,31 @@
     case 'M': type = TYPE_DECIM;  break;
     case 'B': type = TYPE_BIN;    break;
     case 'P': type = TYPE_PCHAR;  break;
-    } // endswitch type
+  } // endswitch type
 
   return type;
-  } // end of GetFormatType
+} // end of GetFormatType
 
 /***********************************************************************/
 /*  IsTypeChar: returns true for character type(s).                    */
 /***********************************************************************/
 bool IsTypeChar(int type)
-  {
+{
   switch (type) {
     case TYPE_STRING:
     case TYPE_DECIM:
 		case TYPE_BIN:
       return true;
-    } // endswitch type
+  } // endswitch type
 
   return false;
-  } // end of IsTypeChar
+} // end of IsTypeChar
 
 /***********************************************************************/
 /*  IsTypeNum: returns true for numeric types.                         */
 /***********************************************************************/
 bool IsTypeNum(int type)
-  {
+{
   switch (type) {
     case TYPE_INT:
     case TYPE_BIGINT:
@@ -258,16 +258,16 @@
     case TYPE_TINY:
     case TYPE_DECIM:
       return true;
-    } // endswitch type
+  } // endswitch type
 
   return false;
-  } // end of IsTypeNum
+} // end of IsTypeNum
 
 /***********************************************************************/
 /*  GetFmt: returns the format to use with a typed value.              */
 /***********************************************************************/
 const char *GetFmt(int type, bool un)
-  {
+{
   const char *fmt;
 
   switch (type) {
@@ -278,10 +278,10 @@
     case TYPE_DOUBLE: fmt = "%.*lf";                break;
     case TYPE_BIN:    fmt = "%*x";                  break;
     default:          fmt = (un) ? "%u" : "%d";     break;
-    } // endswitch Type
+  } // endswitch Type
 
   return fmt;
-  } // end of GetFmt
+} // end of GetFmt
 
 /***********************************************************************/
 /*  ConvertType: what this function does is to determine the type to   */
@@ -293,7 +293,7 @@
 /*  IsType... functions so match does not prevent correct setting.     */
 /***********************************************************************/
 int ConvertType(int target, int type, CONV kind, bool match)
-  {
+{
   switch (kind) {
     case CNV_CHAR:
       if (match && (!IsTypeChar(target) || !IsTypeChar(type)))
@@ -326,15 +326,15 @@
            : (target == TYPE_STRING || type == TYPE_STRING) ? TYPE_STRING
            : (target == TYPE_TINY   || type == TYPE_TINY)   ? TYPE_TINY
                                                             : TYPE_ERROR;
-    } // endswitch kind
+  } // endswitch kind
 
-  } // end of ConvertType
+} // end of ConvertType
 
 /***********************************************************************/
 /*  AllocateConstant: allocates a constant Value.                      */
 /***********************************************************************/
 PVAL AllocateValue(PGLOBAL g, void *value, short type, short prec)
-  {
+{
   PVAL valp;
 
   if (trace(1))
@@ -362,18 +362,18 @@
     default:
       sprintf(g->Message, MSG(BAD_VALUE_TYPE), type);
       return NULL;
-    } // endswitch Type
+  } // endswitch Type
 
   valp->SetGlobal(g);
   return valp;
-  } // end of AllocateValue
+} // end of AllocateValue
 
 /***********************************************************************/
 /*  Allocate a variable Value according to type, length and precision. */
 /***********************************************************************/
 PVAL AllocateValue(PGLOBAL g, int type, int len, int prec,
                    bool uns, PCSZ fmt)
-  {
+{
   PVAL valp;
 
   switch (type) {
@@ -423,18 +423,18 @@
     default:
       sprintf(g->Message, MSG(BAD_VALUE_TYPE), type);
       return NULL;
-    } // endswitch type
+  } // endswitch type
 
   valp->SetGlobal(g);
   return valp;
-  } // end of AllocateValue
+} // end of AllocateValue
 
 /***********************************************************************/
 /*  Allocate a constant Value converted to newtype.                    */
 /*  Can also be used to copy a Value eventually converted.             */
 /***********************************************************************/
 PVAL AllocateValue(PGLOBAL g, PVAL valp, int newtype, int uns)
-  {
+{
   PSZ  p, sp;
   bool un = (uns < 0) ? false : (uns > 0) ? true : valp->IsUnsigned();
   PVAL vp;
@@ -495,13 +495,13 @@
     default:
       sprintf(g->Message, MSG(BAD_VALUE_TYPE), newtype);
       return NULL;
-    } // endswitch type
+  } // endswitch type
   
   vp->SetNullable(valp->GetNullable());
   vp->SetNull(valp->IsNull());
   vp->SetGlobal(g);
   return vp;
-  } // end of AllocateValue
+} // end of AllocateValue
 
 /* -------------------------- Class VALUE ---------------------------- */
 
@@ -509,7 +509,7 @@
 /*  Class VALUE protected constructor.                                 */
 /***********************************************************************/
 VALUE::VALUE(int type, bool un) : Type(type)
-  {
+{
   Null = false;
   Nullable = false;
   Unsigned = un;
@@ -517,13 +517,13 @@
   Prec = 0;
   Fmt = GetFmt(Type, Unsigned);
   Xfmt = GetXfmt();
-  } // end of VALUE constructor
+} // end of VALUE constructor
 
 /***********************************************************************/
 /* VALUE GetXfmt: returns the extended format to use with typed value. */
 /***********************************************************************/
 const char *VALUE::GetXfmt(void)
-  {
+{
   const char *fmt;
 
   switch (Type) {
@@ -537,7 +537,7 @@
     } // endswitch Type
 
   return fmt;
-  } // end of GetFmt
+} // end of GetXFmt
 
 /***********************************************************************/
 /*  Returns a BYTE indicating the comparison between two values.       */
@@ -545,20 +545,20 @@
 /*  More than 1 bit can be set only in the case of TYPE_LIST.          */
 /***********************************************************************/
 BYTE VALUE::TestValue(PVAL vp)
-  {
+{
   int n = CompareValue(vp);
 
   return (n > 0) ? 0x04 : (n < 0) ? 0x02 : 0x01;
-  } // end of TestValue
+} // end of TestValue
 
 /***********************************************************************/
 /*  Compute a function on a string.                                    */
 /***********************************************************************/
 bool VALUE::Compute(PGLOBAL g, PVAL *, int, OPVAL)
-  {
+{
   strcpy(g->Message, "Compute not implemented for this value type");
   return true;
-  } // end of Compute
+} // end of Compute
 
 /***********************************************************************/
 /*  Make file output of an object value.                               */
@@ -600,11 +600,11 @@
 template 
 TYPVAL::TYPVAL(TYPE n, int type, int prec, bool un)
             : VALUE(type, un)
-  {
+{
   Tval = n;
   Clen = sizeof(TYPE);
   Prec = prec;
-  } // end of TYPVAL constructor
+} // end of TYPVAL constructor
 
 /***********************************************************************/
 /*  Return unsigned max value for the type.                            */
@@ -641,19 +641,19 @@
 /***********************************************************************/
 template 
 int TYPVAL::GetValLen(void)
-  {
+{
   char c[32];
 
-  return sprintf(c, Fmt, Tval);
-  } // end of GetValLen
+  return snprintf(c, 32, Fmt, Tval);
+} // end of GetValLen
 
 template <>
 int TYPVAL::GetValLen(void)
-  {
+{
   char c[32];
 
-  return sprintf(c, Fmt, Prec, Tval);
-  } // end of GetValLen
+  return snprintf(c, 32, Fmt, Prec, Tval);
+} // end of GetValLen
 
 /***********************************************************************/
 /*  TYPVAL SetValue: copy the value of another Value object.           */
@@ -661,7 +661,7 @@
 /***********************************************************************/
 template 
 bool TYPVAL::SetValue_pval(PVAL valp, bool chktype)
-  {
+{
   if (valp != this) {
     if (chktype && Type != valp->GetType())
       return true;
@@ -671,10 +671,10 @@
     else
       Reset();
 
-    } // endif valp
+  } // endif valp
 
   return false;
-  } // end of SetValue
+} // end of SetValue
 
 template <>
 short TYPVAL::GetTypedValue(PVAL valp)
@@ -717,7 +717,7 @@
 /***********************************************************************/
 template 
 bool TYPVAL::SetValue_char(const char *p, int n)
-  {
+{
   bool      rc, minus;
   ulonglong maxval = MaxVal();
   ulonglong val = CharToNumber(p, n, maxval, Unsigned, &minus, &rc);
@@ -731,15 +731,15 @@
     char buf[64];
     htrc(strcat(strcat(strcpy(buf, " setting %s to: "), Fmt), "\n"),
                               GetTypeName(Type), Tval);
-    } // endif trace
+  } // endif trace
 
   Null = false;
   return rc;
-  } // end of SetValue
+} // end of SetValue
 
 template <>
 bool TYPVAL::SetValue_char(const char *p, int n)
-  {
+{
   if (p && n > 0) {
     char buf[64];
 
@@ -760,14 +760,14 @@
   } // endif p
 
   return false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  TYPVAL SetValue: fill a typed value from a string.                 */
 /***********************************************************************/
 template 
 void TYPVAL::SetValue_psz(PCSZ s)
-  {
+{
   if (s) {
     SetValue_char(s, (int)strlen(s));
     Null = false;
@@ -776,17 +776,17 @@
     Null = Nullable;
   } // endif p
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  TYPVAL SetValue: set value with a TYPE extracted from a block.     */
 /***********************************************************************/
 template 
 void TYPVAL::SetValue_pvblk(PVBLK blk, int n)
-  {
+{
   Tval = GetTypedValue(blk, n);
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 template <>
 int TYPVAL::GetTypedValue(PVBLK blk, int n)
@@ -852,7 +852,7 @@
 /***********************************************************************/
 template 
 bool TYPVAL::GetBinValue(void *buf, int buflen, bool go)
-  {
+{
   // Test on length was removed here until a variable in column give the
   // real field length. For BIN files the field length logically cannot
   // be different from the variable length because no conversion is done.
@@ -876,40 +876,41 @@
 
   Null = false;
   return false;
-  } // end of GetBinValue
+} // end of GetBinValue
 
 /***********************************************************************/
 /*  TYPVAL ShowValue: get string representation of a typed value.      */
 /***********************************************************************/
 template 
 int TYPVAL::ShowValue(char *buf, int len)
-  {
+{
   return snprintf(buf, len + 1, Xfmt, len, Tval);
-  } // end of ShowValue
+} // end of ShowValue
 
 template <>
 int TYPVAL::ShowValue(char *buf, int len)
-  {
+{
   // TODO: use a more appropriate format to avoid possible truncation
   return snprintf(buf, len + 1, Xfmt, len, Prec, Tval);
-  } // end of ShowValue
+} // end of ShowValue
 
 /***********************************************************************/
 /*  TYPVAL GetCharString: get string representation of a typed value.  */
 /***********************************************************************/
 template 
 char *TYPVAL::GetCharString(char *p)
-  {
+{
   sprintf(p, Fmt, Tval);
   return p;
-  } // end of GetCharString
+} // end of GetCharString
 
 template <>
 char *TYPVAL::GetCharString(char *p)
-  {
-  sprintf(p, Fmt, Prec, Tval);
+{
+	// Most callers use a 32 long buffer
+  snprintf(p, 32, Fmt, Prec, Tval);
   return p;
-  } // end of GetCharString
+} // end of GetCharString
 
 #if 0
 /***********************************************************************/
@@ -917,50 +918,50 @@
 /***********************************************************************/
 template 
 char *TYPVAL::GetShortString(char *p, int n)
-  {
+{
   sprintf(p, "%*hd", n, (short)Tval);
   return p;
-  } // end of GetShortString
+} // end of GetShortString
 
 /***********************************************************************/
 /*  TYPVAL GetIntString: get int representation of a typed value.      */
 /***********************************************************************/
 template 
 char *TYPVAL::GetIntString(char *p, int n)
-  {
+{
   sprintf(p, "%*d", n, (int)Tval);
   return p;
-  } // end of GetIntString
+} // end of GetIntString
 
 /***********************************************************************/
 /*  TYPVAL GetBigintString: get big int representation of a TYPE value.*/
 /***********************************************************************/
 template 
 char *TYPVAL::GetBigintString(char *p, int n)
-  {
+{
   sprintf(p, "%*lld", n, (longlong)Tval);
   return p;
-  } // end of GetBigintString
+} // end of GetBigintString
 
 /***********************************************************************/
 /*  TYPVAL GetFloatString: get double representation of a typed value. */
 /***********************************************************************/
 template 
 char *TYPVAL::GetFloatString(char *p, int n, int prec)
-  {
+{
   sprintf(p, "%*.*lf", n, (prec < 0) ? 2 : prec, (double)Tval);
   return p;
-  } // end of GetFloatString
+} // end of GetFloatString
 
 /***********************************************************************/
 /*  TYPVAL GetTinyString: get char representation of a typed value.    */
 /***********************************************************************/
 template 
 char *TYPVAL::GetTinyString(char *p, int n)
-  {
+{
   sprintf(p, "%*d", n, (int)(char)Tval);
   return p;
-  } // end of GetIntString
+} // end of GetIntString
 #endif // 0
 
 /***********************************************************************/
@@ -968,7 +969,7 @@
 /***********************************************************************/
 template 
 bool TYPVAL::IsEqual(PVAL vp, bool chktype)
-  {
+{
   if (this == vp)
     return true;
   else if (chktype && Type != vp->GetType())
@@ -980,7 +981,7 @@
   else
     return (Tval == GetTypedValue(vp));
 
-  } // end of IsEqual
+} // end of IsEqual
 
 /***********************************************************************/
 /*  Compare values and returns 1, 0 or -1 according to comparison.     */
@@ -988,7 +989,7 @@
 /***********************************************************************/
 template 
 int TYPVAL::CompareValue(PVAL vp)
-  {
+{
 //assert(vp->GetType() == Type);
 
   // Process filtering on numeric values.
@@ -998,7 +999,7 @@
 //  htrc(" Comparing: val=%d,%d\n", Tval, n);
 
   return (Tval > n) ? 1 : (Tval < n) ? (-1) : 0;
-  } // end of CompareValue
+} // end of CompareValue
 
 /***********************************************************************/
 /*  Return max type value if b is true, else min type value.           */
@@ -1044,7 +1045,7 @@
 /***********************************************************************/
 template 
 TYPE TYPVAL::SafeAdd(TYPE n1, TYPE n2)
-  {
+{
   PGLOBAL& g = Global;
   TYPE     n = n1 + n2;
 
@@ -1059,20 +1060,20 @@
 	} // endif's n2
 
   return n;
-  } // end of SafeAdd
+} // end of SafeAdd
 
 template <>
 inline double TYPVAL::SafeAdd(double n1, double n2)
-  {
+{
   return n1 + n2;
-  } // end of SafeAdd
+} // end of SafeAdd
 
 /***********************************************************************/
 /*  SafeMult: multiply values and test whether overflow occurred.       */
 /***********************************************************************/
 template 
 TYPE TYPVAL::SafeMult(TYPE n1, TYPE n2)
-  {
+{
   PGLOBAL& g = Global;
   double   n = (double)n1 * (double)n2;
 
@@ -1087,20 +1088,20 @@
 	} // endif's n2
 
   return (TYPE)n;
-  } // end of SafeMult
+} // end of SafeMult
 
 template <>
 inline double TYPVAL::SafeMult(double n1, double n2)
-  {
+{
   return n1 * n2;
-  } // end of SafeMult
+} // end of SafeMult
 
 /***********************************************************************/
 /*  Compute defined functions for the type.                            */
 /***********************************************************************/
 template 
 bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
-  {
+{
   bool rc = false;
   TYPE val[2];
 
@@ -1127,14 +1128,14 @@
     default:
       rc = Compall(g, vp, np, op);
       break;
-    } // endswitch op
+  } // endswitch op
 
   return rc;
-  } // end of Compute
+} // end of Compute
 
 template <>
 bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
-  {
+{
   bool   rc = false;
   double val[2];
 
@@ -1152,17 +1153,17 @@
       break;
     default:
       rc = Compall(g, vp, np, op);
-    } // endswitch op
+  } // endswitch op
 
   return rc;
-  } // end of Compute
+} // end of Compute
 
 /***********************************************************************/
 /*  Compute a function for all types.                                  */
 /***********************************************************************/
 template 
 bool TYPVAL::Compall(PGLOBAL g, PVAL *vp, int np, OPVAL op)
-  {
+{
   TYPE val[2];
 
   for (int i = 0; i < np; i++)
@@ -1191,10 +1192,10 @@
 //    sprintf(g->Message, MSG(BAD_EXP_OPER), op);
       strcpy(g->Message, "Function not supported");
       return true;
-    } // endswitch op
+  } // endswitch op
 
   return false;
-  } // end of Compall
+} // end of Compall
 
 /***********************************************************************/
 /*  FormatValue: This function set vp (a STRING value) to the string   */
@@ -1203,26 +1204,28 @@
 /***********************************************************************/
 template 
 bool TYPVAL::FormatValue(PVAL vp, PCSZ fmt)
-  {
-  char *buf = (char*)vp->GetTo_Val();        // Should be big enough
+{
+	// This function is wrong and should never be called
+	assert(false);
+  char *buf = (char*)vp->GetTo_Val();        // Not big enough
   int   n = sprintf(buf, fmt, Tval);
 
   return (n > vp->GetValLen());
-  } // end of FormatValue
+} // end of FormatValue
 
 /***********************************************************************/
 /*  TYPVAL  SetFormat function (used to set SELECT output format).     */
 /***********************************************************************/
 template 
 bool TYPVAL::SetConstFormat(PGLOBAL g, FORMAT& fmt)
-  {
+{
   char c[32];
 
   fmt.Type[0] = *GetFormatType(Type);
   fmt.Length = sprintf(c, Fmt, Tval);
   fmt.Prec = Prec;
   return false;
-  } // end of SetConstFormat
+} // end of SetConstFormat
 
 /* -------------------------- Class STRING --------------------------- */
 
@@ -1230,19 +1233,19 @@
 /*  STRING  public constructor from a constant string.                 */
 /***********************************************************************/
 TYPVAL::TYPVAL(PSZ s, short c) : VALUE(TYPE_STRING)
-  {
+{
   Strp = s;
   Len = strlen(s);
   Clen = Len;
   Ci = (c == 1);
-  } // end of STRING constructor
+} // end of STRING constructor
 
 /***********************************************************************/
 /*  STRING public constructor from char.                               */
 /***********************************************************************/
 TYPVAL::TYPVAL(PGLOBAL g, PSZ s, int n, int c)
            : VALUE(TYPE_STRING)
-  {
+{
   Len = (g) ? n : (s) ? strlen(s) : 0;
 
   if (!s) {
@@ -1260,89 +1263,89 @@
 
   Clen = Len;
   Ci = (c != 0);
-  } // end of STRING constructor
+} // end of STRING constructor
 
 /***********************************************************************/
 /*  Get the tiny value represented by the Strp string.                 */
 /***********************************************************************/
 char TYPVAL::GetTinyValue(void)
-  {
+{
   bool      m;
   ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX8, false, &m);
 
   return (m && val < INT_MAX8) ? (char)(-(signed)val) : (char)val;
-  } // end of GetTinyValue
+} // end of GetTinyValue
 
 /***********************************************************************/
 /*  Get the unsigned tiny value represented by the Strp string.        */
 /***********************************************************************/
 uchar TYPVAL::GetUTinyValue(void)
-  {
+{
   return (uchar)CharToNumber(Strp, strlen(Strp), UINT_MAX8, true);
-  } // end of GetUTinyValue
+} // end of GetUTinyValue
 
 /***********************************************************************/
 /*  Get the short value represented by the Strp string.                */
 /***********************************************************************/
 short TYPVAL::GetShortValue(void)
-  {
+{
   bool      m;
   ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX16, false, &m);
 
   return (m && val < INT_MAX16) ? (short)(-(signed)val) : (short)val;
-  } // end of GetShortValue
+} // end of GetShortValue
 
 /***********************************************************************/
 /*  Get the unsigned short value represented by the Strp string.       */
 /***********************************************************************/
 ushort TYPVAL::GetUShortValue(void)
-  {
+{
   return (ushort)CharToNumber(Strp, strlen(Strp), UINT_MAX16, true);
-  } // end of GetUshortValue
+} // end of GetUshortValue
 
 /***********************************************************************/
 /*  Get the integer value represented by the Strp string.              */
 /***********************************************************************/
 int TYPVAL::GetIntValue(void)
-  {
+{
   bool      m;
   ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX32, false, &m);
 
   return (m && val < INT_MAX32) ? (int)(-(signed)val) : (int)val;
-  } // end of GetIntValue
+} // end of GetIntValue
 
 /***********************************************************************/
 /*  Get the unsigned integer value represented by the Strp string.     */
 /***********************************************************************/
 uint TYPVAL::GetUIntValue(void)
-  {
+{
   return (uint)CharToNumber(Strp, strlen(Strp), UINT_MAX32, true);
-  } // end of GetUintValue
+} // end of GetUintValue
 
 /***********************************************************************/
 /*  Get the big integer value represented by the Strp string.          */
 /***********************************************************************/
 longlong TYPVAL::GetBigintValue(void)
-  {
+{
   bool      m;
   ulonglong val = CharToNumber(Strp, strlen(Strp), INT_MAX64, false, &m);
 
   return (m && val < INT_MAX64) ? (-(signed)val) : (longlong)val;
-  } // end of GetBigintValue
+} // end of GetBigintValue
 
 /***********************************************************************/
 /*  Get the unsigned big integer value represented by the Strp string. */
 /***********************************************************************/
 ulonglong TYPVAL::GetUBigintValue(void)
-  {
+{
   return CharToNumber(Strp, strlen(Strp), ULONGLONG_MAX, true);
-  } // end of GetUBigintValue
+} // end of GetUBigintValue
 
 /***********************************************************************/
 /*  STRING SetValue: copy the value of another Value object.           */
 /***********************************************************************/
 bool TYPVAL::SetValue_pval(PVAL valp, bool chktype)
-  {
+{
   if (valp != this) {
     if (chktype && (valp->GetType() != Type || valp->GetSize() > Len))
       return true;
@@ -1354,16 +1357,16 @@
     else
       Reset();
 
-    } // endif valp
+  } // endif valp
 
   return false;
-  } // end of SetValue_pval
+} // end of SetValue_pval
 
 /***********************************************************************/
 /*  STRING SetValue: fill string with chars extracted from a line.     */
 /***********************************************************************/
 bool TYPVAL::SetValue_char(const char *cp, int n)
-  {
+{
   bool rc = false;
 
   if (!cp || n == 0) {
@@ -1389,16 +1392,16 @@
       Reset();
 
     Null = false;
-  } // endif p
+  } // endif cp
 
   return rc;
-  } // end of SetValue_char
+} // end of SetValue_char
 
 /***********************************************************************/
 /*  STRING SetValue: fill string with another string.                  */
 /***********************************************************************/
 void TYPVAL::SetValue_psz(PCSZ s)
-  {
+{
   if (!s) {
 		Reset();
 		Null = Nullable;
@@ -1407,26 +1410,26 @@
     Null = false;
   } // endif s
 
-  } // end of SetValue_psz
+} // end of SetValue_psz
 
 /***********************************************************************/
 /*  STRING SetValue: fill string with a string extracted from a block. */
 /***********************************************************************/
 void TYPVAL::SetValue_pvblk(PVBLK blk, int n)
-  {
+{
   // STRBLK's can return a NULL pointer
   PSZ vp = blk->GetCharString(Strp, n);
 
   if (vp != Strp)
     SetValue_psz(vp);
 
-  } // end of SetValue_pvblk
+} // end of SetValue_pvblk
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of an integer.   */
 /***********************************************************************/
 void TYPVAL::SetValue(int n)
-  {
+{
   char     buf[16];
   PGLOBAL& g = Global;
   int      k = sprintf(buf, "%d", n);
@@ -1438,13 +1441,13 @@
     SetValue_psz(buf);
 
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of an uint.      */
 /***********************************************************************/
 void TYPVAL::SetValue(uint n)
-  {
+{
   char     buf[16];
   PGLOBAL& g = Global;
   int      k = sprintf(buf, "%u", n);
@@ -1456,31 +1459,31 @@
     SetValue_psz(buf);
 
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a short int.  */
 /***********************************************************************/
 void TYPVAL::SetValue(short i)
-  {
+{
   SetValue((int)i);
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a ushort int. */
 /***********************************************************************/
 void TYPVAL::SetValue(ushort i)
-  {
+{
   SetValue((uint)i);
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a big integer.*/
 /***********************************************************************/
 void TYPVAL::SetValue(longlong n)
-  {
+{
   char     buf[24];
   PGLOBAL& g = Global;
   int      k = sprintf(buf, "%lld", n);
@@ -1492,13 +1495,13 @@
     SetValue_psz(buf);
 
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a big integer.*/
 /***********************************************************************/
 void TYPVAL::SetValue(ulonglong n)
-  {
+{
   char     buf[24];
   PGLOBAL& g = Global;
   int      k = sprintf(buf, "%llu", n);
@@ -1510,13 +1513,13 @@
     SetValue_psz(buf);
 
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a double.     */
 /***********************************************************************/
 void TYPVAL::SetValue(double f)
-  {
+{
   char    *p, buf[64];
   PGLOBAL& g = Global;
   int      k = sprintf(buf, "%lf", f);
@@ -1535,33 +1538,33 @@
     SetValue_psz(buf);
 
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a tiny int.   */
 /***********************************************************************/
 void TYPVAL::SetValue(char c)
-  {
+{
   SetValue((int)c);
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetValue: get the character representation of a tiny int.   */
 /***********************************************************************/
 void TYPVAL::SetValue(uchar c)
-  {
+{
   SetValue((uint)c);
   Null = false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  STRING SetBinValue: fill string with chars extracted from a line.  */
 /***********************************************************************/
 void TYPVAL::SetBinValue(void *p)
-  {
+{
   SetValue_char((const char *)p, Len);
-  } // end of SetBinValue
+} // end of SetBinValue
 
 /***********************************************************************/
 /*  GetBinValue: fill a buffer with the internal binary value.         */
@@ -1570,7 +1573,7 @@
 /*  Currently used by WriteColumn of binary files.                     */
 /***********************************************************************/
 bool TYPVAL::GetBinValue(void *buf, int buflen, bool go)
-  {
+{
   int len = (Null) ? 0 : strlen(Strp);
 
   if (len > buflen)
@@ -1581,7 +1584,7 @@
     } // endif go
 
   return false;
-  } // end of GetBinValue
+} // end of GetBinValue
 
 /***********************************************************************/
 /*  STRING ShowValue: get string representation of a char value.       */
@@ -1591,7 +1594,7 @@
 	int len = (Null) ? 0 : strlen(Strp);
 
 	if (buf && buf != Strp) {
-		memset(buf, ' ', buflen + 1);
+		memset(buf, ' ', (size_t)buflen + 1);
 		memcpy(buf, Strp, MY_MIN(len, buflen));
 	} // endif buf
 
@@ -1602,15 +1605,15 @@
 /*  STRING GetCharString: get string representation of a char value.   */
 /***********************************************************************/
 char *TYPVAL::GetCharString(char *)
-  {
+{
   return Strp;
-  } // end of GetCharString
+} // end of GetCharString
 
 /***********************************************************************/
 /*  STRING compare value with another Value.                           */
 /***********************************************************************/
 bool TYPVAL::IsEqual(PVAL vp, bool chktype)
-  {
+{
   if (this == vp)
     return true;
   else if (chktype && Type != vp->GetType())
@@ -1625,14 +1628,14 @@
   else // (!Ci)
     return !strcmp(Strp, vp->GetCharString(buf));
 
-  } // end of IsEqual
+} // end of IsEqual
 
 /***********************************************************************/
 /*  Compare values and returns 1, 0 or -1 according to comparison.     */
 /*  This function is used for evaluation of numeric filters.           */
 /***********************************************************************/
 int TYPVAL::CompareValue(PVAL vp)
-  {
+{
   int n;
 //assert(vp->GetType() == Type);
 
@@ -1651,13 +1654,13 @@
 #endif   // __WIN__
 
   return (n > 0) ? 1 : (n < 0) ? -1 : 0;
-  } // end of CompareValue
+} // end of CompareValue
 
 /***********************************************************************/
 /*  Compute a function on a string.                                    */
 /***********************************************************************/
 bool TYPVAL::Compute(PGLOBAL g, PVAL *vp, int np, OPVAL op)
-  {
+{
   char *p[2], val[2][32];
   int   i;
 
@@ -1704,7 +1707,7 @@
 
 	Null = false;
   return false;
-  } // end of Compute
+} // end of Compute
 
 /***********************************************************************/
 /*  FormatValue: This function set vp (a STRING value) to the string   */
@@ -1712,23 +1715,23 @@
 /*  This function assumes that the format matches the value type.      */
 /***********************************************************************/
 bool TYPVAL::FormatValue(PVAL vp, PCSZ fmt)
-  {
+{
   char *buf = (char*)vp->GetTo_Val();        // Should be big enough
   int   n = sprintf(buf, fmt, Strp);
 
   return (n > vp->GetValLen());
-  } // end of FormatValue
+} // end of FormatValue
 
 /***********************************************************************/
 /*  STRING SetFormat function (used to set SELECT output format).      */
 /***********************************************************************/
 bool TYPVAL::SetConstFormat(PGLOBAL, FORMAT& fmt)
-  {
+{
   fmt.Type[0] = 'C';
   fmt.Length = Len;
   fmt.Prec = 0;
   return false;
-  } // end of SetConstFormat
+} // end of SetConstFormat
 
 /***********************************************************************/
 /*  Make string output of an object value.                             */
@@ -1748,38 +1751,38 @@
 /*  DECIMAL public constructor from a constant string.                 */
 /***********************************************************************/
 DECVAL::DECVAL(PSZ s) : TYPVAL(s)
-  {
+{
   if (s) {
     char *p = strchr(Strp, '.');
 
     Prec = (p) ? (int)(Len - (p - Strp)) : 0;
-    } // endif s
+  } // endif s
 
   Type = TYPE_DECIM;
-  } // end of DECVAL constructor
+} // end of DECVAL constructor
 
 /***********************************************************************/
 /*  DECIMAL public constructor from char.                              */
 /***********************************************************************/
 DECVAL::DECVAL(PGLOBAL g, PSZ s, int n, int prec, bool uns)
       : TYPVAL(g, s, n + (prec ? 1 : 0) + (uns ? 0 : 1), 0)
-  {
+{
   Prec = prec;
   Unsigned = uns;
   Type = TYPE_DECIM;
-  } // end of DECVAL constructor
+} // end of DECVAL constructor
 
 /***********************************************************************/
 /*  DECIMAL: Check whether the numerica value is equal to 0.           */
 /***********************************************************************/
 bool DECVAL::IsZero(void)
-  {
+{
   for (int i = 0; Strp[i]; i++)
     if (!strchr("0 +-.", Strp[i]))
       return false;
 
   return true;
-  } // end of IsZero
+} // end of IsZero
 
 /***********************************************************************/
 /*  DECIMAL: Reset value to zero.                                      */
@@ -1797,7 +1800,7 @@
       Strp[i++] = '0';
       } while (i < Prec + 2);
 
-    } // endif Prec
+  } // endif Prec
 
   Strp[i] = 0;
 } // end of Reset
@@ -1806,9 +1809,9 @@
 /*  DECIMAL ShowValue: get string representation right justified.      */
 /***********************************************************************/
 int DECVAL::ShowValue(char *buf, int len)
-  {
+{
   return snprintf(buf, len + 1, Xfmt, len, Strp);
-  } // end of ShowValue
+} // end of ShowValue
 
 /***********************************************************************/
 /*  GetBinValue: fill a buffer with the internal binary value.         */
@@ -1817,7 +1820,7 @@
 /*  Currently used by WriteColumn of binary files.                     */
 /***********************************************************************/
 bool DECVAL::GetBinValue(void *buf, int buflen, bool go)
-  {
+{
   int len = (Null) ? 0 : strlen(Strp);
 
   if (len > buflen)
@@ -1825,16 +1828,16 @@
   else if (go) {
     memset(buf, ' ', buflen - len);
     memcpy((char*)buf + buflen - len, Strp, len);
-    } // endif go
+  } // endif go
 
   return false;
-  } // end of GetBinValue
+} // end of GetBinValue
 
 /***********************************************************************/
 /*  DECIMAL compare value with another Value.                          */
 /***********************************************************************/
 bool DECVAL::IsEqual(PVAL vp, bool chktype)
-  {
+{
   if (this == vp)
     return true;
   else if (chktype && Type != vp->GetType())
@@ -1845,14 +1848,14 @@
   char buf[64];
 
   return !strcmp(Strp, vp->GetCharString(buf));
-  } // end of IsEqual
+} // end of IsEqual
 
 /***********************************************************************/
 /*  Compare values and returns 1, 0 or -1 according to comparison.     */
 /*  This function is used for evaluation of numeric filters.           */
 /***********************************************************************/
 int DECVAL::CompareValue(PVAL vp)
-  {
+{
 //assert(vp->GetType() == Type);
 
   // Process filtering on numeric values.
@@ -1862,7 +1865,7 @@
 //  htrc(" Comparing: val=%d,%d\n", f, n);
 
   return (f > n) ? 1 : (f < n) ? (-1) : 0;
-  } // end of CompareValue
+} // end of CompareValue
 
 /* -------------------------- Class BINVAL --------------------------- */
 
@@ -1870,7 +1873,7 @@
 /*  BINVAL public constructor from bytes.                              */
 /***********************************************************************/
 BINVAL::BINVAL(PGLOBAL g, void *p, int cl, int n) : VALUE(TYPE_BIN)
-  {
+{
   assert(g);
 	Len = n;
 	Clen = cl;
@@ -1881,19 +1884,19 @@
     memcpy(Binp, p, MY_MIN(Len,Clen));
 
   Chrp = NULL;
-  } // end of BINVAL constructor
+} // end of BINVAL constructor
 
 /***********************************************************************/
 /*  BINVAL: Check whether the hexadecimal value is equal to 0.         */
 /***********************************************************************/
 bool BINVAL::IsZero(void)
-  {
+{
   for (int i = 0; i < Len; i++)
     if (((char*)Binp)[i] != 0)
       return false;
 
   return true;
-  } // end of IsZero
+} // end of IsZero
 
 /***********************************************************************/
 /*  BINVAL: Reset value to zero.                                       */
@@ -1908,77 +1911,77 @@
 /*  Get the tiny value pointed by Binp.                                */
 /***********************************************************************/
 char BINVAL::GetTinyValue(void)
-  {
+{
   return *(char*)Binp;
-  } // end of GetTinyValue
+} // end of GetTinyValue
 
 /***********************************************************************/
 /*  Get the unsigned tiny value pointed by Binp.                       */
 /***********************************************************************/
 uchar BINVAL::GetUTinyValue(void)
-  {
+{
   return *(uchar*)Binp;
-  } // end of GetUTinyValue
+} // end of GetUTinyValue
 
 /***********************************************************************/
 /*  Get the short value pointed by Binp.                               */
 /***********************************************************************/
 short BINVAL::GetShortValue(void)
-  {
+{
   if (Len >= 2)
     return *(short*)Binp;
   else
     return (short)GetTinyValue();
 
-  } // end of GetShortValue
+} // end of GetShortValue
 
 /***********************************************************************/
 /*  Get the unsigned short value pointed by Binp.                      */
 /***********************************************************************/
 ushort BINVAL::GetUShortValue(void)
-  {
+{
   return (ushort)GetShortValue(); 
-  } // end of GetUshortValue
+} // end of GetUshortValue
 
 /***********************************************************************/
 /*  Get the integer value pointed by Binp.                             */
 /***********************************************************************/
 int BINVAL::GetIntValue(void)
-  {
+{
   if (Len >= 4)
     return *(int*)Binp;
   else
     return (int)GetShortValue();
 
-  } // end of GetIntValue
+} // end of GetIntValue
 
 /***********************************************************************/
 /*  Get the unsigned integer value pointed by Binp.                    */
 /***********************************************************************/
 uint BINVAL::GetUIntValue(void)
-  {
+{
   return (uint)GetIntValue(); 
-  } // end of GetUintValue
+} // end of GetUintValue
 
 /***********************************************************************/
 /*  Get the big integer value pointed by Binp.                         */
 /***********************************************************************/
 longlong BINVAL::GetBigintValue(void)
-  {
+{
   if (Len >= 8)
     return *(longlong*)Binp;
   else
     return (longlong)GetIntValue();
 
-  } // end of GetBigintValue
+} // end of GetBigintValue
 
 /***********************************************************************/
 /*  Get the unsigned big integer value pointed by Binp.                */
 /***********************************************************************/
 ulonglong BINVAL::GetUBigintValue(void)
-  {
+{
   return (ulonglong)GetBigintValue(); 
-  } // end of GetUBigintValue
+} // end of GetUBigintValue
 
 /***********************************************************************/
 /*  Get the double value pointed by Binp.                              */
@@ -1998,7 +2001,7 @@
 /*  BINVAL SetValue: copy the value of another Value object.           */
 /***********************************************************************/
 bool BINVAL::SetValue_pval(PVAL valp, bool chktype)
-  {
+{
   bool rc = false;
       
   if (valp != this) {
@@ -2018,16 +2021,16 @@
     } else
       Reset();
 
-    } // endif valp
+  } // endif valp
 
   return rc;
-  } // end of SetValue_pval
+} // end of SetValue_pval
 
 /***********************************************************************/
 /*  BINVAL SetValue: fill value with chars extracted from a line.      */
 /***********************************************************************/
 bool BINVAL::SetValue_char(const char *p, int n)
-  {
+{
   bool rc;
 
   if (p && n > 0) {
@@ -2047,13 +2050,13 @@
   } // endif p
 
   return rc;
-  } // end of SetValue_char
+} // end of SetValue_char
 
 /***********************************************************************/
 /*  BINVAL SetValue: fill value with another string.                   */
 /***********************************************************************/
 void BINVAL::SetValue_psz(PCSZ s)
-  {
+{
   if (s) {
 		int len = Len;
 
@@ -2068,13 +2071,13 @@
     Null = Nullable;
   } // endif s
 
-  } // end of SetValue_psz
+} // end of SetValue_psz
 
 /***********************************************************************/
 /*  BINVAL SetValue: fill value with bytes extracted from a block.     */
 /***********************************************************************/
 void BINVAL::SetValue_pvblk(PVBLK blk, int n)
-  {
+{
   // STRBLK's can return a NULL pointer
   void *vp = blk->GetValPtrEx(n);
 
@@ -2097,13 +2100,13 @@
 		Null = false;
   } // endif vp
 
-  } // end of SetValue_pvblk
+} // end of SetValue_pvblk
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of an integer.      */
 /***********************************************************************/
 void BINVAL::SetValue(int n)
-  {
+{
   if (Clen >= 4) {
 		if (Len > 4)
 			memset(Binp, 0, Len);
@@ -2113,13 +2116,13 @@
   } else
     SetValue((short)n);
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of an uint.         */
 /***********************************************************************/
 void BINVAL::SetValue(uint n)
-  {
+{
   if (Clen >= 4) {
 		if (Len > 4)
 			memset(Binp, 0, Len);
@@ -2129,13 +2132,13 @@
   } else
     SetValue((ushort)n);
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of a short int.     */
 /***********************************************************************/
 void BINVAL::SetValue(short i)
-  {
+{
   if (Clen >= 2) {
 		if (Len > 2)
 			memset(Binp, 0, Len);
@@ -2145,13 +2148,13 @@
   } else
     SetValue((char)i);
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of a ushort int.    */
 /***********************************************************************/
 void BINVAL::SetValue(ushort i)
-  {
+{
   if (Clen >= 2) {
 		if (Len > 2)
 			memset(Binp, 0, Len);
@@ -2161,13 +2164,13 @@
   } else
     SetValue((uchar)i);
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of a big integer.   */
 /***********************************************************************/
 void BINVAL::SetValue(longlong n)
-  {
+{
   if (Clen >= 8) {
 		if (Len > 8)
 			memset(Binp, 0, Len);
@@ -2177,13 +2180,13 @@
   } else
     SetValue((int)n);
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of a big integer.   */
 /***********************************************************************/
 void BINVAL::SetValue(ulonglong n)
-  {
+{
   if (Clen >= 8) {
 		if (Len > 8)
 			memset(Binp, 0, Len);
@@ -2192,13 +2195,14 @@
     Len = 8;
   } else
     SetValue((uint)n);
-  } // end of SetValue
+
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of a double.        */
 /***********************************************************************/
 void BINVAL::SetValue(double n)
-  {
+{
 	if (Len > 8)
 	  memset(Binp, 0, Len);
 
@@ -2211,40 +2215,40 @@
   } else
     Len = 0;
   
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the character binary of a tiny int.           */
 /***********************************************************************/
 void BINVAL::SetValue(char c)
-  {
+{
 	if (Len > 1)
 		memset(Binp, 0, Len);
 
 	*((char*)Binp) = c;
   Len = 1;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetValue: get the binary representation of a tiny int.      */
 /***********************************************************************/
 void BINVAL::SetValue(uchar c)
-  {
+{
 	if (Len > 1)
 		memset(Binp, 0, Len);
 
 	*((uchar*)Binp) = c;
   Len = 1;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  BINVAL SetBinValue: fill string with bytes extracted from a line.  */
 /***********************************************************************/
 void BINVAL::SetBinValue(void *p)
-  {
+{
   memcpy(Binp, p, Clen);
 	Len = Clen;
-  } // end of SetBinValue
+} // end of SetBinValue
 
 /***********************************************************************/
 /*  GetBinValue: fill a buffer with the internal binary value.         */
@@ -2253,7 +2257,7 @@
 /*  Currently used by WriteColumn of binary files.                     */
 /***********************************************************************/
 bool BINVAL::GetBinValue(void *buf, int buflen, bool go)
-  {
+{
   if (Len > buflen)
     return true;
   else if (go) {
@@ -2262,7 +2266,7 @@
   } // endif go
 
   return false;
-  } // end of GetBinValue
+} // end of GetBinValue
 
 /***********************************************************************/
 /*  BINVAL ShowValue: get string representation of a binary value.     */
@@ -2278,19 +2282,19 @@
 /*  BINVAL GetCharString: get string representation of a binary value. */
 /***********************************************************************/
 char *BINVAL::GetCharString(char *)
-  {
+{
   if (!Chrp)
     Chrp = (char*)PlugSubAlloc(Global, NULL, Clen * 2 + 1);
 
   sprintf(Chrp, GetXfmt(), Len, Binp); 
   return Chrp;
-  } // end of GetCharString
+} // end of GetCharString
 
 /***********************************************************************/
 /*  BINVAL compare value with another Value.                           */
 /***********************************************************************/
 bool BINVAL::IsEqual(PVAL vp, bool chktype)
-  {
+{
   if (this == vp)
     return true;
   else if (chktype && Type != vp->GetType())
@@ -2308,7 +2312,7 @@
       return false;
 
   return true;
-  } // end of IsEqual
+} // end of IsEqual
 
 /***********************************************************************/
 /*  FormatValue: This function set vp (a STRING value) to the string   */
@@ -2316,23 +2320,23 @@
 /*  This function assumes that the format matches the value type.      */
 /***********************************************************************/
 bool BINVAL::FormatValue(PVAL vp, PCSZ fmt)
-  {
+{
   char *buf = (char*)vp->GetTo_Val();        // Should be big enough
   int   n = sprintf(buf, fmt, Len, Binp);
 
   return (n > vp->GetValLen());
-  } // end of FormatValue
+} // end of FormatValue
 
 /***********************************************************************/
 /*  BINVAL SetFormat function (used to set SELECT output format).      */
 /***********************************************************************/
 bool BINVAL::SetConstFormat(PGLOBAL, FORMAT& fmt)
-  {
+{
   fmt.Type[0] = 'B';
   fmt.Length = Clen;
   fmt.Prec = 0;
   return false;
-  } // end of SetConstFormat
+} // end of SetConstFormat
 
 /* -------------------------- Class DTVAL ---------------------------- */
 
@@ -2341,7 +2345,7 @@
 /***********************************************************************/
 DTVAL::DTVAL(PGLOBAL g, int n, int prec, PCSZ fmt)
      : TYPVAL((int)0, TYPE_DATE)
-  {
+{
   if (!fmt) {
     Pdtp = NULL;
     Sdate = NULL;
@@ -2351,37 +2355,37 @@
     SetFormat(g, fmt, n, prec);
 
 //Type = TYPE_DATE;
-  } // end of DTVAL constructor
+} // end of DTVAL constructor
 
 /***********************************************************************/
 /*  DTVAL  public constructor from int.                                */
 /***********************************************************************/
 DTVAL::DTVAL(int n) : TYPVAL(n, TYPE_DATE)
-  {
+{
   Pdtp = NULL;
   Len = 19;
 //Type = TYPE_DATE;
   Sdate = NULL;
   DefYear = 0;
-  } // end of DTVAL constructor
+} // end of DTVAL constructor
 
 /***********************************************************************/
 /*  Set format so formatted dates can be converted on input/output.    */
 /***********************************************************************/
 bool DTVAL::SetFormat(PGLOBAL g, PCSZ fmt, int len, int year)
-  {
+{
   Pdtp = MakeDateFormat(g, fmt, true, true, (year > 9999) ? 1 : 0);
   Sdate = (char*)PlugSubAlloc(g, NULL, len + 1);
   DefYear = (int)((year > 9999) ? (year - 10000) : year);
   Len = len;
   return false;
-  } // end of SetFormat
+} // end of SetFormat
 
 /***********************************************************************/
 /*  Set format from the format of another date value.                  */
 /***********************************************************************/
 bool DTVAL::SetFormat(PGLOBAL g, PVAL valp)
-  {
+{
   DTVAL *vp;
 
   if (valp->GetType() != TYPE_DATE) {
@@ -2395,14 +2399,14 @@
   Sdate = (char*)PlugSubAlloc(g, NULL, Len + 1);
   DefYear = vp->DefYear;
   return false;
-  } // end of SetFormat
+} // end of SetFormat
 
 /***********************************************************************/
 /*  We need TimeShift because the mktime C function does a correction  */
 /*  for local time zone that we want to override for DB operations.    */
 /***********************************************************************/
 void DTVAL::SetTimeShift(void)
-  {
+{
   struct tm dtm;
   memset(&dtm, 0, sizeof(dtm));
   dtm.tm_mday=2;
@@ -2414,7 +2418,7 @@
   if (trace(1))
     htrc("DTVAL Shift=%d\n", Shift);
 
-  } // end of SetTimeShift
+} // end of SetTimeShift
 
 // Added by Alexander Barkov
 static void TIME_to_localtime(struct tm *tm, const MYSQL_TIME *ltime)
@@ -2444,7 +2448,7 @@
 /*  extend the range of valid dates by accepting negative time values. */
 /***********************************************************************/
 struct tm *DTVAL::GetGmTime(struct tm *tm_buffer)
-  {
+{
   struct tm *datm;
   time_t t = (time_t)Tval;
 
@@ -2463,7 +2467,7 @@
     datm = gmtime_mysql(&t, tm_buffer);
 
   return datm;
-  } // end of GetGmTime
+} // end of GetGmTime
 
 // Added by Alexander Barkov
 static time_t mktime_mysql(struct tm *ptm)
@@ -2482,7 +2486,7 @@
 /*  range of valid dates by accepting to set negative time values.     */
 /***********************************************************************/
 bool DTVAL::MakeTime(struct tm *ptm)
-  {
+{
   int    n, y = ptm->tm_year;
   time_t t = mktime_mysql(ptm);
 
@@ -2498,7 +2502,7 @@
     for (n = 0; t == -1 && n < 20; n++) {
       ptm->tm_year += 4;
       t = mktime_mysql(ptm);
-      } // endfor t
+    } // endfor t
 
     if (t == -1)
       return true;
@@ -2506,20 +2510,21 @@
     if ((t -= (n * FOURYEARS)) > 2000000000)
       return true;
 
-  }
+  } // endif t
+
   Tval= (int) t;
 
   if (trace(2))
     htrc("MakeTime Ival=%d\n", Tval);
 
   return false;
-  } // end of MakeTime
+} // end of MakeTime
 
 /***********************************************************************/
 /* Make a time_t datetime from its components (YY, MM, DD, hh, mm, ss) */
 /***********************************************************************/
 bool DTVAL::MakeDate(PGLOBAL g, int *val, int nval)
-  {
+{
   int       i, m;
   int       n;
   bool      rc = false;
@@ -2589,9 +2594,9 @@
       case 3: datm.tm_hour = n; break;
       case 4: datm.tm_min  = n; break;
       case 5: datm.tm_sec  = n; break;
-      } // endswitch i
+    } // endswitch i
 
-    } // endfor i
+  } // endfor i
 
   if (trace(2))
     htrc("MakeDate datm=(%d,%d,%d,%d,%d,%d)\n",
@@ -2607,14 +2612,14 @@
       Tval = 0;
 
   return rc;
-  } // end of MakeDate
+} // end of MakeDate
 
 /***********************************************************************/
 /*  DTVAL SetValue: copy the value of another Value object.            */
 /*  This function allows conversion if chktype is false.               */
 /***********************************************************************/
 bool DTVAL::SetValue_pval(PVAL valp, bool chktype)
-  {
+{
   if (valp != this) {
     if (chktype && Type != valp->GetType())
       return true;
@@ -2636,16 +2641,16 @@
     } else
       Reset();
 
-    } // endif valp
+  } // endif valp
 
   return false;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  SetValue: convert chars extracted from a line to date value.       */
 /***********************************************************************/
 bool DTVAL::SetValue_char(const char *p, int n)
-  {
+{
   bool rc= 0;
 
   if (Pdtp) {
@@ -2661,7 +2666,7 @@
 				n = Len;
 
 			memcpy(Sdate, p, n);
-			} // endif n
+		} // endif n
 
     Sdate[n] = '\0';
 
@@ -2678,13 +2683,13 @@
   } // endif Pdtp
 
   return rc;
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  SetValue: convert a char string to date value.                     */
 /***********************************************************************/
 void DTVAL::SetValue_psz(PCSZ p)
-  {
+{
   if (Pdtp) {
     int ndv;
     int dval[6];
@@ -2704,13 +2709,13 @@
     Null = (Nullable && Tval == 0);
   } // endif Pdtp
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  DTVAL SetValue: set value with a value extracted from a block.     */
 /***********************************************************************/
 void DTVAL::SetValue_pvblk(PVBLK blk, int n)
-  {
+{
   if (Pdtp && !::IsTypeNum(blk->GetType())) {
     int   ndv;
     int  dval[6];
@@ -2720,13 +2725,13 @@
   } else
     Tval = blk->GetIntValue(n);
 
-  } // end of SetValue
+} // end of SetValue
 
 /***********************************************************************/
 /*  DTVAL GetCharString: get string representation of a date value.    */
 /***********************************************************************/
 char *DTVAL::GetCharString(char *p)
-  {
+{
   if (Pdtp) {
     size_t n = 0;
     struct tm tm, *ptm= GetGmTime(&tm);
@@ -2745,7 +2750,7 @@
 
 //Null = false;                      ??????????????
   return p;
-  } // end of GetCharString
+} // end of GetCharString
 
 /***********************************************************************/
 /*  DTVAL ShowValue: get string representation of a date value.        */
@@ -2783,7 +2788,7 @@
 /*  Returns a member of the struct tm representation of the date.      */
 /***********************************************************************/
 bool DTVAL::GetTmMember(OPVAL op, int& mval)
-  {
+{
   bool       rc = false;
   struct tm tm, *ptm = GetGmTime(&tm);
 
@@ -2796,10 +2801,10 @@
     case OP_QUART: mval = ptm->tm_mon / 3 + 1; break;
     default:
       rc = true;
-    } // endswitch op
+  } // endswitch op
 
   return rc;
-  } // end of GetTmMember
+} // end of GetTmMember
 
 /***********************************************************************/
 /*  Calculates the week number of the year for the internal date value.*/
@@ -2810,7 +2815,7 @@
 /*  the week that contains the January 4th.                            */
 /***********************************************************************/
 bool DTVAL::WeekNum(PGLOBAL g, int& nval)
-  {
+{
   // w is the start of the week SUN=0, MON=1, etc.
   int        m, n, w = nval % 7;
   struct tm tm, *ptm = GetGmTime(&tm);
@@ -2827,7 +2832,7 @@
 
   // Everything should be Ok
   return false;
-  } // end of WeekNum
+} // end of WeekNum
 #endif // 0
 
 /***********************************************************************/
@@ -2836,7 +2841,7 @@
 /*  This function assumes that the format matches the value type.      */
 /***********************************************************************/
 bool DTVAL::FormatValue(PVAL vp, PCSZ fmt)
-  {
+{
   char     *buf = (char*)vp->GetTo_Val();       // Should be big enough
   struct tm tm, *ptm = GetGmTime(&tm);
 
@@ -2853,6 +2858,6 @@
   } else
     return true;
 
-  } // end of FormatValue
+} // end of FormatValue
 
 /* -------------------------- End of Value --------------------------- */
diff -Nru mariadb-10.3-10.3.18/storage/connect/xindex.cpp mariadb-10.3-10.3.22/storage/connect/xindex.cpp
--- mariadb-10.3-10.3.18/storage/connect/xindex.cpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/xindex.cpp	2020-01-26 18:37:29.000000000 +0000
@@ -659,7 +659,7 @@
   /*  Not true for DBF tables because of eventual soft deleted lines.  */
   /*  Note: for Num_K = 1 any non null value is Ok.                    */
   /*********************************************************************/
-  if (Srtd && !filp && Tdbp->Ftype != RECFM_VAR 
+  if (Srtd && !filp && Tdbp->Ftype != RECFM_VAR && Tdbp->Ftype != RECFM_CSV
                     && Tdbp->Txfp->GetAmType() != TYPE_AM_DBF) {
     Incr = (Num_K > 1) ? To_Rec[1] : Num_K;
     PlgDBfree(Record);
@@ -837,7 +837,8 @@
     case RECFM_FIX: ftype = ".fnx"; break;
     case RECFM_BIN: ftype = ".bnx"; break;
     case RECFM_VCT: ftype = ".vnx"; break;
-    case RECFM_DBF: ftype = ".dbx"; break;
+		case RECFM_CSV: ftype = ".cnx"; break;
+		case RECFM_DBF: ftype = ".dbx"; break;
     default:
       sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype);
       return true;
@@ -990,7 +991,8 @@
     case RECFM_FIX: ftype = ".fnx"; break;
     case RECFM_BIN: ftype = ".bnx"; break;
     case RECFM_VCT: ftype = ".vnx"; break;
-    case RECFM_DBF: ftype = ".dbx"; break;
+		case RECFM_CSV: ftype = ".cnx"; break;
+		case RECFM_DBF: ftype = ".dbx"; break;
     default:
       sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype);
       return true;
@@ -1243,7 +1245,8 @@
     case RECFM_FIX: ftype = ".fnx"; break;
     case RECFM_BIN: ftype = ".bnx"; break;
     case RECFM_VCT: ftype = ".vnx"; break;
-    case RECFM_DBF: ftype = ".dbx"; break;
+		case RECFM_CSV: ftype = ".cnx"; break;
+		case RECFM_DBF: ftype = ".dbx"; break;
     default:
       sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype);
       return true;
@@ -1457,7 +1460,8 @@
     case RECFM_FIX: ftype = ".fnx"; break;
     case RECFM_BIN: ftype = ".bnx"; break;
     case RECFM_VCT: ftype = ".vnx"; break;
-    case RECFM_DBF: ftype = ".dbx"; break;
+		case RECFM_CSV: ftype = ".cnx"; break;
+		case RECFM_DBF: ftype = ".dbx"; break;
     default:
       sprintf(g->Message, MSG(INVALID_FTYPE), Tdbp->Ftype);
       return true;
diff -Nru mariadb-10.3-10.3.18/storage/connect/xtable.h mariadb-10.3-10.3.22/storage/connect/xtable.h
--- mariadb-10.3-10.3.18/storage/connect/xtable.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/connect/xtable.h	2020-01-26 18:37:29.000000000 +0000
@@ -173,9 +173,12 @@
   inline  void    SetKindex(PKXBASE kxp) {To_Kindex = kxp;}
 
   // Properties
-	virtual PKXBASE GetKindex(void) {return To_Kindex;}
+	PKXBASE GetKindex(void) {return To_Kindex;}
+	PXOB   *GetLink(void) {return To_Link;}
+	PIXDEF  GetXdp(void) {return To_Xdp;}
 	void    ResetKindex(PGLOBAL g, PKXBASE kxp);
   PCOL    Key(int i) {return (To_Key_Col) ? To_Key_Col[i] : NULL;}
+	PXOB    Link(int i) { return (To_Link) ? To_Link[i] : NULL; }
 
   // Methods
   virtual bool   IsUsingTemp(PGLOBAL) {return false;}
diff -Nru mariadb-10.3-10.3.18/storage/example/ha_example.cc mariadb-10.3-10.3.22/storage/example/ha_example.cc
--- mariadb-10.3-10.3.18/storage/example/ha_example.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/example/ha_example.cc	2020-01-26 18:37:29.000000000 +0000
@@ -225,9 +225,9 @@
   used by the default rename_table and delete_table method in
   handler.cc and by the default discover_many method.
 
-  For engines that have two file name extentions (separate meta/index file
+  For engines that have two file name extensions (separate meta/index file
   and data file), the order of elements is relevant. First element of engine
-  file name extentions array should be meta/index file extention. Second
+  file name extensions array should be meta/index file extention. Second
   element - data file extention. This order is assumed by
   prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued.
 
diff -Nru mariadb-10.3-10.3.18/storage/federatedx/AUTHORS mariadb-10.3-10.3.22/storage/federatedx/AUTHORS
--- mariadb-10.3-10.3.18/storage/federatedx/AUTHORS	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/federatedx/AUTHORS	2020-01-26 18:37:29.000000000 +0000
@@ -7,5 +7,5 @@
 Brian Aker   |  - Original Design
 Calvin Sun - Windows Support
 Brian Miezejewski - Bug fixes
-Antony T Curtis   - Help in inital development, transactions and various help
+Antony T Curtis   - Help in initial development, transactions and various help
 Michael Widenius  - Bug fixes and some simple early optimizations
diff -Nru mariadb-10.3-10.3.18/storage/federatedx/ha_federatedx.cc mariadb-10.3-10.3.22/storage/federatedx/ha_federatedx.cc
--- mariadb-10.3-10.3.18/storage/federatedx/ha_federatedx.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/federatedx/ha_federatedx.cc	2020-01-26 18:37:29.000000000 +0000
@@ -798,12 +798,12 @@
       goto error;
 
     if (share->hostname[0] == '\0')
-      share->hostname= NULL;
+      share->hostname= strdup_root(mem_root, my_localhost);
 
   }
   if (!share->port)
   {
-    if (!share->hostname || strcmp(share->hostname, my_localhost) == 0)
+    if (0 == strcmp(share->hostname, my_localhost))
       share->socket= (char *) MYSQL_UNIX_ADDR;
     else
       share->port= MYSQL_PORT;
@@ -3385,8 +3385,7 @@
     goto error;
 
   /* loopback socket connections hang due to LOCK_open mutex */
-  if ((!tmp_share.hostname || !strcmp(tmp_share.hostname,my_localhost)) &&
-      !tmp_share.port)
+  if (0 == strcmp(tmp_share.hostname, my_localhost) && !tmp_share.port)
     goto error;
 
   /*
diff -Nru mariadb-10.3-10.3.18/storage/heap/_check.c mariadb-10.3-10.3.22/storage/heap/_check.c
--- mariadb-10.3-10.3.18/storage/heap/_check.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/heap/_check.c	2020-01-26 18:37:29.000000000 +0000
@@ -18,10 +18,8 @@
 
 #include "heapdef.h"
 
-static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
-			 ulong blength, my_bool print_status);
-static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
-			    my_bool print_status);
+static int check_one_key(HP_KEYDEF *, uint, ulong, ulong, my_bool);
+static int check_one_rb_key(const HP_INFO *, uint, ulong, my_bool);
 
 
 /*
@@ -40,13 +38,13 @@
     1 error
 */
 
-int heap_check_heap(HP_INFO *info, my_bool print_status)
+int heap_check_heap(const HP_INFO *info, my_bool print_status)
 {
   int error;
   uint key;
   ulong records=0, deleted=0, pos, next_block;
   HP_SHARE *share=info->s;
-  HP_INFO save_info= *info;			/* Needed because scan_init */
+  uchar *current_ptr= info->current_ptr;
   DBUG_ENTER("heap_check_heap");
 
   for (error=key= 0 ; key < share->keys ; key++)
@@ -65,7 +63,7 @@
   {
     if (pos < next_block)
     {
-      info->current_ptr+= share->block.recbuffer;
+      current_ptr+= share->block.recbuffer;
     }
     else
     {
@@ -77,9 +75,9 @@
 	  break;				/* End of file */
       }
     }
-    hp_find_record(info,pos);
+    current_ptr= hp_find_block(&share->block, pos);
 
-    if (!info->current_ptr[share->visible])
+    if (!current_ptr[share->visible])
       deleted++;
     else
       records++;
@@ -92,7 +90,6 @@
                         deleted, (ulong) share->deleted));
     error= 1;
   }
-  *info= save_info;
   DBUG_RETURN(error);
 }
 
@@ -165,7 +162,7 @@
   return error;
 }
 
-static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
+static int check_one_rb_key(const HP_INFO *info, uint keynr, ulong records,
 			    my_bool print_status)
 {
   HP_KEYDEF *keydef= info->s->keydef + keynr;
@@ -174,9 +171,11 @@
   uchar *key, *recpos;
   uint key_length;
   uint not_used[2];
+  TREE_ELEMENT **last_pos;
+  TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
   
-  if ((key= tree_search_edge(&keydef->rb_tree, info->parents,
-			     &info->last_pos, offsetof(TREE_ELEMENT, left))))
+  if ((key= tree_search_edge(&keydef->rb_tree, parents,
+			     &last_pos, offsetof(TREE_ELEMENT, left))))
   {
     do
     {
@@ -191,7 +190,7 @@
       }
       else
 	found++;
-      key= tree_search_next(&keydef->rb_tree, &info->last_pos,
+      key= tree_search_next(&keydef->rb_tree, &last_pos,
 			    offsetof(TREE_ELEMENT, left), 
 			    offsetof(TREE_ELEMENT, right));
     } while (key);
diff -Nru mariadb-10.3-10.3.18/storage/heap/ha_heap.cc mariadb-10.3-10.3.22/storage/heap/ha_heap.cc
--- mariadb-10.3-10.3.18/storage/heap/ha_heap.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/heap/ha_heap.cc	2020-01-26 18:37:29.000000000 +0000
@@ -430,6 +430,10 @@
 
 int ha_heap::external_lock(THD *thd, int lock_type)
 {
+#ifndef DBUG_OFF
+  if (lock_type == F_UNLCK && file->s->changed && heap_check_heap(file, 0))
+    return HA_ERR_CRASHED;
+#endif
   return 0;					// No external locking
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/heap/hp_close.c mariadb-10.3-10.3.22/storage/heap/hp_close.c
--- mariadb-10.3-10.3.18/storage/heap/hp_close.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/heap/hp_close.c	2020-01-26 18:37:29.000000000 +0000
@@ -35,12 +35,6 @@
 {
   int error=0;
   DBUG_ENTER("hp_close");
-#ifndef DBUG_OFF
-  if (info->s->changed && heap_check_heap(info,0))
-  {
-    error=my_errno=HA_ERR_CRASHED;
-  }
-#endif
   info->s->changed=0;
   if (info->open_list.data)
     heap_open_list=list_delete(heap_open_list,&info->open_list);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/.clang-format mariadb-10.3-10.3.22/storage/innobase/.clang-format
--- mariadb-10.3-10.3.18/storage/innobase/.clang-format	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/.clang-format	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,11 @@
+UseTab: Always
+TabWidth: 8
+IndentWidth: 8
+ContinuationIndentWidth: 8
+BreakBeforeBinaryOperators: All
+PointerAlignment: Left
+BreakBeforeBraces: Custom
+ColumnLimit: 79
+BraceWrapping:
+  AfterFunction: true
+AccessModifierOffset: -8
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0btr.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0btr.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0btr.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0btr.cc	2020-01-26 18:37:29.000000000 +0000
@@ -322,26 +322,24 @@
 	fseg_header_t*	seg_header,	/*!< in/out: segment header */
 	page_zip_des_t*	page_zip,	/*!< in/out: compressed page,
 					or NULL */
-	ulint		space,		/*!< in: tablespace identifier */
-	mtr_t*		mtr)		/*!< in/out: mini-transaction */
+	ulint		space)		/*!< in: tablespace identifier */
 {
 	ulint	offset = mach_read_from_2(seg_header + FSEG_HDR_OFFSET);
 
 	if (offset < FIL_PAGE_DATA
 	    || offset > srv_page_size - FIL_PAGE_DATA_END) {
+		return false;
+	}
 
-		return(FALSE);
+	seg_header += FSEG_HDR_SPACE;
 
-	} else if (page_zip) {
-		mach_write_to_4(seg_header + FSEG_HDR_SPACE, space);
-		page_zip_write_header(page_zip, seg_header + FSEG_HDR_SPACE,
-				      4, mtr);
-	} else {
-		mlog_write_ulint(seg_header + FSEG_HDR_SPACE,
-				 space, MLOG_4BYTES, mtr);
+	mach_write_to_4(seg_header, space);
+	if (UNIV_LIKELY_NULL(page_zip)) {
+		memcpy(page_zip->data + page_offset(seg_header), seg_header,
+		       4);
 	}
 
-	return(TRUE);
+	return true;
 }
 
 /**************************************************************//**
@@ -399,10 +397,10 @@
 	if (err == DB_SUCCESS
 	    && (!btr_root_fseg_adjust_on_import(
 			FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
-			+ page, page_zip, table->space_id, &mtr)
+			+ page, page_zip, table->space_id)
 		|| !btr_root_fseg_adjust_on_import(
 			FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
-			+ page, page_zip, table->space_id, &mtr))) {
+			+ page, page_zip, table->space_id))) {
 
 		err = DB_CORRUPTION;
 	}
@@ -759,9 +757,11 @@
 	ut_ad(mtr_memo_contains(mtr, block, MTR_MEMO_PAGE_X_FIX));
 
 	if (srv_immediate_scrub_data_uncompressed) {
-		/* In MDEV-15528 this call must be removed, and we should
-		zero out the page after the redo log for this mini-transaction
-		has been durably written. */
+		/* In MDEV-15528 this code must be removed and the
+		check in buf_flush_init_for_writing() re-enabled.  We
+		should zero out the page after the redo log for this
+		mini-transaction has been durably written. The log
+		would include the 10.4 MLOG_INIT_FREE_PAGE record. */
 		fsp_init_file_page(index->table->space, block, mtr);
 	}
 }
@@ -775,7 +775,7 @@
 	rec_t*		rec,	/*!< in: node pointer record */
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page whose uncompressed
 				part will be updated, or NULL */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		page_no,/*!< in: child node address */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
@@ -810,7 +810,7 @@
 /*===================*/
 	const rec_t*	node_ptr,/*!< in: node pointer */
 	dict_index_t*	index,	/*!< in: index */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
 	ut_ad(rec_offs_validate(node_ptr, index, offsets));
@@ -829,10 +829,10 @@
 an sx-latch on the tree.
 @return rec_get_offsets() of the node pointer record */
 static
-ulint*
+offset_t*
 btr_page_get_father_node_ptr_func(
 /*==============================*/
-	ulint*		offsets,/*!< in: work area for the return value */
+	offset_t*	offsets,/*!< in: work area for the return value */
 	mem_heap_t*	heap,	/*!< in: memory heap to use */
 	btr_cur_t*	cursor,	/*!< in: cursor pointing to user record,
 				out: cursor on node pointer record,
@@ -936,10 +936,10 @@
 an x-latch on the tree.
 @return rec_get_offsets() of the node pointer record */
 static
-ulint*
+offset_t*
 btr_page_get_father_block(
 /*======================*/
-	ulint*		offsets,/*!< in: work area for the return value */
+	offset_t*	offsets,/*!< in: work area for the return value */
 	mem_heap_t*	heap,	/*!< in: memory heap to use */
 	dict_index_t*	index,	/*!< in: b-tree index */
 	buf_block_t*	block,	/*!< in: child page in the index */
@@ -1823,7 +1823,7 @@
 				on the root page; when the function returns,
 				the cursor is positioned on the predecessor
 				of the inserted record */
-	ulint**		offsets,/*!< out: offsets on inserted record */
+	offset_t**	offsets,/*!< out: offsets on inserted record */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
@@ -2000,13 +2000,7 @@
 		page_set_instant(root_block->frame, index->n_core_fields, mtr);
 	}
 
-	/* Set the next node and previous node fields, although
-	they should already have been set.  The previous node field
-	must be FIL_NULL if root_page_zip != NULL, because the
-	REC_INFO_MIN_REC_FLAG (of the first user record) will be
-	set if and only if !page_has_prev(). */
-	btr_page_set_next(root, root_page_zip, FIL_NULL, mtr);
-	btr_page_set_prev(root, root_page_zip, FIL_NULL, mtr);
+	ut_ad(!page_has_siblings(root));
 
 	page_cursor = btr_cur_get_page_cur(cursor);
 
@@ -2047,104 +2041,92 @@
 	}
 }
 
-/*************************************************************//**
-Decides if the page should be split at the convergence point of inserts
+/** Decide if the page should be split at the convergence point of inserts
 converging to the left.
-@return TRUE if split recommended */
-ibool
-btr_page_get_split_rec_to_left(
-/*===========================*/
-	btr_cur_t*	cursor,	/*!< in: cursor at which to insert */
-	rec_t**		split_rec) /*!< out: if split recommended,
-				the first record on upper half page,
-				or NULL if tuple to be inserted should
-				be first */
-{
-	page_t*	page;
-	rec_t*	insert_point;
-	rec_t*	infimum;
-
-	page = btr_cur_get_page(cursor);
-	insert_point = btr_cur_get_rec(cursor);
+@param[in]	cursor	insert position
+@return the first record to be moved to the right half page
+@retval	NULL if no split is recommended */
+rec_t* btr_page_get_split_rec_to_left(const btr_cur_t* cursor)
+{
+	rec_t* split_rec = btr_cur_get_rec(cursor);
+	const page_t* page = page_align(split_rec);
 
 	if (page_header_get_ptr(page, PAGE_LAST_INSERT)
-	    == page_rec_get_next(insert_point)) {
-
-		infimum = page_get_infimum_rec(page);
+	    != page_rec_get_next(split_rec)) {
+		return NULL;
+	}
 
-		/* If the convergence is in the middle of a page, include also
-		the record immediately before the new insert to the upper
-		page. Otherwise, we could repeatedly move from page to page
-		lots of records smaller than the convergence point. */
+	/* The metadata record must be present in the leftmost leaf page
+	of the clustered index, if and only if index->is_instant().
+	However, during innobase_instant_try(), index->is_instant()
+	would already hold when row_ins_clust_index_entry_low()
+	is being invoked to insert the the metadata record.
+	So, we can only assert that when the metadata record exists,
+	index->is_instant() must hold. */
+	ut_ad(!page_is_leaf(page) || page_has_prev(page)
+	      || cursor->index->is_instant()
+	      || !(rec_get_info_bits(page_rec_get_next_const(
+					     page_get_infimum_rec(page)),
+				     dict_table_is_comp(cursor->index->table))
+		   & REC_INFO_MIN_REC_FLAG));
 
-		if (infimum != insert_point
-		    && page_rec_get_next(infimum) != insert_point) {
+	const rec_t* infimum = page_get_infimum_rec(page);
 
-			*split_rec = insert_point;
-		} else {
-			*split_rec = page_rec_get_next(insert_point);
-		}
+	/* If the convergence is in the middle of a page, include also
+	the record immediately before the new insert to the upper
+	page. Otherwise, we could repeatedly move from page to page
+	lots of records smaller than the convergence point. */
 
-		return(TRUE);
+	if (split_rec == infimum
+	    || split_rec == page_rec_get_next_const(infimum)) {
+		split_rec = page_rec_get_next(split_rec);
 	}
 
-	return(FALSE);
+	return split_rec;
 }
 
-/*************************************************************//**
-Decides if the page should be split at the convergence point of inserts
+/** Decide if the page should be split at the convergence point of inserts
 converging to the right.
-@return TRUE if split recommended */
-ibool
-btr_page_get_split_rec_to_right(
-/*============================*/
-	btr_cur_t*	cursor,	/*!< in: cursor at which to insert */
-	rec_t**		split_rec) /*!< out: if split recommended,
-				the first record on upper half page,
-				or NULL if tuple to be inserted should
-				be first */
+@param[in]	cursor		insert position
+@param[out]	split_rec	if split recommended, the first record
+				on the right half page, or
+				NULL if the to-be-inserted record
+				should be first
+@return whether split is recommended */
+bool
+btr_page_get_split_rec_to_right(const btr_cur_t* cursor, rec_t** split_rec)
 {
-	page_t*	page;
-	rec_t*	insert_point;
-
-	page = btr_cur_get_page(cursor);
-	insert_point = btr_cur_get_rec(cursor);
+	rec_t* insert_point = btr_cur_get_rec(cursor);
+	const page_t* page = page_align(insert_point);
 
 	/* We use eager heuristics: if the new insert would be right after
 	the previous insert on the same page, we assume that there is a
 	pattern of sequential inserts here. */
 
-	if (page_header_get_ptr(page, PAGE_LAST_INSERT) == insert_point) {
-
-		rec_t*	next_rec;
-
-		next_rec = page_rec_get_next(insert_point);
-
-		if (page_rec_is_supremum(next_rec)) {
-split_at_new:
-			/* Split at the new record to insert */
-			*split_rec = NULL;
-		} else {
-			rec_t*	next_next_rec = page_rec_get_next(next_rec);
-			if (page_rec_is_supremum(next_next_rec)) {
-
-				goto split_at_new;
-			}
+	if (page_header_get_ptr(page, PAGE_LAST_INSERT) != insert_point) {
+		return false;
+	}
 
-			/* If there are >= 2 user records up from the insert
-			point, split all but 1 off. We want to keep one because
-			then sequential inserts can use the adaptive hash
-			index, as they can do the necessary checks of the right
-			search position just by looking at the records on this
-			page. */
+	insert_point = page_rec_get_next(insert_point);
 
-			*split_rec = next_next_rec;
+	if (page_rec_is_supremum(insert_point)) {
+		insert_point = NULL;
+	} else {
+		insert_point = page_rec_get_next(insert_point);
+		if (page_rec_is_supremum(insert_point)) {
+			insert_point = NULL;
 		}
 
-		return(TRUE);
+		/* If there are >= 2 user records up from the insert
+		point, split all but 1 off. We want to keep one because
+		then sequential inserts can use the adaptive hash
+		index, as they can do the necessary checks of the right
+		search position just by looking at the records on this
+		page. */
 	}
 
-	return(FALSE);
+	*split_rec = insert_point;
+	return true;
 }
 
 /*************************************************************//**
@@ -2174,7 +2156,7 @@
 	rec_t*		next_rec;
 	ulint		n;
 	mem_heap_t*	heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 
 	page = btr_cur_get_page(cursor);
 
@@ -2280,7 +2262,7 @@
 	const rec_t*	split_rec,/*!< in: suggestion for first record
 				on upper half-page, or NULL if
 				tuple to be inserted should be first */
-	ulint**		offsets,/*!< in: rec_get_offsets(
+	offset_t**	offsets,/*!< in: rec_get_offsets(
 				split_rec, cursor->index); out: garbage */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
@@ -2380,8 +2362,8 @@
 	dberr_t		err;
 	rec_t*		rec;
 	mem_heap_t*	heap = NULL;
-	ulint           offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*          offsets         = offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets         = offsets_;
 	rec_offs_init(offsets_);
 	rtr_info_t	rtr_info;
 
@@ -2489,7 +2471,7 @@
 	if (direction == FSP_DOWN) {
 
 		btr_cur_t	cursor;
-		ulint*		offsets;
+		offset_t*	offsets;
 
 		lower_page = buf_block_get_frame(new_block);
 		lower_page_no = new_block->page.id.page_no();
@@ -2520,8 +2502,8 @@
 	}
 
 	/* Get the previous and next pages of page */
-	prev_page_no = btr_page_get_prev(page, mtr);
-	next_page_no = btr_page_get_next(page, mtr);
+	prev_page_no = btr_page_get_prev(page);
+	next_page_no = btr_page_get_next(page);
 
 	const ulint	space = block->page.id.space();
 
@@ -2561,7 +2543,7 @@
 	if (prev_block) {
 #ifdef UNIV_BTR_DEBUG
 		ut_a(page_is_comp(prev_block->frame) == page_is_comp(page));
-		ut_a(btr_page_get_next(prev_block->frame, mtr)
+		ut_a(btr_page_get_next(prev_block->frame)
 		     == block->page.id.page_no());
 #endif /* UNIV_BTR_DEBUG */
 
@@ -2573,7 +2555,7 @@
 	if (next_block) {
 #ifdef UNIV_BTR_DEBUG
 		ut_a(page_is_comp(next_block->frame) == page_is_comp(page));
-		ut_a(btr_page_get_prev(next_block->frame, mtr)
+		ut_a(btr_page_get_prev(next_block->frame)
 		     == page_get_page_no(page));
 #endif /* UNIV_BTR_DEBUG */
 
@@ -2587,7 +2569,7 @@
 		btr_page_set_prev(lower_page, lower_page_zip,
 				  prev_page_no, mtr);
 	} else {
-		ut_ad(btr_page_get_prev(lower_page, mtr) == prev_page_no);
+		ut_ad(btr_page_get_prev(lower_page) == prev_page_no);
 	}
 
 	btr_page_set_next(lower_page, lower_page_zip, upper_page_no, mtr);
@@ -2598,7 +2580,7 @@
 		btr_page_set_next(upper_page, upper_page_zip,
 				  next_page_no, mtr);
 	} else {
-		ut_ad(btr_page_get_next(upper_page, mtr) == next_page_no);
+		ut_ad(btr_page_get_next(upper_page) == next_page_no);
 	}
 }
 
@@ -2611,7 +2593,7 @@
 /*===================*/
 	btr_cur_t*	cursor,	/*!< in: b-tree cursor */
 	const dtuple_t*	tuple,	/*!< in: tuple to consider */
-	ulint**		offsets,/*!< in/out: temporary storage */
+	offset_t**	offsets,/*!< in/out: temporary storage */
 	ulint		n_uniq,	/*!< in: number of unique fields
 				in the index page records */
 	mem_heap_t**	heap)	/*!< in/out: heap for offsets */
@@ -2651,7 +2633,7 @@
 btr_insert_into_right_sibling(
 	ulint		flags,
 	btr_cur_t*	cursor,
-	ulint**		offsets,
+	offset_t**	offsets,
 	mem_heap_t*	heap,
 	const dtuple_t*	tuple,
 	ulint		n_ext,
@@ -2659,7 +2641,7 @@
 {
 	buf_block_t*	block = btr_cur_get_block(cursor);
 	page_t*		page = buf_block_get_frame(block);
-	ulint		next_page_no = btr_page_get_next(page, mtr);
+	const uint32_t	next_page_no = btr_page_get_next(page);
 
 	ut_ad(mtr_memo_contains_flagged(
 		      mtr, dict_index_get_lock(cursor->index),
@@ -2787,7 +2769,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor at which to insert; when the
 				function returns, the cursor is positioned
 				on the predecessor of the inserted record */
-	ulint**		offsets,/*!< out: offsets on inserted record */
+	offset_t**	offsets,/*!< out: offsets on inserted record */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
@@ -2796,30 +2778,20 @@
 	buf_block_t*	block;
 	page_t*		page;
 	page_zip_des_t*	page_zip;
-	ulint		page_no;
-	byte		direction;
-	ulint		hint_page_no;
 	buf_block_t*	new_block;
 	page_t*		new_page;
 	page_zip_des_t*	new_page_zip;
 	rec_t*		split_rec;
 	buf_block_t*	left_block;
 	buf_block_t*	right_block;
-	buf_block_t*	insert_block;
 	page_cur_t*	page_cursor;
 	rec_t*		first_rec;
 	byte*		buf = 0; /* remove warning */
 	rec_t*		move_limit;
-	ibool		insert_will_fit;
-	ibool		insert_left;
 	ulint		n_iterations = 0;
-	rec_t*		rec;
 	ulint		n_uniq;
-	dict_index_t*	index;
-
-	index = btr_cur_get_index(cursor);
 
-	if (dict_index_is_spatial(index)) {
+	if (cursor->index->is_spatial()) {
 		/* Split rtree page and update parent */
 		return(rtr_page_split_and_insert(flags, cursor, offsets, heap,
 						 tuple, n_ext, mtr));
@@ -2850,23 +2822,19 @@
 	ut_ad(!page_is_empty(page));
 
 	/* try to insert to the next page if possible before split */
-	rec = btr_insert_into_right_sibling(
-		flags, cursor, offsets, *heap, tuple, n_ext, mtr);
-
-	if (rec != NULL) {
+	if (rec_t* rec = btr_insert_into_right_sibling(
+		    flags, cursor, offsets, *heap, tuple, n_ext, mtr)) {
 		return(rec);
 	}
 
-	page_no = block->page.id.page_no();
-
 	/* 1. Decide the split record; split_rec == NULL means that the
 	tuple to be inserted should be the first record on the upper
 	half-page */
-	insert_left = FALSE;
+	bool insert_left = false;
+	ulint hint_page_no = block->page.id.page_no() + 1;
+	byte direction = FSP_UP;
 
-	if (tuple != NULL && n_iterations > 0) {
-		direction = FSP_UP;
-		hint_page_no = page_no + 1;
+	if (tuple && n_iterations > 0) {
 		split_rec = btr_page_get_split_rec(cursor, tuple, n_ext);
 
 		if (split_rec == NULL) {
@@ -2874,17 +2842,10 @@
 				cursor, tuple, offsets, n_uniq, heap);
 		}
 	} else if (btr_page_get_split_rec_to_right(cursor, &split_rec)) {
-		direction = FSP_UP;
-		hint_page_no = page_no + 1;
-
-	} else if (btr_page_get_split_rec_to_left(cursor, &split_rec)) {
+	} else if ((split_rec = btr_page_get_split_rec_to_left(cursor))) {
 		direction = FSP_DOWN;
-		hint_page_no = page_no - 1;
-		ut_ad(split_rec);
+		hint_page_no -= 2;
 	} else {
-		direction = FSP_UP;
-		hint_page_no = page_no + 1;
-
 		/* If there is only one record in the index page, we
 		can't split the node in the middle by default. We need
 		to determine whether the new record will be inserted
@@ -2909,7 +2870,7 @@
 	new_block = btr_page_alloc(cursor->index, hint_page_no, direction,
 				   btr_page_get_level(page), mtr, mtr);
 
-	if (new_block == NULL && os_has_said_disk_full) {
+	if (!new_block) {
 		return(NULL);
 	}
 
@@ -2934,12 +2895,8 @@
 		*offsets = rec_get_offsets(split_rec, cursor->index, *offsets,
 					   page_is_leaf(page), n_uniq, heap);
 
-		if (tuple != NULL) {
-			insert_left = cmp_dtuple_rec(
-				tuple, split_rec, *offsets) < 0;
-		} else {
-			insert_left = 1;
-		}
+		insert_left = !tuple
+			|| cmp_dtuple_rec(tuple, split_rec, *offsets) < 0;
 
 		if (!insert_left && new_page_zip && n_iterations > 0) {
 			/* If a compressed page has already been split,
@@ -2974,10 +2931,10 @@
 	on the appropriate half-page, we may release the tree x-latch.
 	We can then move the records after releasing the tree latch,
 	thus reducing the tree latch contention. */
+	bool insert_will_fit;
 	if (tuple == NULL) {
-		insert_will_fit = 1;
-	}
-	else if (split_rec) {
+		insert_will_fit = true;
+	} else if (split_rec) {
 		insert_will_fit = !new_page_zip
 			&& btr_page_insert_fits(cursor, split_rec,
 						offsets, tuple, n_ext, heap);
@@ -3074,8 +3031,6 @@
 			/* Update the lock table and possible hash index. */
 			lock_move_rec_list_end(new_block, block, move_limit);
 
-			ut_ad(!dict_index_is_spatial(index));
-
 			btr_search_move_or_delete_hash_entries(
 				new_block, block);
 
@@ -3107,18 +3062,15 @@
 
 	/* 6. The split and the tree modification is now completed. Decide the
 	page where the tuple should be inserted */
+	rec_t* rec;
+	buf_block_t* const insert_block = insert_left
+		? left_block : right_block;
 
-	if (tuple == NULL) {
+	if (UNIV_UNLIKELY(!tuple)) {
 		rec = NULL;
 		goto func_exit;
 	}
 
-	if (insert_left) {
-		insert_block = left_block;
-	} else {
-		insert_block = right_block;
-	}
-
 	/* 7. Reposition the cursor for insert and try insertion */
 	page_cursor = btr_cur_get_page_cur(cursor);
 
@@ -3195,9 +3147,7 @@
 	ut_ad(page_validate(buf_block_get_frame(left_block), cursor->index));
 	ut_ad(page_validate(buf_block_get_frame(right_block), cursor->index));
 
-	if (tuple == NULL) {
-		ut_ad(rec == NULL);
-	}
+	ut_ad(tuple || !rec);
 	ut_ad(!rec || rec_offs_validate(rec, cursor->index, *offsets));
 	return(rec);
 }
@@ -3222,8 +3172,8 @@
 	ut_ad(space == page_get_space_id(page));
 	/* Get the previous and next page numbers of page */
 
-	const ulint	prev_page_no = btr_page_get_prev(page, mtr);
-	const ulint	next_page_no = btr_page_get_next(page, mtr);
+	const uint32_t	prev_page_no = btr_page_get_prev(page);
+	const uint32_t	next_page_no = btr_page_get_next(page);
 
 	/* Update page links of the level */
 
@@ -3236,8 +3186,8 @@
 			= buf_block_get_frame(prev_block);
 #ifdef UNIV_BTR_DEBUG
 		ut_a(page_is_comp(prev_page) == page_is_comp(page));
-		ut_a(btr_page_get_next(prev_page, mtr)
-		     == page_get_page_no(page));
+		ut_a(!memcmp(prev_page + FIL_PAGE_NEXT, page + FIL_PAGE_OFFSET,
+			     4));
 #endif /* UNIV_BTR_DEBUG */
 
 		btr_page_set_next(prev_page,
@@ -3255,8 +3205,8 @@
 			= buf_block_get_frame(next_block);
 #ifdef UNIV_BTR_DEBUG
 		ut_a(page_is_comp(next_page) == page_is_comp(page));
-		ut_a(btr_page_get_prev(next_page, mtr)
-		     == page_get_page_no(page));
+		ut_a(!memcmp(next_page + FIL_PAGE_PREV, page + FIL_PAGE_OFFSET,
+			     4));
 #endif /* UNIV_BTR_DEBUG */
 
 		btr_page_set_prev(next_page,
@@ -3314,25 +3264,22 @@
 	return(ptr + 2);
 }
 
-/****************************************************************//**
-Sets a record as the predefined minimum record. */
-void
-btr_set_min_rec_mark(
-/*=================*/
-	rec_t*	rec,	/*!< in: record */
-	mtr_t*	mtr)	/*!< in: mtr */
+/** Sets a record as the predefined minimum record. */
+void btr_set_min_rec_mark(rec_t* rec, mtr_t* mtr)
 {
-	ulint	info_bits;
+	const bool comp = page_rec_is_comp(rec);
 
-	if (page_rec_is_comp(rec)) {
-		info_bits = rec_get_info_bits(rec, TRUE);
+	ut_ad(rec == page_rec_get_next_const(page_get_infimum_rec(
+						     page_align(rec))));
+	ut_ad(!(rec_get_info_bits(page_rec_get_next(rec), comp)
+		& REC_INFO_MIN_REC_FLAG));
 
+	size_t info_bits = rec_get_info_bits(rec, comp);
+	if (comp) {
 		rec_set_info_bits_new(rec, info_bits | REC_INFO_MIN_REC_FLAG);
 
 		btr_set_min_rec_mark_log(rec, MLOG_COMP_REC_MIN_MARK, mtr);
 	} else {
-		info_bits = rec_get_info_bits(rec, FALSE);
-
 		rec_set_info_bits_old(rec, info_bits | REC_INFO_MIN_REC_FLAG);
 
 		btr_set_min_rec_mark_log(rec, MLOG_REC_MIN_MARK, mtr);
@@ -3374,7 +3321,7 @@
 
 	{
 		btr_cur_t	cursor;
-		ulint*		offsets	= NULL;
+		offset_t*	offsets	= NULL;
 		mem_heap_t*	heap	= mem_heap_create(
 			sizeof(*offsets)
 			* (REC_OFFS_HEADER_SIZE + 1 + 1
@@ -3571,7 +3518,7 @@
 	page_t*		page;
 	btr_cur_t	father_cursor;
 	mem_heap_t*	heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 	ulint		nth_rec = 0; /* remove bogus warning */
 	bool		mbr_changed = false;
 #ifdef UNIV_DEBUG
@@ -3602,8 +3549,8 @@
 
 	MONITOR_INC(MONITOR_INDEX_MERGE_ATTEMPTS);
 
-	left_page_no = btr_page_get_prev(page, mtr);
-	right_page_no = btr_page_get_next(page, mtr);
+	left_page_no = btr_page_get_prev(page);
+	right_page_no = btr_page_get_next(page);
 
 #ifdef UNIV_DEBUG
 	if (!page_is_leaf(page) && left_page_no == FIL_NULL) {
@@ -3677,10 +3624,10 @@
 
 #ifdef UNIV_BTR_DEBUG
 	if (is_left) {
-		ut_a(btr_page_get_next(merge_page, mtr)
+		ut_a(btr_page_get_next(merge_page)
 		     == block->page.id.page_no());
 	} else {
-		ut_a(btr_page_get_prev(merge_page, mtr)
+		ut_a(btr_page_get_prev(merge_page)
 		     == block->page.id.page_no());
 	}
 #endif /* UNIV_BTR_DEBUG */
@@ -3714,7 +3661,7 @@
 	if (is_left) {
 		btr_cur_t	cursor2;
 		rtr_mbr_t	new_mbr;
-		ulint*		offsets2 = NULL;
+		offset_t*	offsets2 = NULL;
 
 		/* For rtree, we need to update father's mbr. */
 		if (dict_index_is_spatial(index)) {
@@ -3910,7 +3857,7 @@
 
 		/* For rtree, we need to update father's mbr. */
 		if (dict_index_is_spatial(index)) {
-			ulint*	offsets2;
+			offset_t* offsets2;
 			ulint	rec_info;
 
 			offsets2 = rec_get_offsets(
@@ -4198,8 +4145,8 @@
 
 	/* Decide the page which will inherit the locks */
 
-	left_page_no = btr_page_get_prev(buf_block_get_frame(block), mtr);
-	right_page_no = btr_page_get_next(buf_block_get_frame(block), mtr);
+	left_page_no = btr_page_get_prev(buf_block_get_frame(block));
+	right_page_no = btr_page_get_next(buf_block_get_frame(block));
 
 	const page_size_t	page_size(index->table->space->flags);
 	ut_d(bool parent_is_different = false);
@@ -4210,7 +4157,7 @@
 
 		merge_page = buf_block_get_frame(merge_block);
 #ifdef UNIV_BTR_DEBUG
-		ut_a(btr_page_get_next(merge_page, mtr)
+		ut_a(btr_page_get_next(merge_page)
 		     == block->page.id.page_no());
 #endif /* UNIV_BTR_DEBUG */
 		ut_d(parent_is_different =
@@ -4226,7 +4173,7 @@
 
 		merge_page = buf_block_get_frame(merge_block);
 #ifdef UNIV_BTR_DEBUG
-		ut_a(btr_page_get_prev(merge_page, mtr)
+		ut_a(btr_page_get_prev(merge_page)
 		     == block->page.id.page_no());
 #endif /* UNIV_BTR_DEBUG */
 		ut_d(parent_is_different = page_rec_is_supremum(
@@ -4357,7 +4304,7 @@
 	ulint		width,	/*!< in: print this many entries from start
 				and end */
 	mem_heap_t**	heap,	/*!< in/out: heap for rec_get_offsets() */
-	ulint**		offsets,/*!< in/out: buffer for rec_get_offsets() */
+	offset_t**	offsets,/*!< in/out: buffer for rec_get_offsets() */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
 	const page_t*	page	= buf_block_get_frame(block);
@@ -4421,8 +4368,8 @@
 	mtr_t		mtr;
 	buf_block_t*	root;
 	mem_heap_t*	heap	= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets	= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets	= offsets_;
 	rec_offs_init(offsets_);
 
 	fputs("--------------------------\n"
@@ -4456,7 +4403,7 @@
 {
 	mem_heap_t*	heap;
 	dtuple_t*	tuple;
-	ulint*		offsets;
+	offset_t*	offsets;
 	btr_cur_t	cursor;
 	page_t*		page = buf_block_get_frame(block);
 
@@ -4536,8 +4483,8 @@
 	ulint		len;
 	const page_t*	page;
 	mem_heap_t*	heap	= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets	= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets	= offsets_;
 	rec_offs_init(offsets_);
 
 	page = page_align(rec);
@@ -4769,8 +4716,8 @@
 	bool		ret	= true;
 	mtr_t		mtr;
 	mem_heap_t*	heap	= mem_heap_create(256);
-	ulint*		offsets	= NULL;
-	ulint*		offsets2= NULL;
+	offset_t*	offsets	= NULL;
+	offset_t*	offsets2= NULL;
 #ifdef UNIV_ZIP_DEBUG
 	page_zip_des_t*	page_zip;
 #endif /* UNIV_ZIP_DEBUG */
@@ -4780,13 +4727,13 @@
 	ulint		parent_right_page_no = FIL_NULL;
 	bool		rightmost_child = false;
 
-	mtr_start(&mtr);
+	mtr.start();
 
 	if (!srv_read_only_mode) {
 		if (lockout) {
-			mtr_x_lock(dict_index_get_lock(index), &mtr);
+			mtr_x_lock_index(index, &mtr);
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 		}
 	}
 
@@ -4846,7 +4793,7 @@
 		does not use such scan for any of its DML or query
 		operations  */
 		if (dict_index_is_spatial(index)) {
-			left_page_no = btr_page_get_prev(page, &mtr);
+			left_page_no = btr_page_get_prev(page);
 
 			while (left_page_no != FIL_NULL) {
 				/* To obey latch order of tree blocks,
@@ -4862,7 +4809,7 @@
 					table_page_size,
 					RW_SX_LATCH, index, &mtr);
 				page = buf_block_get_frame(block);
-				left_page_no = btr_page_get_prev(page, &mtr);
+				left_page_no = btr_page_get_prev(page);
 			}
 		}
 	}
@@ -4875,9 +4822,9 @@
 	offsets = offsets2 = NULL;
 	if (!srv_read_only_mode) {
 		if (lockout) {
-			mtr_x_lock(dict_index_get_lock(index), &mtr);
+			mtr_x_lock_index(index, &mtr);
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 		}
 	}
 
@@ -4917,8 +4864,8 @@
 
 	ut_a(btr_page_get_level(page) == level);
 
-	right_page_no = btr_page_get_next(page, &mtr);
-	left_page_no = btr_page_get_prev(page, &mtr);
+	right_page_no = btr_page_get_next(page);
+	left_page_no = btr_page_get_prev(page);
 
 	ut_a(!page_is_empty(page)
 	     || (level == 0
@@ -4935,9 +4882,7 @@
 
 		right_page = buf_block_get_frame(right_block);
 
-		if (btr_page_get_prev(right_page, &mtr)
-		    != page_get_page_no(page)) {
-
+		if (btr_page_get_prev(right_page) != page_get_page_no(page)) {
 			btr_validate_report2(index, level, block, right_block);
 			fputs("InnoDB: broken FIL_PAGE_NEXT"
 			      " or FIL_PAGE_PREV links\n", stderr);
@@ -5018,7 +4963,7 @@
 		node_ptr = btr_cur_get_rec(&node_cur);
 
 		parent_page_no = page_get_page_no(father_page);
-		parent_right_page_no = btr_page_get_next(father_page, &mtr);
+		parent_right_page_no = btr_page_get_next(father_page);
 		rightmost_child = page_rec_is_supremum(
 					page_rec_get_next(node_ptr));
 
@@ -5159,7 +5104,7 @@
 				}
 
 				if (page_get_page_no(right_father_page)
-				    != btr_page_get_next(father_page, &mtr)) {
+				    != btr_page_get_next(father_page)) {
 
 					ret = false;
 					fputs("InnoDB: node pointer 3 to"
@@ -5177,13 +5122,13 @@
 	/* Commit the mini-transaction to release the latch on 'page'.
 	Re-acquire the latch on right_page, which will become 'page'
 	on the next loop.  The page has already been checked. */
-	mtr_commit(&mtr);
+	mtr.commit();
 
 	if (trx_is_interrupted(trx)) {
 		/* On interrupt, return the current status. */
 	} else if (right_page_no != FIL_NULL) {
 
-		mtr_start(&mtr);
+		mtr.start();
 
 		if (!lockout) {
 			if (rightmost_child) {
@@ -5233,9 +5178,9 @@
 	mtr_t	mtr;
 	bool	ok = true;
 
-	mtr_start(&mtr);
+	mtr.start();
 
-	mtr_x_lock(dict_index_get_lock(index), &mtr);
+	mtr_x_lock_index(index, &mtr);
 
 	page_t*	root = btr_root_get(index, &mtr);
 	ulint	n = btr_page_get_level(root);
@@ -5255,7 +5200,7 @@
 		}
 	}
 
-	mtr_commit(&mtr);
+	mtr.commit();
 
 	return(ok);
 }
@@ -5291,9 +5236,9 @@
 
 	if (!srv_read_only_mode) {
 		if (lockout) {
-			mtr_x_lock(dict_index_get_lock(index), &mtr);
+			mtr_x_lock_index(index, &mtr);
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 		}
 	}
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0bulk.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0bulk.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0bulk.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0bulk.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
 
-Copyright (c) 2014, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2014, 2019, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2017, 2019, MariaDB Corporation.
 
 This program is free software; you can redistribute it and/or modify it under
@@ -51,7 +51,7 @@
 	m_heap = mem_heap_create(1000);
 
 	m_mtr.start();
-	mtr_x_lock(&m_index->lock, &m_mtr);
+
 	if (m_flush_observer) {
 		m_mtr.set_log_mode(MTR_LOG_NO_REDO);
 		m_mtr.set_flush_observer(m_flush_observer);
@@ -175,7 +175,7 @@
 void
 PageBulk::insert(
 	const rec_t*		rec,
-	ulint*			offsets)
+	offset_t*		offsets)
 {
 	ulint		rec_size;
 
@@ -188,7 +188,7 @@
 	/* Check whether records are in order. */
 	if (!page_rec_is_infimum(m_cur_rec)) {
 		rec_t*	old_rec = m_cur_rec;
-		ulint*	old_offsets = rec_get_offsets(
+		offset_t* old_offsets = rec_get_offsets(
 			old_rec, m_index, NULL,	is_leaf,
 			ULINT_UNDEFINED, &m_heap);
 
@@ -401,7 +401,7 @@
 PageBulk::getSplitRec()
 {
 	rec_t*		rec;
-	ulint*		offsets;
+	offset_t*	offsets;
 	ulint		total_used_size;
 	ulint		total_recs_size;
 	ulint		n_recs;
@@ -447,7 +447,7 @@
 {
 
 	rec_t*		rec = split_rec;
-	ulint*		offsets = NULL;
+	offset_t*	offsets = NULL;
 
 	ut_ad(m_rec_no == 0);
 	ut_ad(page_rec_is_user_rec(rec));
@@ -493,7 +493,7 @@
 	ut_ad(n > 0);
 
 	/* Set last record's next in page */
-	ulint*		offsets = NULL;
+	offset_t*	offsets = NULL;
 	rec = page_rec_get_prev(split_rec);
 	offsets = rec_get_offsets(rec, m_index, offsets,
 				  page_rec_is_leaf(split_rec),
@@ -602,29 +602,27 @@
 dberr_t
 PageBulk::storeExt(
 	const big_rec_t*	big_rec,
-	ulint*			offsets)
+	offset_t*		offsets)
 {
 	/* Note: not all fileds are initialized in btr_pcur. */
 	btr_pcur_t	btr_pcur;
 	btr_pcur.pos_state = BTR_PCUR_IS_POSITIONED;
 	btr_pcur.latch_mode = BTR_MODIFY_LEAF;
 	btr_pcur.btr_cur.index = m_index;
-
-	page_cur_t*	page_cur = &btr_pcur.btr_cur.page_cur;
-	page_cur->index = m_index;
-	page_cur->rec = m_cur_rec;
-	page_cur->offsets = offsets;
-	page_cur->block = m_block;
+	btr_pcur.btr_cur.page_cur.index = m_index;
+	btr_pcur.btr_cur.page_cur.rec = m_cur_rec;
+	btr_pcur.btr_cur.page_cur.offsets = offsets;
+	btr_pcur.btr_cur.page_cur.block = m_block;
 
 	dberr_t	err = btr_store_big_rec_extern_fields(
 		&btr_pcur, offsets, big_rec, &m_mtr, BTR_STORE_INSERT_BULK);
 
-	ut_ad(page_offset(m_cur_rec) == page_offset(page_cur->rec));
-
 	/* Reset m_block and m_cur_rec from page cursor, because
-	block may be changed during blob insert. */
-	m_block = page_cur->block;
-	m_cur_rec = page_cur->rec;
+	block may be changed during blob insert. (FIXME: Can it really?) */
+	ut_ad(m_block == btr_pcur.btr_cur.page_cur.block);
+
+	m_block = btr_pcur.btr_cur.page_cur.block;
+	m_cur_rec = btr_pcur.btr_cur.page_cur.rec;
 	m_page = buf_block_get_frame(m_block);
 
 	return(err);
@@ -651,7 +649,7 @@
 PageBulk::latch()
 {
 	m_mtr.start();
-	mtr_x_lock(&m_index->lock, &m_mtr);
+
 	if (m_flush_observer) {
 		m_mtr.set_log_mode(MTR_LOG_NO_REDO);
 		m_mtr.set_flush_observer(m_flush_observer);
@@ -756,6 +754,10 @@
 		page_bulk->setNext(FIL_NULL);
 	}
 
+	ut_ad(!rw_lock_own_flagged(&m_index->lock,
+				   RW_LOCK_FLAG_X | RW_LOCK_FLAG_SX
+				   | RW_LOCK_FLAG_S));
+
 	/* Compress page if it's a compressed table. */
 	if (page_bulk->getPageZip() != NULL && !page_bulk->compress()) {
 		return(pageSplit(page_bulk, next_page_bulk));
@@ -860,7 +862,7 @@
 	ulint		rec_size = rec_get_converted_size(m_index, tuple, n_ext);
 	big_rec_t*	big_rec = NULL;
 	rec_t*		rec = NULL;
-	ulint*		offsets = NULL;
+	offset_t*	offsets = NULL;
 
 	if (page_bulk->needExt(tuple, rec_size)) {
 		/* The record is so big that we have to store some fields
@@ -1012,7 +1014,7 @@
 
 		mtr.start();
 		m_index->set_modified(mtr);
-		mtr_x_lock(&m_index->lock, &mtr);
+		mtr_x_lock_index(m_index, &mtr);
 
 		ut_ad(last_page_no != FIL_NULL);
 		last_block = btr_block_get(
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0cur.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0cur.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0cur.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0cur.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,9 +1,9 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2018, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2008, Google Inc.
 Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, MariaDB Corporation.
 
 Portions of this file contain modifications contributed and copyrighted by
 Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -158,7 +158,7 @@
 				part will be updated, or NULL */
 	rec_t*		rec,	/*!< in/out: record in a clustered index */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	mtr_t*		mtr);	/*!< in: mtr, or NULL if not logged */
 /*******************************************************************//**
 Adds path information to the cursor for the current page, for which
@@ -183,7 +183,7 @@
 	rec_t*		rec,	/*!< in: record */
 	page_zip_des_t*	page_zip,/*!< in: compressed page whose uncompressed
 				part will be updated, or NULL */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const upd_t*	update,	/*!< in: update vector */
 	bool		rollback,/*!< in: performing rollback? */
 	mtr_t*		mtr);	/*!< in: mini-transaction handle which contains
@@ -197,7 +197,7 @@
 	dict_index_t*	index,	/*!< in: index of the data, the index
 				tree MUST be X-latched */
 	rec_t*		rec,	/*!< in: record */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	page_zip_des_t*	page_zip,/*!< in: compressed page whose uncompressed
 				part will be updated, or NULL */
 	bool		rollback,/*!< in: performing rollback? */
@@ -269,7 +269,7 @@
 			      dict_index_get_lock(cursor->index),
 			      MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
 		/* x-latch also siblings from left to right */
-		left_page_no = btr_page_get_prev(page, mtr);
+		left_page_no = btr_page_get_prev(page);
 		mode = latch_mode;
 
 		if (left_page_no != FIL_NULL) {
@@ -305,10 +305,9 @@
 		/* Sanity check only after both the blocks are latched. */
 		if (latch_leaves.blocks[0] != NULL) {
 			ut_a(page_is_comp(latch_leaves.blocks[0]->frame)
-				== page_is_comp(page));
-			ut_a(btr_page_get_next(
-				latch_leaves.blocks[0]->frame, mtr)
-				== page_get_page_no(page));
+			     == page_is_comp(page));
+			ut_a(btr_page_get_next(latch_leaves.blocks[0]->frame)
+			     == page_get_page_no(page));
 		}
 		ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
 #endif /* UNIV_BTR_DEBUG */
@@ -318,7 +317,7 @@
 				= get_block;
 		}
 
-		right_page_no = btr_page_get_next(page, mtr);
+		right_page_no = btr_page_get_next(page);
 
 		if (right_page_no != FIL_NULL) {
 			if (spatial) {
@@ -334,7 +333,7 @@
 #ifdef UNIV_BTR_DEBUG
 			ut_a(page_is_comp(get_block->frame)
 			     == page_is_comp(page));
-			ut_a(btr_page_get_prev(get_block->frame, mtr)
+			ut_a(btr_page_get_prev(get_block->frame)
 			     == page_get_page_no(page));
 #endif /* UNIV_BTR_DEBUG */
 			if (spatial) {
@@ -350,7 +349,7 @@
 		mode = latch_mode == BTR_SEARCH_PREV ? RW_S_LATCH : RW_X_LATCH;
 		/* latch also left sibling */
 		rw_lock_s_lock(&block->lock);
-		left_page_no = btr_page_get_prev(page, mtr);
+		left_page_no = btr_page_get_prev(page);
 		rw_lock_s_unlock(&block->lock);
 
 		if (left_page_no != FIL_NULL) {
@@ -363,7 +362,7 @@
 #ifdef UNIV_BTR_DEBUG
 			ut_a(page_is_comp(get_block->frame)
 			     == page_is_comp(page));
-			ut_a(btr_page_get_next(get_block->frame, mtr)
+			ut_a(btr_page_get_next(get_block->frame)
 			     == page_get_page_no(page));
 #endif /* UNIV_BTR_DEBUG */
 		}
@@ -477,8 +476,8 @@
 	from the cache. */
 
 	mem_heap_t* heap = NULL;
-	ulint* offsets = rec_get_offsets(rec, index, NULL, true,
-					 ULINT_UNDEFINED, &heap);
+	offset_t* offsets = rec_get_offsets(rec, index, NULL, true,
+					    ULINT_UNDEFINED, &heap);
 	if (rec_offs_any_default(offsets)) {
 inconsistent:
 		mem_heap_free(heap);
@@ -666,7 +665,7 @@
 			goto unpin_failed;
 		}
 		left_page_no = btr_page_get_prev(
-			buf_block_get_frame(block), mtr);
+			buf_block_get_frame(block));
 		rw_lock_s_unlock(&block->lock);
 
 		if (left_page_no != FIL_NULL) {
@@ -682,7 +681,7 @@
 
 		if (buf_page_optimistic_get(mode, block, modify_clock,
 					    file, line, mtr)) {
-			if (btr_page_get_prev(buf_block_get_frame(block), mtr)
+			if (btr_page_get_prev(buf_block_get_frame(block))
 			    == left_page_no) {
 				buf_block_buf_fix_dec(block);
 				*latch_mode = mode;
@@ -805,46 +804,66 @@
 	const ulint n_recs = page_get_n_recs(page);
 
 	if (lock_intention <= BTR_INTENTION_BOTH) {
-		ulint	margin;
+		compile_time_assert(BTR_INTENTION_DELETE < BTR_INTENTION_BOTH);
+		compile_time_assert(BTR_INTENTION_BOTH < BTR_INTENTION_INSERT);
 
-		/* check delete will cause. (BTR_INTENTION_BOTH
-		or BTR_INTENTION_DELETE) */
-		/* first, 2nd, 2nd-last and last records are 4 records */
-		if (n_recs < 5) {
-			return(true);
+		if (!page_has_siblings(page)) {
+			return true;
 		}
 
-		/* is first, 2nd or last record */
-		if (page_rec_is_first(rec, page)
-		    || (page_has_next(page)
-			&& (page_rec_is_last(rec, page)
-			    || page_rec_is_second_last(rec, page)))
-		    || (page_has_prev(page)
-			&& page_rec_is_second(rec, page))) {
-			return(true);
-		}
+		ulint margin = rec_size;
 
 		if (lock_intention == BTR_INTENTION_BOTH) {
+			ulint	level = btr_page_get_level(page);
+
+			/* This value is the worst expectation for the node_ptr
+			records to be deleted from this page. It is used to
+			expect whether the cursor position can be the left_most
+			record in this page or not. */
+			ulint   max_nodes_deleted = 0;
+
+			/* By modifying tree operations from the under of this
+			level, logically (2 ^ (level - 1)) opportunities to
+			deleting records in maximum even unreally rare case. */
+			if (level > 7) {
+				/* TODO: adjust this practical limit. */
+				max_nodes_deleted = 64;
+			} else if (level > 0) {
+				max_nodes_deleted = (ulint)1 << (level - 1);
+			}
+			/* check delete will cause. (BTR_INTENTION_BOTH
+			or BTR_INTENTION_DELETE) */
+			if (n_recs <= max_nodes_deleted * 2
+			    || page_rec_is_first(rec, page)) {
+				/* The cursor record can be the left most record
+				in this page. */
+				return true;
+			}
+
+			if (page_has_prev(page)
+			    && page_rec_distance_is_at_most(
+				    page_get_infimum_rec(page), rec,
+				    max_nodes_deleted)) {
+				return true;
+			}
+
+			if (page_has_next(page)
+			    && page_rec_distance_is_at_most(
+				    rec, page_get_supremum_rec(page),
+				    max_nodes_deleted)) {
+				return true;
+			}
+
 			/* Delete at leftmost record in a page causes delete
 			& insert at its parent page. After that, the delete
 			might cause btr_compress() and delete record at its
-			parent page. Thus we should consider max 2 deletes. */
-
-			margin = rec_size * 2;
-		} else {
-			ut_ad(lock_intention == BTR_INTENTION_DELETE);
-
-			margin = rec_size;
+			parent page. Thus we should consider max deletes. */
+			margin *= max_nodes_deleted;
 		}
-		/* NOTE: call mach_read_from_4() directly to avoid assertion
-		failure. It is safe because we already have SX latch of the
-		index tree */
+
+		/* Safe because we already have SX latch of the index tree */
 		if (page_get_data_size(page)
-			< margin + BTR_CUR_PAGE_COMPRESS_LIMIT(index)
-		    || (mach_read_from_4(page + FIL_PAGE_NEXT)
-				== FIL_NULL
-			&& mach_read_from_4(page + FIL_PAGE_PREV)
-				== FIL_NULL)) {
+		    < margin + BTR_CUR_PAGE_COMPRESS_LIMIT(index)) {
 			return(true);
 		}
 	}
@@ -1143,10 +1162,10 @@
 	btr_search_t*	info;
 #endif /* BTR_CUR_ADAPT */
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
-	ulint		offsets2_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets2	= offsets2_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
+	offset_t	offsets2_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets2	= offsets2_;
 	rec_offs_init(offsets_);
 	rec_offs_init(offsets2_);
 	/* Currently, PAGE_CUR_LE is the only search mode used for searches
@@ -1317,16 +1336,16 @@
 		if (lock_intention == BTR_INTENTION_DELETE
 		    && trx_sys.history_size() > BTR_CUR_FINE_HISTORY_LENGTH
 			&& buf_get_n_pending_read_ios()) {
-			mtr_x_lock(dict_index_get_lock(index), mtr);
-		} else if (dict_index_is_spatial(index)
+x_latch_index:
+			mtr_x_lock_index(index, mtr);
+		} else if (index->is_spatial()
 			   && lock_intention <= BTR_INTENTION_BOTH) {
 			/* X lock the if there is possibility of
 			pessimistic delete on spatial index. As we could
 			lock upward for the tree */
-
-			mtr_x_lock(dict_index_get_lock(index), mtr);
+			goto x_latch_index;
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), mtr);
+			mtr_sx_lock_index(index, mtr);
 		}
 		upper_rw_latch = RW_X_LATCH;
 		break;
@@ -1358,10 +1377,10 @@
 				BTR_ALREADY_S_LATCHED */
 				ut_ad(latch_mode != BTR_SEARCH_TREE);
 
-				mtr_s_lock(dict_index_get_lock(index), mtr);
+				mtr_s_lock_index(index, mtr);
 			} else {
 				/* BTR_MODIFY_EXTERNAL needs to be excluded */
-				mtr_sx_lock(dict_index_get_lock(index), mtr);
+				mtr_sx_lock_index(index, mtr);
 			}
 			upper_rw_latch = RW_S_LATCH;
 		} else {
@@ -1560,8 +1579,7 @@
 		rw_latch = upper_rw_latch;
 
 		rw_lock_s_lock(&block->lock);
-		left_page_no = btr_page_get_prev(
-			buf_block_get_frame(block), mtr);
+		left_page_no = btr_page_get_prev(buf_block_get_frame(block));
 		rw_lock_s_unlock(&block->lock);
 
 		if (left_page_no != FIL_NULL) {
@@ -2027,9 +2045,9 @@
 				offsets2 = rec_get_offsets(
 					first_rec, index, offsets2,
 					false, ULINT_UNDEFINED, &heap);
-				cmp_rec_rec_with_match(node_ptr, first_rec,
-					offsets, offsets2, index, FALSE,
-					&matched_fields);
+				cmp_rec_rec(node_ptr, first_rec,
+					    offsets, offsets2, index, false,
+					    &matched_fields);
 
 				if (matched_fields
 				    >= rec_offs_n_fields(offsets) - 1) {
@@ -2045,10 +2063,10 @@
 					offsets2 = rec_get_offsets(
 						last_rec, index, offsets2,
 						false, ULINT_UNDEFINED, &heap);
-					cmp_rec_rec_with_match(
+					cmp_rec_rec(
 						node_ptr, last_rec,
 						offsets, offsets2, index,
-						FALSE, &matched_fields);
+						false, &matched_fields);
 					if (matched_fields
 					    >= rec_offs_n_fields(offsets) - 1) {
 						detected_same_key_root = true;
@@ -2408,8 +2426,8 @@
 	ulint		n_blocks = 0;
 	ulint		n_releases = 0;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	dberr_t		err = DB_SUCCESS;
 
 	rec_offs_init(offsets_);
@@ -2452,9 +2470,9 @@
 		if (lock_intention == BTR_INTENTION_DELETE
 		    && trx_sys.history_size() > BTR_CUR_FINE_HISTORY_LENGTH
 		    && buf_get_n_pending_read_ios()) {
-			mtr_x_lock(dict_index_get_lock(index), mtr);
+			mtr_x_lock_index(index, mtr);
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), mtr);
+			mtr_sx_lock_index(index, mtr);
 		}
 		upper_rw_latch = RW_X_LATCH;
 		break;
@@ -2470,7 +2488,7 @@
 				BTR_ALREADY_S_LATCHED */
 				ut_ad(latch_mode != BTR_SEARCH_TREE);
 
-				mtr_s_lock(dict_index_get_lock(index), mtr);
+				mtr_s_lock_index(index, mtr);
 			}
 			upper_rw_latch = RW_S_LATCH;
 		} else {
@@ -2777,11 +2795,11 @@
 	ulint		n_blocks = 0;
 	ulint		n_releases = 0;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
-	ut_ad(!dict_index_is_spatial(index));
+	ut_ad(!index->is_spatial());
 
 	lock_intention = btr_cur_get_and_clear_intention(&latch_mode);
 
@@ -2797,9 +2815,9 @@
 		if (lock_intention == BTR_INTENTION_DELETE
 		    && trx_sys.history_size() > BTR_CUR_FINE_HISTORY_LENGTH
 		    && buf_get_n_pending_read_ios()) {
-			mtr_x_lock(dict_index_get_lock(index), mtr);
+			mtr_x_lock_index(index, mtr);
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), mtr);
+			mtr_sx_lock_index(index, mtr);
 		}
 		upper_rw_latch = RW_X_LATCH;
 		break;
@@ -2815,7 +2833,7 @@
 		/* fall through */
 	default:
 		if (!srv_read_only_mode) {
-			mtr_s_lock(dict_index_get_lock(index), mtr);
+			mtr_s_lock_index(index, mtr);
 			upper_rw_latch = RW_S_LATCH;
 		} else {
 			upper_rw_latch = RW_NO_LATCH;
@@ -2881,7 +2899,7 @@
 				index->table->file_unreadable = true;
 			}
 
-			goto exit_loop;
+			break;
 		}
 
 		page = buf_block_get_frame(block);
@@ -3038,12 +3056,11 @@
 		n_blocks++;
 	}
 
- exit_loop:
 	if (UNIV_LIKELY_NULL(heap)) {
 		mem_heap_free(heap);
 	}
 
-	return(true);
+	return err == DB_SUCCESS;
 }
 
 /*==================== B-TREE INSERT =========================*/
@@ -3068,7 +3085,7 @@
 				cursor stays valid */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert; the size info need not
 				have been stored to tuple */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
 	mtr_t*		mtr)	/*!< in/out: mini-transaction */
@@ -3231,7 +3248,7 @@
 				specified */
 	btr_cur_t*	cursor,	/*!< in: cursor on page after which to insert;
 				cursor stays valid */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap */
 	dtuple_t*	entry,	/*!< in/out: entry to insert */
 	rec_t**		rec,	/*!< out: pointer to inserted record if
@@ -3362,7 +3379,7 @@
 	    && page_get_n_recs(page) >= 2
 	    && dict_index_get_space_reserve() + rec_size > max_size
 	    && (btr_page_get_split_rec_to_right(cursor, &dummy)
-		|| btr_page_get_split_rec_to_left(cursor, &dummy))) {
+		|| btr_page_get_split_rec_to_left(cursor))) {
 		goto fail;
 	}
 
@@ -3531,7 +3548,7 @@
 				insertion will certainly succeed */
 	btr_cur_t*	cursor,	/*!< in: cursor after which to insert;
 				cursor stays valid */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap
 				that can be emptied */
 	dtuple_t*	entry,	/*!< in/out: entry to insert */
@@ -3651,10 +3668,7 @@
 			}
 
 			if (!page_rec_is_infimum(btr_cur_get_rec(cursor))
-			    || btr_page_get_prev(
-				buf_block_get_frame(
-					btr_cur_get_block(cursor)), mtr)
-			       == FIL_NULL) {
+			    || !page_has_prev(btr_cur_get_page(cursor))) {
 				/* split and inserted need to call
 				lock_update_insert() always. */
 				inherit = true;
@@ -3672,8 +3686,8 @@
 		if (entry->info_bits & REC_INFO_MIN_REC_FLAG) {
 			ut_ad(entry->info_bits == REC_INFO_METADATA);
 			ut_ad(index->is_instant());
-			ut_ad((flags & ulint(~BTR_KEEP_IBUF_BITMAP))
-			      == BTR_NO_LOCKING_FLAG);
+			ut_ad(flags & BTR_NO_LOCKING_FLAG);
+			ut_ad(!(flags & BTR_CREATE_FLAG));
 		} else {
 			btr_search_update_hash_on_insert(
 				cursor, btr_get_search_latch(index));
@@ -3702,7 +3716,7 @@
 /*======================*/
 	ulint		flags,	/*!< in: undo logging and locking flags */
 	btr_cur_t*	cursor,	/*!< in: cursor on record to update */
-	const ulint*	offsets,/*!< in: rec_get_offsets() on cursor */
+	const offset_t*	offsets,/*!< in: rec_get_offsets() on cursor */
 	const upd_t*	update,	/*!< in: update vector */
 	ulint		cmpl_info,/*!< in: compiler info on secondary index
 				updates */
@@ -3833,7 +3847,7 @@
 	roll_ptr_t	roll_ptr;
 	ulint		rec_offset;
 	mem_heap_t*	heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 
 	if (end_ptr < ptr + 1) {
 
@@ -3918,7 +3932,7 @@
 	page_cur_t*	cursor,	/*!< in/out: B-tree page cursor */
 	dict_index_t*	index,	/*!< in: the index corresponding to cursor */
 #ifdef UNIV_DEBUG
-	ulint*		offsets,/*!< in/out: offsets of the cursor record */
+	offset_t*	offsets,/*!< in/out: offsets of the cursor record */
 #endif /* UNIV_DEBUG */
 	ulint		length,	/*!< in: size needed */
 	bool		create,	/*!< in: true=delete-and-insert,
@@ -4000,7 +4014,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor on the record to update;
 				cursor stays valid and positioned on the
 				same record */
-	ulint*		offsets,/*!< in/out: offsets on cursor->page_cur.rec */
+	offset_t*	offsets,/*!< in/out: offsets on cursor->page_cur.rec */
 	const upd_t*	update,	/*!< in: update vector */
 	ulint		cmpl_info,/*!< in: compiler info on secondary index
 				updates */
@@ -4221,7 +4235,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor on the record to update;
 				cursor stays valid and positioned on the
 				same record */
-	ulint**		offsets,/*!< out: offsets on cursor->page_cur.rec */
+	offset_t**	offsets,/*!< out: offsets on cursor->page_cur.rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to NULL or memory heap */
 	const upd_t*	update,	/*!< in: update vector; this must also
 				contain trx id and roll ptr fields */
@@ -4248,7 +4262,6 @@
 	dtuple_t*	new_entry;
 	roll_ptr_t	roll_ptr;
 	ulint		i;
-	ulint		n_ext;
 
 	block = btr_cur_get_block(cursor);
 	page = buf_block_get_frame(block);
@@ -4325,10 +4338,8 @@
 			+ DTUPLE_EST_ALLOC(rec_offs_n_fields(*offsets)));
 	}
 
-	new_entry = row_rec_to_index_entry(rec, index, *offsets,
-					   &n_ext, *heap);
-	/* We checked above that there are no externally stored fields. */
-	ut_a(!n_ext);
+	new_entry = row_rec_to_index_entry(rec, index, *offsets, *heap);
+	ut_ad(!dtuple_get_n_ext(new_entry));
 
 	/* The page containing the clustered index record
 	corresponding to new_entry is latched in mtr.
@@ -4526,15 +4537,14 @@
 		return;
 	}
 
-	const ulint	prev_page_no = btr_page_get_prev(page, mtr);
+	const uint32_t	prev_page_no = btr_page_get_prev(page);
 
 	const page_id_t	page_id(block->page.id.space(), prev_page_no);
 
 	ut_ad(prev_page_no != FIL_NULL);
 	prev_block = buf_page_get_with_no_latch(page_id, block->page.size, mtr);
 #ifdef UNIV_BTR_DEBUG
-	ut_a(btr_page_get_next(prev_block->frame, mtr)
-	     == page_get_page_no(page));
+	ut_a(btr_page_get_next(prev_block->frame) == block->page.id.page_no());
 #endif /* UNIV_BTR_DEBUG */
 
 	/* We must already have an x-latch on prev_block! */
@@ -4560,7 +4570,7 @@
 	btr_cur_t*	cursor,	/*!< in/out: cursor on the record to update;
 				cursor may become invalid if *big_rec == NULL
 				|| !(flags & BTR_KEEP_POS_FLAG) */
-	ulint**		offsets,/*!< out: offsets on cursor->page_cur.rec */
+	offset_t**	offsets,/*!< out: offsets on cursor->page_cur.rec */
 	mem_heap_t**	offsets_heap,
 				/*!< in/out: pointer to memory heap
 				that can be emptied */
@@ -4593,7 +4603,6 @@
 	roll_ptr_t	roll_ptr;
 	ibool		was_first;
 	ulint		n_reserved	= 0;
-	ulint		n_ext;
 	ulint		max_ins_size	= 0;
 
 	*offsets = NULL;
@@ -4658,7 +4667,7 @@
 	ut_ad(rec_offs_validate(rec, index, *offsets));
 
 	dtuple_t*	new_entry = row_rec_to_index_entry(
-		rec, index, *offsets, &n_ext, entry_heap);
+		rec, index, *offsets, entry_heap);
 
 	/* The page containing the clustered index record
 	corresponding to new_entry is latched in mtr.  If the
@@ -4678,7 +4687,6 @@
 
 	ut_ad(!page_is_comp(page) || !rec_get_node_ptr_flag(rec));
 	ut_ad(rec_offs_validate(rec, index, *offsets));
-	n_ext += btr_push_update_extern_fields(new_entry, update, entry_heap);
 
 	if ((flags & BTR_NO_UNDO_LOG_FLAG)
 	    && rec_offs_any_extern(*offsets)) {
@@ -4699,6 +4707,8 @@
 			index, rec, page_zip, *offsets, update, true, mtr);
 	}
 
+	ulint n_ext = dtuple_get_n_ext(new_entry);
+
 	if (page_zip_rec_needs_ext(
 			rec_get_converted_size(index, new_entry, n_ext),
 			page_is_comp(page),
@@ -4899,7 +4909,7 @@
 						MTR_MEMO_X_LOCK |
 						MTR_MEMO_SX_LOCK));
 
-		mtr_sx_lock(dict_index_get_lock(index), mtr);
+		mtr_sx_lock_index(index, mtr);
 	}
 
 	/* Was the record to be updated positioned as the first user
@@ -5105,7 +5115,7 @@
 		clustered index fields. */
 		ut_ad(pos <= MAX_REF_PARTS);
 
-		ulint offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
+		offset_t offsets[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
 		rec_offs_init(offsets);
 		mem_heap_t*	heap	= NULL;
 
@@ -5148,7 +5158,7 @@
 	buf_block_t*	block,	/*!< in/out: buffer block of the record */
 	rec_t*		rec,	/*!< in/out: record */
 	dict_index_t*	index,	/*!< in: clustered index of the record */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec) */
 	que_thr_t*	thr,	/*!< in: query thread */
 	const dtuple_t*	entry,	/*!< in: dtuple for the deleting record, also
 				contains the virtual cols if there are any */
@@ -5434,8 +5444,8 @@
 	buf_block_t*	block;
 	rec_t*		rec;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	ibool		no_compress_needed;
 	rec_offs_init(offsets_);
 
@@ -5618,7 +5628,7 @@
 	bool		success;
 	ibool		ret		= FALSE;
 	mem_heap_t*	heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 #ifdef UNIV_DEBUG
 	bool		parent_latched	= false;
 #endif /* UNIV_DEBUG */
@@ -5676,6 +5686,9 @@
 #endif /* UNIV_ZIP_DEBUG */
 	}
 
+	rec_t* next_rec = NULL;
+	bool min_mark_next_rec = false;
+
 	if (page_is_leaf(page)) {
 		const bool is_metadata = rec_get_info_bits(
 			rec, page_rec_is_comp(rec)) & REC_INFO_MIN_REC_FLAG;
@@ -5749,27 +5762,21 @@
 			goto return_after_reservations;
 		}
 
-		rec_t*	next_rec = page_rec_get_next(rec);
+		next_rec = page_rec_get_next(rec);
 
 		if (!page_has_prev(page)) {
-
 			/* If we delete the leftmost node pointer on a
 			non-leaf level, we must mark the new leftmost node
 			pointer as the predefined minimum record */
 
-			/* This will make page_zip_validate() fail until
-			page_cur_delete_rec() completes.  This is harmless,
-			because everything will take place within a single
-			mini-transaction and because writing to the redo log
-			is an atomic operation (performed by mtr_commit()). */
-			btr_set_min_rec_mark(next_rec, mtr);
+			min_mark_next_rec = true;
 		} else if (dict_index_is_spatial(index)) {
 			/* For rtree, if delete the leftmost node pointer,
 			we need to update parent page. */
 			rtr_mbr_t	father_mbr;
 			rec_t*		father_rec;
 			btr_cur_t	father_cursor;
-			ulint*		offsets;
+			offset_t*	offsets;
 			bool		upd_ret;
 			ulint		len;
 
@@ -5830,6 +5837,11 @@
 				block->page.size, mtr);
 		page_cur_delete_rec(btr_cur_get_page_cur(cursor), index,
 				    offsets, mtr);
+
+		if (min_mark_next_rec) {
+			btr_set_min_rec_mark(next_rec, mtr);
+		}
+
 #ifdef UNIV_ZIP_DEBUG
 		ut_a(!page_zip || page_zip_validate(page_zip, page, index));
 #endif /* UNIV_ZIP_DEBUG */
@@ -6064,7 +6076,7 @@
 			n_rows += page_get_n_recs(page);
 		}
 
-		page_id.set_page_no(btr_page_get_next(page, &mtr));
+		page_id.set_page_no(btr_page_get_next(page));
 
 		mtr_commit(&mtr);
 
@@ -6510,7 +6522,7 @@
 	ulint		n_unique,	/*!< in: dict_index_get_n_unique(index),
 					number of columns uniquely determine
 					an index entry */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index),
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec, index),
 					its size could be for all fields or
 					that of "n_unique" */
 	ib_uint64_t*	n_not_null)	/*!< in/out: array to record number of
@@ -6564,8 +6576,8 @@
 	uintmax_t	add_on;
 	mtr_t		mtr;
 	mem_heap_t*	heap		= NULL;
-	ulint*		offsets_rec	= NULL;
-	ulint*		offsets_next_rec = NULL;
+	offset_t*	offsets_rec	= NULL;
+	offset_t*	offsets_next_rec = NULL;
 
 	/* For spatial index, there is no such stats can be
 	fetched. */
@@ -6727,10 +6739,10 @@
 							   ULINT_UNDEFINED,
 							   &heap);
 
-			cmp_rec_rec_with_match(rec, next_rec,
-					       offsets_rec, offsets_next_rec,
-					       index, stats_null_not_equal,
-					       &matched_fields);
+			cmp_rec_rec(rec, next_rec,
+				    offsets_rec, offsets_next_rec,
+				    index, stats_null_not_equal,
+				    &matched_fields);
 
 			for (j = matched_fields; j < n_cols; j++) {
 				/* We add one if this index record has
@@ -6753,7 +6765,7 @@
 			and assign the old offsets_rec buffer to
 			offsets_next_rec. */
 			{
-				ulint*	offsets_tmp = offsets_rec;
+				offset_t* offsets_tmp = offsets_rec;
 				offsets_rec = offsets_next_rec;
 				offsets_next_rec = offsets_tmp;
 			}
@@ -6838,7 +6850,7 @@
 ulint
 btr_rec_get_field_ref_offs(
 /*=======================*/
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n)	/*!< in: index of the external field */
 {
 	ulint	field_ref_offs;
@@ -6867,7 +6879,7 @@
 ulint
 btr_rec_get_externally_stored_len(
 	const rec_t*	rec,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	ulint	n_fields;
 	ulint	total_extern_len = 0;
@@ -6906,7 +6918,7 @@
 				part will be updated, or NULL */
 	rec_t*		rec,	/*!< in/out: clustered index record */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		i,	/*!< in: field number */
 	ibool		val,	/*!< in: value to set */
 	mtr_t*		mtr)	/*!< in: mtr, or NULL if not logged */
@@ -6956,7 +6968,7 @@
 				part will be updated, or NULL */
 	rec_t*		rec,	/*!< in/out: record in a clustered index */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	const upd_t*	update,	/*!< in: update vector */
 	mtr_t*		mtr)	/*!< in/out: mini-transaction */
 {
@@ -6987,7 +6999,7 @@
 				part will be updated, or NULL */
 	rec_t*		rec,	/*!< in/out: record in a clustered index */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	mtr_t*		mtr)	/*!< in: mtr, or NULL if not logged */
 {
 	ulint	n;
@@ -7011,84 +7023,6 @@
 }
 
 /*******************************************************************//**
-Flags the data tuple fields that are marked as extern storage in the
-update vector.  We use this function to remember which fields we must
-mark as extern storage in a record inserted for an update.
-@return number of flagged external columns */
-ulint
-btr_push_update_extern_fields(
-/*==========================*/
-	dtuple_t*	tuple,	/*!< in/out: data tuple */
-	const upd_t*	update,	/*!< in: update vector */
-	mem_heap_t*	heap)	/*!< in: memory heap */
-{
-	ulint			n_pushed	= 0;
-	ulint			n;
-	const upd_field_t*	uf;
-
-	uf = update->fields;
-	n = upd_get_n_fields(update);
-
-	for (; n--; uf++) {
-		if (dfield_is_ext(&uf->new_val)) {
-			dfield_t*	field
-				= dtuple_get_nth_field(tuple, uf->field_no);
-
-			if (!dfield_is_ext(field)) {
-				dfield_set_ext(field);
-				n_pushed++;
-			}
-
-			switch (uf->orig_len) {
-				byte*	data;
-				ulint	len;
-				byte*	buf;
-			case 0:
-				break;
-			case BTR_EXTERN_FIELD_REF_SIZE:
-				/* Restore the original locally stored
-				part of the column.  In the undo log,
-				InnoDB writes a longer prefix of externally
-				stored columns, so that column prefixes
-				in secondary indexes can be reconstructed. */
-				dfield_set_data(field,
-						(byte*) dfield_get_data(field)
-						+ dfield_get_len(field)
-						- BTR_EXTERN_FIELD_REF_SIZE,
-						BTR_EXTERN_FIELD_REF_SIZE);
-				dfield_set_ext(field);
-				break;
-			default:
-				/* Reconstruct the original locally
-				stored part of the column.  The data
-				will have to be copied. */
-				ut_a(uf->orig_len > BTR_EXTERN_FIELD_REF_SIZE);
-
-				data = (byte*) dfield_get_data(field);
-				len = dfield_get_len(field);
-
-				buf = (byte*) mem_heap_alloc(heap,
-							     uf->orig_len);
-				/* Copy the locally stored prefix. */
-				memcpy(buf, data,
-				       unsigned(uf->orig_len)
-				       - BTR_EXTERN_FIELD_REF_SIZE);
-				/* Copy the BLOB pointer. */
-				memcpy(buf + unsigned(uf->orig_len)
-				       - BTR_EXTERN_FIELD_REF_SIZE,
-				       data + len - BTR_EXTERN_FIELD_REF_SIZE,
-				       BTR_EXTERN_FIELD_REF_SIZE);
-
-				dfield_set_data(field, buf, uf->orig_len);
-				dfield_set_ext(field);
-			}
-		}
-	}
-
-	return(n_pushed);
-}
-
-/*******************************************************************//**
 Returns the length of a BLOB part stored on the header page.
 @return part length */
 static
@@ -7160,7 +7094,7 @@
 	/** Mini transaction holding the latches for m_pcur */
 	mtr_t*		m_mtr;
 	/** rec_get_offsets(rec, index); offset of clust_rec */
-	const ulint*	m_offsets;
+	const offset_t*	m_offsets;
 	/** The block containing clustered record */
 	buf_block_t**	m_block;
 	/** The clustered record pointer */
@@ -7180,7 +7114,7 @@
 	btr_blob_log_check_t(
 		btr_pcur_t*	pcur,
 		mtr_t*		mtr,
-		const ulint*	offsets,
+		const offset_t*	offsets,
 		buf_block_t**	block,
 		rec_t**		rec,
 		enum blob_op	op)
@@ -7205,7 +7139,7 @@
 		ulint		page_no = ULINT_UNDEFINED;
 		FlushObserver*	observer = m_mtr->get_flush_observer();
 
-		if (m_op == BTR_STORE_INSERT_BULK) {
+		if (UNIV_UNLIKELY(m_op == BTR_STORE_INSERT_BULK)) {
 			offs = page_offset(*m_rec);
 			page_no = page_get_page_no(
 				buf_block_get_frame(*m_block));
@@ -7228,8 +7162,7 @@
 		index->set_modified(*m_mtr);
 		m_mtr->set_flush_observer(observer);
 
-		if (m_op == BTR_STORE_INSERT_BULK) {
-			mtr_x_lock(dict_index_get_lock(index), m_mtr);
+		if (UNIV_UNLIKELY(m_op == BTR_STORE_INSERT_BULK)) {
 			m_pcur->btr_cur.page_cur.block = btr_block_get(
 				page_id_t(index->table->space_id, page_no),
 				page_size_t(index->table->space->flags),
@@ -7252,15 +7185,16 @@
 		*m_rec		= btr_pcur_get_rec(m_pcur);
 
 		rec_offs_make_valid(*m_rec, index, true,
-				    const_cast(m_offsets));
+				    const_cast(m_offsets));
 
 		ut_ad(m_mtr->memo_contains_page_flagged(
 		      *m_rec,
 		      MTR_MEMO_PAGE_X_FIX | MTR_MEMO_PAGE_SX_FIX));
 
-		ut_ad(mtr_memo_contains_flagged(m_mtr,
-		      dict_index_get_lock(index),
-		      MTR_MEMO_SX_LOCK | MTR_MEMO_X_LOCK));
+		ut_ad((m_op == BTR_STORE_INSERT_BULK)
+		      == !mtr_memo_contains_flagged(m_mtr, &index->lock,
+						    MTR_MEMO_SX_LOCK
+						    | MTR_MEMO_X_LOCK));
 	}
 };
 
@@ -7282,7 +7216,7 @@
 	btr_pcur_t*	pcur,		/*!< in/out: a persistent cursor. if
 					btr_mtr is restarted, then this can
 					be repositioned. */
-	ulint*		offsets,	/*!< in/out: rec_get_offsets() on
+	offset_t*	offsets,	/*!< in/out: rec_get_offsets() on
 					pcur. the "external storage" flags
 					in offsets will correctly correspond
 					to rec when this function returns */
@@ -7314,8 +7248,10 @@
 
 	ut_ad(rec_offs_validate(rec, index, offsets));
 	ut_ad(rec_offs_any_extern(offsets));
-	ut_ad(mtr_memo_contains_flagged(btr_mtr, dict_index_get_lock(index),
-					MTR_MEMO_X_LOCK | MTR_MEMO_SX_LOCK));
+	ut_ad(op == BTR_STORE_INSERT_BULK
+	      || mtr_memo_contains_flagged(btr_mtr, &index->lock,
+					   MTR_MEMO_X_LOCK
+					   | MTR_MEMO_SX_LOCK));
 	ut_ad(mtr_memo_contains(btr_mtr, rec_block, MTR_MEMO_PAGE_X_FIX));
 	ut_ad(buf_block_get_frame(rec_block) == page_align(rec));
 	ut_a(dict_index_is_clust(index));
@@ -7440,7 +7376,7 @@
 
 			mtr_t	*alloc_mtr;
 
-			if (op == BTR_STORE_INSERT_BULK) {
+			if (UNIV_UNLIKELY(op == BTR_STORE_INSERT_BULK)) {
 				mtr_bulk.start();
 				mtr_bulk.set_spaces(mtr);
 				alloc_mtr = &mtr_bulk;
@@ -7463,7 +7399,7 @@
 
 			index->table->space->release_free_extents(r_extents);
 
-			if (op == BTR_STORE_INSERT_BULK) {
+			if (UNIV_UNLIKELY(op == BTR_STORE_INSERT_BULK)) {
 				mtr_bulk.commit();
 			}
 
@@ -7540,33 +7476,6 @@
 				/* Initialize the unused "prev page" pointer */
 				mlog_write_ulint(page + FIL_PAGE_PREV,
 						 FIL_NULL, MLOG_4BYTES, &mtr);
-				/* Write a back pointer to the record
-				into the otherwise unused area.  This
-				information could be useful in
-				debugging.  Later, we might want to
-				implement the possibility to relocate
-				BLOB pages.  Then, we would need to be
-				able to adjust the BLOB pointer in the
-				record.  We do not store the heap
-				number of the record, because it can
-				change in page_zip_reorganize() or
-				btr_page_reorganize().  However, also
-				the page number of the record may
-				change when B-tree nodes are split or
-				merged.
-				NOTE: FIL_PAGE_FILE_FLUSH_LSN space is
-				used by R-tree index for a Split Sequence
-				Number */
-				ut_ad(!dict_index_is_spatial(index));
-
-				mlog_write_ulint(page
-						 + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION,
-						 space_id,
-						 MLOG_4BYTES, &mtr);
-				mlog_write_ulint(page
-						 + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION + 4,
-						 rec_page_no,
-						 MLOG_4BYTES, &mtr);
 
 				/* Zero out the unused part of the page. */
 				memset(page + page_zip_get_size(page_zip)
@@ -7619,7 +7528,7 @@
 				}
 
 				/* We compress a page when finish bulk insert.*/
-				if (op != BTR_STORE_INSERT_BULK) {
+				if (UNIV_LIKELY(op != BTR_STORE_INSERT_BULK)) {
 					page_zip_write_blob_ptr(
 						page_zip, rec, index, offsets,
 						field_no, &mtr);
@@ -7662,8 +7571,8 @@
 
 				extern_len -= store_len;
 
-				mlog_write_ulint(field_ref + BTR_EXTERN_LEN, 0,
-						 MLOG_4BYTES, &mtr);
+				ut_ad(!mach_read_from_4(BTR_EXTERN_LEN
+							+ field_ref));
 				mlog_write_ulint(field_ref
 						 + BTR_EXTERN_LEN + 4,
 						 big_rec_vec->fields[i].len
@@ -7792,7 +7701,7 @@
 	byte*		field_ref,	/*!< in/out: field reference */
 	const rec_t*	rec,		/*!< in: record containing field_ref, for
 					page_zip_write_blob_ptr(), or NULL */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index),
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec, index),
 					or NULL */
 	page_zip_des_t*	page_zip,	/*!< in: compressed page corresponding
 					to rec, or NULL if rec == NULL */
@@ -7966,7 +7875,7 @@
 	dict_index_t*	index,	/*!< in: index of the data, the index
 				tree MUST be X-latched */
 	rec_t*		rec,	/*!< in/out: record */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	page_zip_des_t*	page_zip,/*!< in: compressed page whose uncompressed
 				part will be updated, or NULL */
 	bool		rollback,/*!< in: performing rollback? */
@@ -8007,7 +7916,7 @@
 	rec_t*		rec,	/*!< in/out: record */
 	page_zip_des_t*	page_zip,/*!< in: compressed page whose uncompressed
 				part will be updated, or NULL */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const upd_t*	update,	/*!< in: update vector */
 	bool		rollback,/*!< in: performing rollback? */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle which contains
@@ -8405,7 +8314,7 @@
 byte*
 btr_rec_copy_externally_stored_field(
 	const rec_t*		rec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	const page_size_t&	page_size,
 	ulint			no,
 	ulint*			len,
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0defragment.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0defragment.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0defragment.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0defragment.cc	2020-01-26 18:37:29.000000000 +0000
@@ -338,8 +338,8 @@
 {
 	page_t* page = buf_block_get_frame(block);
 	ulint n_recs = 0;
-	ulint offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint* offsets = offsets_;
+	offset_t offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t* offsets = offsets_;
 	rec_offs_init(offsets_);
 	mem_heap_t* heap = NULL;
 	ulint size = 0;
@@ -583,7 +583,7 @@
 	blocks[0] = block;
 	for (uint i = 1; i <= n_pages; i++) {
 		page_t* page = buf_block_get_frame(blocks[i-1]);
-		ulint page_no = btr_page_get_next(page, mtr);
+		ulint page_no = btr_page_get_next(page);
 		total_data_size += page_get_data_size(page);
 		total_n_recs += page_get_n_recs(page);
 		if (page_no == FIL_NULL) {
@@ -751,7 +751,7 @@
 		index->set_modified(mtr);
 		/* To follow the latching order defined in WL#6326, acquire index->lock X-latch.
 		This entitles us to acquire page latches in any order for the index. */
-		mtr_x_lock(&index->lock, &mtr);
+		mtr_x_lock_index(index, &mtr);
 		/* This will acquire index->lock SX-latch, which per WL#6363 is allowed
 		when we are already holding the X-latch. */
 		btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, &mtr);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0pcur.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0pcur.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0pcur.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0pcur.cc	2020-01-26 18:37:29.000000000 +0000
@@ -302,16 +302,21 @@
 			if (cursor->rel_pos == BTR_PCUR_ON) {
 #ifdef UNIV_DEBUG
 				const rec_t*	rec;
-				const ulint*	offsets1;
-				const ulint*	offsets2;
+				offset_t	offsets1_[REC_OFFS_NORMAL_SIZE];
+				offset_t	offsets2_[REC_OFFS_NORMAL_SIZE];
+				offset_t*	offsets1 = offsets1_;
+				offset_t*	offsets2 = offsets2_;
 				rec = btr_pcur_get_rec(cursor);
 
+				rec_offs_init(offsets1_);
+				rec_offs_init(offsets2_);
+
 				heap = mem_heap_create(256);
 				offsets1 = rec_get_offsets(
-					cursor->old_rec, index, NULL, true,
+					cursor->old_rec, index, offsets1, true,
 					cursor->old_n_fields, &heap);
 				offsets2 = rec_get_offsets(
-					rec, index, NULL, true,
+					rec, index, offsets2, true,
 					cursor->old_n_fields, &heap);
 
 				ut_ad(!cmp_rec_rec(cursor->old_rec,
@@ -370,11 +375,13 @@
 	ut_ad(cursor->rel_pos == BTR_PCUR_ON
 	      || cursor->rel_pos == BTR_PCUR_BEFORE
 	      || cursor->rel_pos == BTR_PCUR_AFTER);
+	offset_t offsets[REC_OFFS_NORMAL_SIZE];
+	rec_offs_init(offsets);
 	if (cursor->rel_pos == BTR_PCUR_ON
 	    && btr_pcur_is_on_user_rec(cursor)
 	    && !cmp_dtuple_rec(tuple, btr_pcur_get_rec(cursor),
 			       rec_get_offsets(btr_pcur_get_rec(cursor),
-					       index, NULL, true,
+					       index, offsets, true,
 					       ULINT_UNDEFINED, &heap))) {
 
 		/* We have to store the NEW value for the modify clock,
@@ -433,7 +440,7 @@
 		return;
 	}
 
-	next_page_no = btr_page_get_next(page, mtr);
+	next_page_no = btr_page_get_next(page);
 
 	ut_ad(next_page_no != FIL_NULL);
 
@@ -460,7 +467,7 @@
 	next_page = buf_block_get_frame(next_block);
 #ifdef UNIV_BTR_DEBUG
 	ut_a(page_is_comp(next_page) == page_is_comp(page));
-	ut_a(btr_page_get_prev(next_page, mtr)
+	ut_a(btr_page_get_prev(next_page)
 	     == btr_pcur_get_block(cursor)->page.id.page_no());
 #endif /* UNIV_BTR_DEBUG */
 
@@ -522,7 +529,7 @@
 
 	page = btr_pcur_get_page(cursor);
 
-	prev_page_no = btr_page_get_prev(page, mtr);
+	prev_page_no = btr_page_get_prev(page);
 
 	if (prev_page_no == FIL_NULL) {
 	} else if (btr_pcur_is_before_first_on_page(cursor)) {
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0scrub.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0scrub.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0scrub.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0scrub.cc	2020-01-26 18:37:29.000000000 +0000
@@ -432,8 +432,8 @@
 
 	/* read block variables */
 	const ulint page_no =  mach_read_from_4(page + FIL_PAGE_OFFSET);
-	const ulint left_page_no = mach_read_from_4(page + FIL_PAGE_PREV);
-	const ulint right_page_no = mach_read_from_4(page + FIL_PAGE_NEXT);
+	const uint32_t left_page_no = btr_page_get_prev(page);
+	const uint32_t right_page_no = btr_page_get_next(page);
 	const page_size_t page_size(index->table->space->flags);
 
 	/**
@@ -465,8 +465,8 @@
 		/**
 		* structure should be unchanged
 		*/
-		ut_a(left_page_no == btr_page_get_prev(page, mtr));
-		ut_a(right_page_no == btr_page_get_next(page, mtr));
+		ut_a(left_page_no == btr_page_get_prev(page));
+		ut_a(right_page_no == btr_page_get_next(page));
 	}
 
 	if (right_page_no != FIL_NULL) {
@@ -478,7 +478,7 @@
 	/* arguments to btr_page_split_and_insert */
 	mem_heap_t* heap = NULL;
 	dtuple_t* entry = NULL;
-	ulint* offsets = NULL;
+	offset_t* offsets = NULL;
 	ulint n_ext = 0;
 	ulint flags = BTR_MODIFY_TREE;
 
@@ -742,7 +742,7 @@
 	}
 
 	mtr_start(mtr);
-	mtr_x_lock(dict_index_get_lock(scrub_data->current_index), mtr);
+	mtr_x_lock_index(scrub_data->current_index, mtr);
 	/** set savepoint for X-latch of block */
 	scrub_data->savepoint = mtr_set_savepoint(mtr);
 	return BTR_SCRUB_PAGE;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/btr/btr0sea.cc mariadb-10.3-10.3.22/storage/innobase/btr/btr0sea.cc
--- mariadb-10.3-10.3.18/storage/innobase/btr/btr0sea.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/btr/btr0sea.cc	2020-01-26 18:37:29.000000000 +0000
@@ -97,7 +97,7 @@
 ulint
 rec_fold(
 	const rec_t*	rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	ulint		n_fields,
 	ulint		n_bytes,
 	index_id_t	tree_id)
@@ -669,7 +669,7 @@
 	    && (block->curr_n_bytes == info->n_bytes)
 	    && (block->curr_left_side == info->left_side)) {
 		mem_heap_t*	heap		= NULL;
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
 		rec_offs_init(offsets_);
 
 		rec = btr_cur_get_rec(cursor);
@@ -722,8 +722,8 @@
 	ulint		match;
 	int		cmp;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	ibool		success		= FALSE;
 	rec_offs_init(offsets_);
 
@@ -782,10 +782,7 @@
 		const rec_t* prev_rec = page_rec_get_prev(rec);
 
 		if (page_rec_is_infimum(prev_rec)) {
-			success = *reinterpret_cast(
-				page_align(prev_rec) + FIL_PAGE_PREV)
-				== FIL_NULL;
-
+			success = !page_has_prev(page_align(prev_rec));
 			goto exit_func;
 		}
 
@@ -804,10 +801,7 @@
 		const rec_t* next_rec = page_rec_get_next(rec);
 
 		if (page_rec_is_supremum(next_rec)) {
-			if (*reinterpret_cast(
-				    page_align(next_rec) + FIL_PAGE_NEXT)
-			    == FIL_NULL) {
-
+			if (!page_has_next(page_align(next_rec))) {
 				cursor->up_match = 0;
 				success = TRUE;
 			}
@@ -1088,7 +1082,7 @@
 	ulint			i;
 	mem_heap_t*		heap;
 	const dict_index_t*	index;
-	ulint*			offsets;
+	offset_t*		offsets;
 	rw_lock_t*		latch;
 	btr_search_t*		info;
 
@@ -1343,8 +1337,8 @@
 	const rec_t**	recs;
 	ulint		i;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 
 #ifdef MYSQL_INDEX_DISABLE_AHI
 	if (index->disable_ahi) return;
@@ -1648,7 +1642,7 @@
 	const rec_t*	rec;
 	ulint		fold;
 	dict_index_t*	index;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
 	mem_heap_t*	heap		= NULL;
 	rec_offs_init(offsets_);
 
@@ -1803,8 +1797,8 @@
 	ibool		left_side;
 	bool		locked		= false;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(ahi_latch == btr_get_search_latch(cursor->index));
@@ -1961,8 +1955,8 @@
 	ulint		i;
 	ulint		cell_count;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 
 	if (!btr_search_enabled) {
 		return(TRUE);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/buf/buf0buf.cc mariadb-10.3-10.3.22/storage/innobase/buf/buf0buf.cc
--- mariadb-10.3-10.3.18/storage/innobase/buf/buf0buf.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/buf/buf0buf.cc	2020-01-26 18:37:29.000000000 +0000
@@ -103,6 +103,7 @@
 					" policy to MPOL_INTERLEAVE: "
 					<< strerror(errno);
 			}
+			numa_bitmask_free(numa_mems_allowed);
 		}
 	}
 
@@ -130,29 +131,6 @@
 #include "snappy-c.h"
 #endif
 
-inline void* aligned_malloc(size_t size, size_t align) {
-    void *result;
-#ifdef _MSC_VER
-    result = _aligned_malloc(size, align);
-#elif defined (HAVE_POSIX_MEMALIGN)
-    if(posix_memalign(&result, align, size)) {
-	    result = 0;
-    }
-#else
-    /* Use unaligned malloc as fallback */
-    result = malloc(size);
-#endif
-    return result;
-}
-
-inline void aligned_free(void *ptr) {
-#ifdef _MSC_VER
-        _aligned_free(ptr);
-#else
-      free(ptr);
-#endif
-}
-
 /*
 		IMPLEMENTATION OF THE BUFFER POOL
 		=================================
@@ -589,12 +567,6 @@
 				    << mach_read_from_4(
 					    FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION
 					    + dst_frame);
-			/* Mark page encrypted in case it should be. */
-			if (space->crypt_data->type
-			    != CRYPT_SCHEME_UNENCRYPTED) {
-				bpage->encrypted = true;
-			}
-
 			return false;
 		}
 
@@ -605,8 +577,7 @@
 		ut_d(fil_page_type_validate(dst_frame));
 
 		/* decrypt using crypt_buf to dst_frame */
-		if (!fil_space_decrypt(space, slot->crypt_buf,
-				       dst_frame, &bpage->encrypted)) {
+		if (!fil_space_decrypt(space, slot->crypt_buf, dst_frame)) {
 			slot->release();
 			goto decrypt_failed;
 		}
@@ -1573,7 +1544,6 @@
 	block->page.buf_fix_count = 0;
 	block->page.io_fix = BUF_IO_NONE;
 	block->page.flush_observer = NULL;
-	block->page.encrypted = false;
 	block->page.real_size = 0;
 	block->page.write_size = 0;
 	block->modify_clock = 0;
@@ -1671,6 +1641,7 @@
 				" buffer pool page frames to MPOL_INTERLEAVE"
 				" (error: " << strerror(errno) << ").";
 		}
+		numa_bitmask_free(numa_mems_allowed);
 	}
 #endif /* HAVE_LIBNUMA */
 
@@ -4087,7 +4058,6 @@
 	if (encrypted) {
 		ib::info() << "Row compressed page could be encrypted"
 			" with key_version " << key_version;
-		block->page.encrypted = true;
 	}
 
 	if (space) {
@@ -5293,7 +5263,6 @@
 	bpage->newest_modification = 0;
 	bpage->oldest_modification = 0;
 	bpage->write_size = 0;
-	bpage->encrypted = false;
 	bpage->real_size = 0;
 	bpage->slot = NULL;
 
@@ -5887,17 +5856,19 @@
 }
 
 /** Mark a table corrupted.
-Also remove the bpage from LRU list.
-@param[in]	bpage	Corrupted page. */
-static void buf_mark_space_corrupt(buf_page_t* bpage, const fil_space_t* space)
+@param[in]	bpage	corrupted page
+@param[in]	space	tablespace of the corrupted page */
+ATTRIBUTE_COLD
+static void buf_mark_space_corrupt(buf_page_t* bpage, const fil_space_t& space)
 {
 	/* If block is not encrypted find the table with specified
 	space id, and mark it corrupted. Encrypted tables
 	are marked unusable later e.g. in ::open(). */
-	if (!bpage->encrypted) {
-		dict_set_corrupted_by_space(space);
+	if (!space.crypt_data
+	    || space.crypt_data->type == CRYPT_SCHEME_UNENCRYPTED) {
+		dict_set_corrupted_by_space(&space);
 	} else {
-		dict_set_encrypted_by_space(space);
+		dict_set_encrypted_by_space(&space);
 	}
 }
 
@@ -5936,7 +5907,7 @@
 	mutex_exit(buf_page_get_mutex(bpage));
 
 	if (!srv_force_recovery) {
-		buf_mark_space_corrupt(bpage, space);
+		buf_mark_space_corrupt(bpage, *space);
 	}
 
 	/* After this point bpage can't be referenced. */
@@ -5966,7 +5937,6 @@
 	byte* dst_frame = (bpage->zip.data) ? bpage->zip.data :
 		((buf_block_t*) bpage)->frame;
 	dberr_t err = DB_SUCCESS;
-	bool corrupted = false;
 
 	/* In buf_decrypt_after_read we have either decrypted the page if
 	page post encryption checksum matches and used key_id is found
@@ -5974,33 +5944,20 @@
 	not decrypted and it could be either encrypted and corrupted
 	or corrupted or good page. If we decrypted, there page could
 	still be corrupted if used key does not match. */
-	const bool still_encrypted = mach_read_from_4(
+	const bool seems_encrypted = mach_read_from_4(
 		dst_frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION)
 		&& space->crypt_data
-		&& space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED
-		&& !bpage->encrypted
-		&& fil_space_verify_crypt_checksum(dst_frame, bpage->size);
-
-	if (!still_encrypted) {
-		/* If traditional checksums match, we assume that page is
-		not anymore encrypted. */
-		corrupted = buf_page_is_corrupted(
-			true, dst_frame, bpage->size, space);
+		&& space->crypt_data->type != CRYPT_SCHEME_UNENCRYPTED;
 
-		if (!corrupted) {
-			bpage->encrypted = false;
-		} else {
-			err = DB_PAGE_CORRUPTED;
-		}
+	/* If traditional checksums match, we assume that page is
+	not anymore encrypted. */
+	if (buf_page_is_corrupted(
+		true, dst_frame, bpage->size, space)) {
+		err = DB_PAGE_CORRUPTED;
 	}
 
-	/* Pages that we think are unencrypted but do not match the checksum
-	checks could be corrupted or encrypted or both. */
-	if (corrupted && !bpage->encrypted) {
-		/* An error will be reported by
-		buf_page_io_complete(). */
-	} else if (still_encrypted || (bpage->encrypted && corrupted)) {
-		bpage->encrypted = true;
+	if (seems_encrypted && err == DB_PAGE_CORRUPTED
+	    && bpage->id.page_no() != 0) {
 		err = DB_DECRYPTION_FAILED;
 
 		ib::error()
@@ -6062,7 +6019,6 @@
 	if (io_type == BUF_IO_READ) {
 		ulint	read_page_no = 0;
 		ulint	read_space_id = 0;
-		uint	key_version = 0;
 		byte*	frame = bpage->zip.data
 			? bpage->zip.data
 			: reinterpret_cast(bpage)->frame;
@@ -6102,8 +6058,6 @@
 		read_page_no = mach_read_from_4(frame + FIL_PAGE_OFFSET);
 		read_space_id = mach_read_from_4(
 			frame + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
-		key_version = mach_read_from_4(
-			frame + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION);
 
 		if (bpage->id.space() == TRX_SYS_SPACE
 		    && buf_dblwr_page_inside(bpage->id.page_no())) {
@@ -6219,23 +6173,9 @@
 		    && fil_page_get_type(frame) == FIL_PAGE_INDEX
 		    && page_is_leaf(frame)) {
 
-			if (bpage->encrypted) {
-				ib::warn()
-					<< "Table in tablespace "
-					<< bpage->id.space()
-					<< " encrypted. However key "
-					"management plugin or used "
-					<< "key_version " << key_version
-					<< " is not found or"
-					" used encryption algorithm or method does not match."
-					" Can't continue opening the table.";
-			} else {
-
-				ibuf_merge_or_delete_for_page(
-					(buf_block_t*) bpage, bpage->id,
-					&bpage->size, TRUE);
-			}
-
+			ibuf_merge_or_delete_for_page(
+				(buf_block_t*) bpage, bpage->id,
+				&bpage->size, TRUE);
 		}
 
 		space->release_for_io();
diff -Nru mariadb-10.3-10.3.18/storage/innobase/buf/buf0dblwr.cc mariadb-10.3-10.3.22/storage/innobase/buf/buf0dblwr.cc
--- mariadb-10.3-10.3.18/storage/innobase/buf/buf0dblwr.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/buf/buf0dblwr.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2020, 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
@@ -264,6 +264,13 @@
 
 		ut_ad(rw_lock_get_x_lock_count(&new_block->lock) == 1);
 		page_no = new_block->page.id.page_no();
+		/* We only do this in the debug build, to ensure that
+		both the check in buf_flush_init_for_writing() and
+		recv_parse_or_apply_log_rec_body() will see a valid
+		page type. The flushes of new_block are actually
+		unnecessary here.  */
+		ut_d(mlog_write_ulint(FIL_PAGE_TYPE + new_block->frame,
+				      FIL_PAGE_TYPE_SYS, MLOG_2BYTES, &mtr));
 
 		if (i == FSP_EXTENT_SIZE / 2) {
 			ut_a(page_no == FSP_EXTENT_SIZE);
@@ -325,7 +332,8 @@
 	mtr_commit(&mtr);
 
 	/* Flush the modified pages to disk and make a checkpoint */
-	log_make_checkpoint_at(LSN_MAX);
+	log_make_checkpoint();
+	buf_dblwr_being_created = FALSE;
 
 	/* Remove doublewrite pages from LRU */
 	buf_pool_invalidate();
@@ -981,6 +989,7 @@
 		int64_t	sig_count = os_event_reset(buf_dblwr->b_event);
 		mutex_exit(&buf_dblwr->mutex);
 
+		os_aio_simulated_wake_handler_threads();
 		os_event_wait_low(buf_dblwr->b_event, sig_count);
 		goto try_again;
 	}
@@ -1110,6 +1119,7 @@
 		checkpoint. */
 		int64_t	sig_count = os_event_reset(buf_dblwr->b_event);
 		mutex_exit(&buf_dblwr->mutex);
+		os_aio_simulated_wake_handler_threads();
 
 		os_event_wait_low(buf_dblwr->b_event, sig_count);
 		goto try_again;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/buf/buf0flu.cc mariadb-10.3-10.3.22/storage/innobase/buf/buf0flu.cc
--- mariadb-10.3-10.3.18/storage/innobase/buf/buf0flu.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/buf/buf0flu.cc	2020-01-26 18:37:29.000000000 +0000
@@ -855,7 +855,16 @@
 	ut_ad(block == NULL || block->frame == page);
 	ut_ad(block == NULL || page_zip_ == NULL
 	      || &block->page.zip == page_zip_);
+	ut_ad(!block || newest_lsn);
 	ut_ad(page);
+#if 0 /* MDEV-15528 TODO: reinstate this check */
+	/* innodb_immediate_scrub_data_uncompressed=ON would cause
+	fsp_init_file_page() to be called on freed pages, and thus
+	cause them to be written as almost-all-zeroed.
+	In MDEV-15528 we should change that implement an option to
+	make freed pages appear all-zero, bypassing this code. */
+	ut_ad(!newest_lsn || fil_page_get_type(page));
+#endif
 
 	if (page_zip_) {
 		page_zip_des_t*	page_zip;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/buf/buf0rea.cc mariadb-10.3-10.3.22/storage/innobase/buf/buf0rea.cc
--- mariadb-10.3-10.3.18/storage/innobase/buf/buf0rea.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/buf/buf0rea.cc	2020-01-26 18:37:29.000000000 +0000
@@ -819,11 +819,8 @@
 #endif
 
 	for (ulint i = 0; i < n_stored; i++) {
-		bool			found;
-		const page_size_t	page_size(fil_space_get_page_size(
-			space_ids[i], &found));
-
-		if (!found) {
+		fil_space_t* space = fil_space_acquire_silent(space_ids[i]);
+		if (!space) {
 tablespace_deleted:
 			/* The tablespace was not found: remove all
 			entries for it */
@@ -835,6 +832,19 @@
 			continue;
 		}
 
+		if (UNIV_UNLIKELY(page_nos[i] >= space->size)) {
+			do {
+				ibuf_delete_recs(page_id_t(space_ids[i],
+							   page_nos[i]));
+			} while (++i < n_stored
+				 && space_ids[i - 1] == space_ids[i]
+				 && page_nos[i] >= space->size);
+			i--;
+next:
+			space->release();
+			continue;
+		}
+
 		const page_id_t	page_id(space_ids[i], page_nos[i]);
 
 		buf_pool_t*	buf_pool = buf_pool_get(page_id);
@@ -849,8 +859,8 @@
 		buf_read_page_low(&err,
 				  sync && (i + 1 == n_stored),
 				  0,
-				  BUF_READ_ANY_PAGE, page_id, page_size,
-				  true, true /* ignore_missing_space */);
+				  BUF_READ_ANY_PAGE, page_id,
+				  page_size_t(space->flags), true);
 
 		switch(err) {
 		case DB_SUCCESS:
@@ -858,15 +868,20 @@
 		case DB_ERROR:
 			break;
 		case DB_TABLESPACE_DELETED:
+			space->release();
 			goto tablespace_deleted;
 		case DB_PAGE_CORRUPTED:
 		case DB_DECRYPTION_FAILED:
-			ib::error() << "Failed to read or decrypt " << page_id
-				<< " for change buffer merge";
+			ib::error() << "Failed to read or decrypt page "
+				    << page_nos[i]
+				    << " of '" << space->chain.start->name
+				    << "' for change buffer merge";
 			break;
 		default:
 			ut_error;
 		}
+
+		goto next;
 	}
 
 	os_aio_simulated_wake_handler_threads();
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0boot.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0boot.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0boot.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0boot.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, MariaDB Corporation.
+Copyright (c) 2016, 2019, 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
@@ -127,8 +127,7 @@
 	}
 
 	if (space_id) {
-		*space_id = mtr_read_ulint(dict_hdr + DICT_HDR_MAX_SPACE_ID,
-					   MLOG_4BYTES, &mtr);
+		*space_id = mach_read_from_4(dict_hdr + DICT_HDR_MAX_SPACE_ID);
 		if (fil_assign_new_space_id(space_id)) {
 			mlog_write_ulint(dict_hdr + DICT_HDR_MAX_SPACE_ID,
 					 *space_id, MLOG_4BYTES, &mtr);
@@ -199,8 +198,7 @@
 	mlog_write_ull(dict_header + DICT_HDR_INDEX_ID,
 		       DICT_HDR_FIRST_ID, mtr);
 
-	mlog_write_ulint(dict_header + DICT_HDR_MAX_SPACE_ID,
-			 0, MLOG_4BYTES, mtr);
+	ut_ad(mach_read_from_4(dict_header + DICT_HDR_MAX_SPACE_ID) == 0);
 
 	/* Obsolete, but we must initialize it anyway. */
 	mlog_write_ulint(dict_header + DICT_HDR_MIX_ID_LOW,
@@ -361,9 +359,9 @@
 	dict_mem_index_add_field(index, "NAME", 0);
 
 	index->id = DICT_TABLES_ID;
-	index = dict_index_add_to_cache(
+	dberr_t error = dict_index_add_to_cache(
 		index, mach_read_from_4(dict_hdr + DICT_HDR_TABLES));
-	ut_a(index);
+	ut_a(error == DB_SUCCESS);
 	ut_ad(!table->is_instant());
 	table->indexes.start->n_core_null_bytes = UT_BITS_IN_BYTES(
 		unsigned(table->indexes.start->n_nullable));
@@ -373,9 +371,9 @@
 	dict_mem_index_add_field(index, "ID", 0);
 
 	index->id = DICT_TABLE_IDS_ID;
-	index = dict_index_add_to_cache(
+	error = dict_index_add_to_cache(
 		index, mach_read_from_4(dict_hdr + DICT_HDR_TABLE_IDS));
-	ut_a(index);
+	ut_a(error == DB_SUCCESS);
 
 	/*-------------------------*/
 	table = dict_mem_table_create("SYS_COLUMNS", fil_system.sys_space,
@@ -403,9 +401,9 @@
 	dict_mem_index_add_field(index, "POS", 0);
 
 	index->id = DICT_COLUMNS_ID;
-	index = dict_index_add_to_cache(
+	error = dict_index_add_to_cache(
 		index, mach_read_from_4(dict_hdr + DICT_HDR_COLUMNS));
-	ut_a(index);
+	ut_a(error == DB_SUCCESS);
 	ut_ad(!table->is_instant());
 	table->indexes.start->n_core_null_bytes = UT_BITS_IN_BYTES(
 		unsigned(table->indexes.start->n_nullable));
@@ -446,9 +444,9 @@
 	dict_mem_index_add_field(index, "ID", 0);
 
 	index->id = DICT_INDEXES_ID;
-	index = dict_index_add_to_cache(
+	error = dict_index_add_to_cache(
 		index, mach_read_from_4(dict_hdr + DICT_HDR_INDEXES));
-	ut_a(index);
+	ut_a(error == DB_SUCCESS);
 	ut_ad(!table->is_instant());
 	table->indexes.start->n_core_null_bytes = UT_BITS_IN_BYTES(
 		unsigned(table->indexes.start->n_nullable));
@@ -475,9 +473,9 @@
 	dict_mem_index_add_field(index, "POS", 0);
 
 	index->id = DICT_FIELDS_ID;
-	index = dict_index_add_to_cache(
+	error = dict_index_add_to_cache(
 		index, mach_read_from_4(dict_hdr + DICT_HDR_FIELDS));
-	ut_a(index);
+	ut_a(error == DB_SUCCESS);
 	ut_ad(!table->is_instant());
 	table->indexes.start->n_core_null_bytes = UT_BITS_IN_BYTES(
 		unsigned(table->indexes.start->n_nullable));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0crea.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0crea.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0crea.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0crea.cc	2020-01-26 18:37:29.000000000 +0000
@@ -870,11 +870,14 @@
 				err = DB_OUT_OF_FILE_SPACE; );
 	}
 
-	page_rec_write_field(
-		btr_pcur_get_rec(&pcur), DICT_FLD__SYS_INDEXES__PAGE_NO,
-		node->page_no, &mtr);
-
-	btr_pcur_close(&pcur);
+	ulint   len;
+	byte*   data = rec_get_nth_field_old(btr_pcur_get_rec(&pcur),
+					     DICT_FLD__SYS_INDEXES__PAGE_NO,
+					     &len);
+	ut_ad(len == 4);
+	if (mach_read_from_4(data) != node->page_no) {
+		mlog_write_ulint(data, node->page_no, MLOG_4BYTES, &mtr);
+	}
 
 	mtr.commit();
 
@@ -916,17 +919,13 @@
 /** Drop the index tree associated with a row in SYS_INDEXES table.
 @param[in,out]	rec	SYS_INDEXES record
 @param[in,out]	pcur	persistent cursor on rec
+@param[in,out]	trx	dictionary transaction
 @param[in,out]	mtr	mini-transaction
 @return	whether freeing the B-tree was attempted */
-bool
-dict_drop_index_tree(
-	rec_t*		rec,
-	btr_pcur_t*	pcur,
-	mtr_t*		mtr)
+bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
 {
 	const byte*	ptr;
 	ulint		len;
-	ulint		space;
 	ulint		root_page_no;
 
 	ut_ad(mutex_own(&dict_sys->mutex));
@@ -953,7 +952,14 @@
 
 	ut_ad(len == 4);
 
-	space = mtr_read_ulint(ptr, MLOG_4BYTES, mtr);
+	const uint32_t space_id = mach_read_from_4(ptr);
+	ut_ad(space_id < SRV_TMP_SPACE_ID);
+	if (space_id != TRX_SYS_SPACE
+	    && trx_get_dict_operation(trx) == TRX_DICT_OP_TABLE) {
+		/* We are about to delete the entire .ibd file;
+		do not bother to free pages inside it. */
+		return false;
+	}
 
 	ptr = rec_get_nth_field_old(
 		rec, DICT_FLD__SYS_INDEXES__ID, &len);
@@ -961,7 +967,7 @@
 	ut_ad(len == 8);
 
 	bool			found;
-	const page_size_t	page_size(fil_space_get_page_size(space,
+	const page_size_t	page_size(fil_space_get_page_size(space_id,
 								  &found));
 
 	if (!found) {
@@ -974,11 +980,11 @@
 	/* If tablespace is scheduled for truncate, do not try to drop
 	the indexes in that tablespace. There is a truncate fixup action
 	which will take care of it. */
-	if (srv_is_tablespace_truncated(space)) {
+	if (srv_is_tablespace_truncated(space_id)) {
 		return(false);
 	}
 
-	btr_free_if_exists(page_id_t(space, root_page_no), page_size,
+	btr_free_if_exists(page_id_t(space_id, root_page_no), page_size,
 			   mach_read_from_8(ptr), mtr);
 
 	return(true);
@@ -1350,9 +1356,8 @@
 
 	if (node->state == INDEX_ADD_TO_CACHE) {
 		ut_ad(node->index->table == node->table);
-		node->index = dict_index_add_to_cache(
-			node->index, FIL_NULL, trx_is_strict(trx),
-			&err, node->add_v);
+		err = dict_index_add_to_cache(node->index, FIL_NULL,
+					      node->add_v);
 
 		ut_ad((node->index == NULL) == (err != DB_SUCCESS));
 
@@ -2340,49 +2345,6 @@
 	return(error);
 }
 
-/** Delete records from SYS_TABLESPACES and SYS_DATAFILES associated
-with a particular tablespace ID.
-@param[in]	space	Tablespace ID
-@param[in,out]	trx	Current transaction
-@return DB_SUCCESS if OK, dberr_t if the operation failed */
-
-dberr_t
-dict_delete_tablespace_and_datafiles(
-	ulint		space,
-	trx_t*		trx)
-{
-	dberr_t		err = DB_SUCCESS;
-
-	ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
-	ut_ad(mutex_own(&dict_sys->mutex));
-	ut_ad(srv_sys_tablespaces_open);
-
-	trx->op_info = "delete tablespace and datafiles from dictionary";
-
-	pars_info_t*	info = pars_info_create();
-	ut_a(!is_system_tablespace(space));
-	pars_info_add_int4_literal(info, "space", space);
-
-	err = que_eval_sql(info,
-			   "PROCEDURE P () IS\n"
-			   "BEGIN\n"
-			   "DELETE FROM SYS_TABLESPACES\n"
-			   "WHERE SPACE = :space;\n"
-			   "DELETE FROM SYS_DATAFILES\n"
-			   "WHERE SPACE = :space;\n"
-			   "END;\n",
-			   FALSE, trx);
-
-	if (err != DB_SUCCESS) {
-		ib::warn() << "Could not delete space_id "
-			<< space << " from data dictionary";
-	}
-
-	trx->op_info = "";
-
-	return(err);
-}
-
 /** Assign a new table ID and put it into the table cache and the transaction.
 @param[in,out]	table	Table that needs an ID
 @param[in,out]	trx	Transaction */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0defrag_bg.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0defrag_bg.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0defrag_bg.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0defrag_bg.cc	2020-01-26 18:37:29.000000000 +0000
@@ -281,11 +281,11 @@
 	mtr_t	mtr;
 	ulint	n_leaf_pages;
 	ulint	n_leaf_reserved;
-	mtr_start(&mtr);
-	mtr_s_lock(dict_index_get_lock(index), &mtr);
+	mtr.start();
+	mtr_s_lock_index(index, &mtr);
 	n_leaf_reserved = btr_get_size_and_reserved(index, BTR_N_LEAF_PAGES,
 						    &n_leaf_pages, &mtr);
-	mtr_commit(&mtr);
+	mtr.commit();
 
 	if (n_leaf_reserved == ULINT_UNDEFINED) {
 		// The index name is different during fast index creation,
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0dict.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0dict.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0dict.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0dict.cc	2020-01-26 18:37:29.000000000 +0000
@@ -45,11 +45,6 @@
 extern uint	ibuf_debug;
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
 
-/**********************************************************************
-Issue a warning that the row is too big. */
-void
-ib_warn_row_too_big(const dict_table_t*	table);
-
 #include "btr0btr.h"
 #include "btr0cur.h"
 #include "btr0sea.h"
@@ -1156,7 +1151,7 @@
 	table = dict_table_check_if_in_cache_low(table_name);
 
 	if (table == NULL) {
-		table = dict_load_table(table_name, true, ignore_err);
+		table = dict_load_table(table_name, ignore_err);
 	}
 
 	ut_ad(!table || table->cached);
@@ -1418,14 +1413,7 @@
 	        prev_table = UT_LIST_GET_PREV(table_LRU, table);
 
 		if (dict_table_can_be_evicted(table)) {
-
-			DBUG_EXECUTE_IF("crash_if_fts_table_is_evicted",
-			{
-				  if (table->fts &&
-				      dict_table_has_fts_index(table)) {
-					ut_ad(0);
-				  }
-			};);
+			ut_ad(!table->fts);
 			dict_table_remove_from_cache_low(table, TRUE);
 
 			++n_evicted;
@@ -1772,8 +1760,7 @@
 			/* The old table name in my_charset_filename is stored
 			in old_name_cs_filename */
 
-			strncpy(old_name_cs_filename, old_name,
-				MAX_FULL_NAME_LEN);
+			strcpy(old_name_cs_filename, old_name);
 			old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0';
 			if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) {
 
@@ -1795,8 +1782,7 @@
 				} else {
 					/* Old name already in
 					my_charset_filename */
-					strncpy(old_name_cs_filename, old_name,
-						MAX_FULL_NAME_LEN);
+					strcpy(old_name_cs_filename, old_name);
 					old_name_cs_filename[MAX_FULL_NAME_LEN]
 						= '\0';
 				}
@@ -2083,181 +2069,6 @@
 	return(FALSE);
 }
 
-bool dict_index_t::rec_potentially_too_big(bool strict) const
-{
-	ut_ad(table);
-
-	ulint	comp;
-	ulint	i;
-	/* maximum possible storage size of a record */
-	ulint	rec_max_size;
-	/* maximum allowed size of a record on a leaf page */
-	ulint	page_rec_max;
-	/* maximum allowed size of a node pointer record */
-	ulint	page_ptr_max;
-
-	/* FTS index consists of auxiliary tables, they shall be excluded from
-	index row size check */
-	if (type & DICT_FTS) {
-		return false;
-	}
-
-	DBUG_EXECUTE_IF(
-		"ib_force_create_table",
-		return(FALSE););
-
-	comp = dict_table_is_comp(table);
-
-	const page_size_t page_size(dict_tf_get_page_size(table->flags));
-
-        if (page_size.is_compressed()
-	    && page_size.physical() < srv_page_size) {
-		/* On a compressed page, two records must fit in the
-		uncompressed page modification log. On compressed pages
-		with size.physical() == srv_page_size,
-		this limit will never be reached. */
-		ut_ad(comp);
-		/* The maximum allowed record size is the size of
-		an empty page, minus a byte for recoding the heap
-		number in the page modification log.  The maximum
-		allowed node pointer size is half that. */
-		page_rec_max = page_zip_empty_size(n_fields,
-						   page_size.physical());
-		if (page_rec_max) {
-			page_rec_max--;
-		}
-		page_ptr_max = page_rec_max / 2;
-		/* On a compressed page, there is a two-byte entry in
-		the dense page directory for every record.  But there
-		is no record header. */
-		rec_max_size = 2;
-	} else {
-		/* The maximum allowed record size is half a B-tree
-		page(16k for 64k page size).  No additional sparse
-		page directory entry will be generated for the first
-		few user records. */
-		page_rec_max = (comp || srv_page_size < UNIV_PAGE_SIZE_MAX)
-			? page_get_free_space_of_empty(comp) / 2
-			: REDUNDANT_REC_MAX_DATA_SIZE;
-
-		page_ptr_max = page_rec_max;
-		/* Each record has a header. */
-		rec_max_size = comp
-			? REC_N_NEW_EXTRA_BYTES
-			: REC_N_OLD_EXTRA_BYTES;
-	}
-
-	if (comp) {
-		/* Include the "null" flags in the
-		maximum possible record size. */
-                rec_max_size += UT_BITS_IN_BYTES(unsigned(n_nullable));
-	} else {
-                /* For each column, include a 2-byte offset and a
-		"null" flag.  The 1-byte format is only used in short
-		records that do not contain externally stored columns.
-		Such records could never exceed the page limit, even
-		when using the 2-byte format. */
-		rec_max_size += 2 * unsigned(n_fields);
-	}
-
-	const ulint max_local_len = table->get_overflow_field_local_len();
-
-        /* Compute the maximum possible record size. */
-	for (i = 0; i < n_fields; i++) {
-		const dict_field_t*	field
-			= dict_index_get_nth_field(this, i);
-		const dict_col_t*	col
-			= dict_field_get_col(field);
-
-		/* In dtuple_convert_big_rec(), variable-length columns
-		that are longer than BTR_EXTERN_LOCAL_STORED_MAX_SIZE
-		may be chosen for external storage.
-
-		Fixed-length columns, and all columns of secondary
-		index records are always stored inline. */
-
-		/* Determine the maximum length of the index field.
-		The field_ext_max_size should be computed as the worst
-		case in rec_get_converted_size_comp() for
-		REC_STATUS_ORDINARY records. */
-
-		size_t field_max_size = dict_col_get_fixed_size(col, comp);
-		if (field_max_size && field->fixed_len != 0) {
-			/* dict_index_add_col() should guarantee this */
-			ut_ad(!field->prefix_len
-			      || field->fixed_len == field->prefix_len);
-			/* Fixed lengths are not encoded
-			in ROW_FORMAT=COMPACT. */
-			goto add_field_size;
-		}
-
-		field_max_size = dict_col_get_max_size(col);
-
-		if (field->prefix_len) {
-			if (field->prefix_len < field_max_size) {
-				field_max_size = field->prefix_len;
-			}
-
-		// those conditions were copied from dtuple_convert_big_rec()
-		} else if (field_max_size > max_local_len
-			   && field_max_size > BTR_EXTERN_LOCAL_STORED_MAX_SIZE
-			   && DATA_BIG_COL(col)
-			   && dict_index_is_clust(this)) {
-
-			/* In the worst case, we have a locally stored
-			column of BTR_EXTERN_LOCAL_STORED_MAX_SIZE bytes.
-			The length can be stored in one byte.  If the
-			column were stored externally, the lengths in
-			the clustered index page would be
-			BTR_EXTERN_FIELD_REF_SIZE and 2. */
-			field_max_size = max_local_len;
-		}
-
-		if (comp) {
-			/* Add the extra size for ROW_FORMAT=COMPACT.
-			For ROW_FORMAT=REDUNDANT, these bytes were
-			added to rec_max_size before this loop. */
-			rec_max_size += field_max_size < 256 ? 1 : 2;
-		}
-add_field_size:
-		rec_max_size += field_max_size;
-
-		/* Check the size limit on leaf pages. */
-		if (rec_max_size >= page_rec_max) {
-			// with 4k page size innodb_index_stats becomes too big
-			// this crutch allows server bootstrapping to continue
-			if (table->is_system_db) {
-				return false;
-			}
-
-			ib::error_or_warn(strict)
-				<< "Cannot add field " << field->name
-				<< " in table " << table->name
-				<< " because after adding it, the row size is "
-				<< rec_max_size
-				<< " which is greater than maximum allowed"
-				" size (" << page_rec_max
-				<< ") for a record on index leaf page.";
-
-			return true;
-		}
-
-		/* Check the size limit on non-leaf pages.  Records
-		stored in non-leaf B-tree pages consist of the unique
-		columns of the record (the key columns of the B-tree)
-		and a node pointer field.  When we have processed the
-		unique columns, rec_max_size equals the size of the
-		node pointer record minus the node pointer column. */
-		if (i + 1 == dict_index_get_n_unique_in_tree(this)
-		    && rec_max_size + REC_NODE_PTR_SIZE >= page_ptr_max) {
-
-			return true;
-		}
-	}
-
-	return false;
-}
-
 /** Clears the virtual column's index list before index is
 being freed.
 @param[in]  index   Index being freed */
@@ -2298,23 +2109,15 @@
 
 /** Adds an index to the dictionary cache, with possible indexing newly
 added column.
-@param[in]	index	index; NOTE! The index memory
+@param[in,out]	index	index; NOTE! The index memory
 			object is freed in this function!
 @param[in]	page_no	root page number of the index
-@param[in]	strict	TRUE=refuse to create the index
-			if records could be too big to fit in
-			an B-tree page
-@param[out]	err	DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION
-@param[in]	add_v	new virtual column that being added along with
-			an add index call
-@return	the added index
-@retval	NULL	on error */
-dict_index_t*
+@param[in]	add_v	virtual columns being added along with ADD INDEX
+@return DB_SUCCESS, or DB_CORRUPTION */
+dberr_t
 dict_index_add_to_cache(
-	dict_index_t*		index,
+	dict_index_t*&		index,
 	ulint			page_no,
-	bool			strict,
-	dberr_t*		err,
 	const dict_add_v_col_t* add_v)
 {
 	dict_index_t*	new_index;
@@ -2335,8 +2138,8 @@
 	if (!dict_index_find_cols(index, add_v)) {
 
 		dict_mem_index_free(index);
-		if (err) *err = DB_CORRUPTION;
-		return NULL;
+		index = NULL;
+		return DB_CORRUPTION;
 	}
 
 	/* Build the cache internal representation of the index,
@@ -2363,20 +2166,6 @@
 	new_index->disable_ahi = index->disable_ahi;
 #endif
 
-	if (new_index->rec_potentially_too_big(strict)) {
-
-		if (strict) {
-			dict_mem_index_free(new_index);
-			dict_mem_index_free(index);
-			if (err) *err = DB_TOO_BIG_RECORD;
-			return NULL;
-		} else if (current_thd != NULL) {
-			/* Avoid the warning to be printed
-			during recovery. */
-			ib_warn_row_too_big(index->table);
-		}
-	}
-
 	n_ord = new_index->n_uniq;
 	/* Flag the ordering columns and also set column max_prefix */
 
@@ -2447,8 +2236,8 @@
 	new_index->n_core_fields = new_index->n_fields;
 
 	dict_mem_index_free(index);
-	if (err) *err = DB_SUCCESS;
-	return new_index;
+	index = new_index;
+	return DB_SUCCESS;
 }
 
 /**********************************************************************//**
@@ -2803,30 +2592,6 @@
 	dict_table_copy_v_types(tuple, table);
 }
 
-/********************************************************************
-Wait until all the background threads of the given table have exited, i.e.,
-bg_threads == 0. Note: bg_threads_mutex must be reserved when
-calling this. */
-void
-dict_table_wait_for_bg_threads_to_exit(
-/*===================================*/
-	dict_table_t*	table,	/*< in: table */
-	ulint		delay)	/*< in: time in microseconds to wait between
-				checks of bg_threads. */
-{
-	fts_t*		fts = table->fts;
-
-	ut_ad(mutex_own(&fts->bg_threads_mutex));
-
-	while (fts->bg_threads > 0) {
-		mutex_exit(&fts->bg_threads_mutex);
-
-		os_thread_sleep(delay);
-
-		mutex_enter(&fts->bg_threads_mutex);
-	}
-}
-
 /*******************************************************************//**
 Builds the internal dictionary cache representation for a clustered
 index, containing also system fields not defined by the user.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0load.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0load.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0load.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0load.cc	2020-01-26 18:37:29.000000000 +0000
@@ -43,8 +43,7 @@
 #include "rem0cmp.h"
 #include "srv0start.h"
 #include "srv0srv.h"
-#include 
-#include 
+#include "fts0opt.h"
 
 /** Following are the InnoDB system tables. The positions in
 this array are referenced by enum dict_system_table_id. */
@@ -69,7 +68,6 @@
 key constraints are loaded into memory.
 
 @param[in]	name		Table name in the db/tablename format
-@param[in]	cached		true=add to cache, false=do not
 @param[in]	ignore_err	Error to be ignored when loading table
 				and its index definition
 @param[out]	fk_tables	Related table names that must also be
@@ -82,7 +80,6 @@
 dict_table_t*
 dict_load_table_one(
 	const table_name_t&	name,
-	bool			cached,
 	dict_err_ignore_t	ignore_err,
 	dict_names_t&		fk_tables);
 
@@ -2577,8 +2574,9 @@
 			and simply did not load this index definition, the
 			.frm file would disagree with the index definitions
 			inside InnoDB. */
-			if (!dict_index_add_to_cache(
-				    index, index->page, false, &error)) {
+			if ((error = dict_index_add_to_cache(index,
+							     index->page))
+			    != DB_SUCCESS) {
 				goto func_exit;
 			}
 		}
@@ -2731,17 +2729,12 @@
 all foreign key constraints where the foreign key is in the table or where
 a foreign key references columns in this table.
 @param[in]	name		Table name in the dbname/tablename format
-@param[in]	cached		true=add to cache, false=do not
 @param[in]	ignore_err	Error to be ignored when loading
 				table and its index definition
 @return table, NULL if does not exist; if the table is stored in an
 .ibd file, but the file does not exist, then we set the file_unreadable
 flag in the table object we return. */
-dict_table_t*
-dict_load_table(
-	const char*	name,
-	bool		cached,
-	dict_err_ignore_t ignore_err)
+dict_table_t* dict_load_table(const char* name, dict_err_ignore_t ignore_err)
 {
 	dict_names_t			fk_list;
 	dict_table_t*			result;
@@ -2756,12 +2749,12 @@
 
 	if (!result) {
 		result = dict_load_table_one(const_cast(name),
-					     cached, ignore_err, fk_list);
+					     ignore_err, fk_list);
 		while (!fk_list.empty()) {
 			if (!dict_table_check_if_in_cache_low(fk_list.front()))
 				dict_load_table_one(
 					const_cast(fk_list.front()),
-					cached, ignore_err, fk_list);
+					ignore_err, fk_list);
 			fk_list.pop_front();
 		}
 	}
@@ -2854,7 +2847,6 @@
 key constraints are loaded into memory.
 
 @param[in]	name		Table name in the db/tablename format
-@param[in]	cached		true=add to cache, false=do not
 @param[in]	ignore_err	Error to be ignored when loading table
 				and its index definition
 @param[out]	fk_tables	Related table names that must also be
@@ -2867,7 +2859,6 @@
 dict_table_t*
 dict_load_table_one(
 	const table_name_t&	name,
-	bool			cached,
 	dict_err_ignore_t	ignore_err,
 	dict_names_t&		fk_tables)
 {
@@ -2956,10 +2947,8 @@
 
 	dict_table_add_system_columns(table, heap);
 
-	if (cached) {
-		table->can_be_evicted = true;
-		table->add_to_cache();
-	}
+	table->can_be_evicted = true;
+	table->add_to_cache();
 
 	mem_heap_empty(heap);
 
@@ -2997,7 +2986,7 @@
 		}
 	}
 
-	if (err == DB_SUCCESS && cached && table->is_readable()) {
+	if (err == DB_SUCCESS && table->is_readable()) {
 		if (table->space && !fil_space_get_size(table->space_id)) {
 corrupted:
 			table->corrupted = true;
@@ -3042,7 +3031,7 @@
 	of the error condition, since the user may want to dump data from the
 	clustered index. However we load the foreign key information only if
 	all indexes were loaded. */
-	if (!cached || !table->is_readable()) {
+	if (!table->is_readable()) {
 		/* Don't attempt to load the indexes from disk. */
 	} else if (err == DB_SUCCESS) {
 		err = dict_load_foreigns(table->name.m_name, NULL,
@@ -3099,8 +3088,12 @@
 			FTS */
 			fts_optimize_remove_table(table);
 			fts_free(table);
-		} else {
+		} else if (fts_optimize_wq) {
 			fts_optimize_add_table(table);
+		} else if (table->can_be_evicted) {
+			/* fts_optimize_thread is not started yet.
+			So make the table as non-evictable from cache. */
+			dict_table_move_from_lru_to_non_lru(table);
 		}
 	}
 
@@ -3194,7 +3187,7 @@
 				/* Load the table definition to memory */
 				char*	table_name = mem_heap_strdupl(
 					heap, (char*) field, len);
-				table = dict_load_table(table_name, true, ignore_err);
+				table = dict_load_table(table_name, ignore_err);
 			}
 		}
 	}
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0mem.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0mem.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0mem.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0mem.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1453,7 +1453,7 @@
 bool
 dict_index_t::vers_history_row(
 	const rec_t*		rec,
-	const ulint*		offsets)
+	const offset_t*		offsets)
 {
 	ut_ad(is_primary());
 
@@ -1484,8 +1484,8 @@
 	bool error = false;
 	mem_heap_t* heap = NULL;
 	dict_index_t* clust_index = NULL;
-	ulint offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint* offsets = offsets_;
+	offset_t offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t* offsets = offsets_;
 	rec_offs_init(offsets_);
 
 	mtr_t mtr;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/dict/dict0stats.cc mariadb-10.3-10.3.22/storage/innobase/dict/dict0stats.cc
--- mariadb-10.3-10.3.18/storage/innobase/dict/dict0stats.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/dict/dict0stats.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2009, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, 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
@@ -854,10 +854,8 @@
 		mtr_t	mtr;
 		ulint	size;
 
-		mtr_start(&mtr);
-
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
-
+		mtr.start();
+		mtr_s_lock_index(index, &mtr);
 		size = btr_get_size(index, BTR_TOTAL_SIZE, &mtr);
 
 		if (size != ULINT_UNDEFINED) {
@@ -867,7 +865,7 @@
 				index, BTR_N_LEAF_PAGES, &mtr);
 		}
 
-		mtr_commit(&mtr);
+		mtr.commit();
 
 		switch (size) {
 		case ULINT_UNDEFINED:
@@ -1016,8 +1014,8 @@
 	bool		prev_rec_is_copied;
 	byte*		prev_rec_buf = NULL;
 	ulint		prev_rec_buf_size = 0;
-	ulint*		rec_offsets;
-	ulint*		prev_rec_offsets;
+	offset_t*	rec_offsets;
+	offset_t*	prev_rec_offsets;
 	ulint		i;
 
 	DEBUG_PRINTF("    %s(table=%s, index=%s, level=" ULINTPF ")\n",
@@ -1038,9 +1036,9 @@
 	i = (REC_OFFS_HEADER_SIZE + 1 + 1) + n_uniq;
 
 	heap = mem_heap_create((2 * sizeof *rec_offsets) * i);
-	rec_offsets = static_cast(
+	rec_offsets = static_cast(
 		mem_heap_alloc(heap, i * sizeof *rec_offsets));
-	prev_rec_offsets = static_cast(
+	prev_rec_offsets = static_cast(
 		mem_heap_alloc(heap, i * sizeof *prev_rec_offsets));
 	rec_offs_set_n_alloc(rec_offsets, i);
 	rec_offs_set_n_alloc(prev_rec_offsets, i);
@@ -1171,13 +1169,9 @@
 				prev_rec, index, prev_rec_offsets, !level,
 				n_uniq, &heap);
 
-			cmp_rec_rec_with_match(rec,
-					       prev_rec,
-					       rec_offsets,
-					       prev_rec_offsets,
-					       index,
-					       FALSE,
-					       &matched_fields);
+			cmp_rec_rec(prev_rec, rec,
+				    prev_rec_offsets, rec_offsets, index,
+				    false, &matched_fields);
 
 			for (i = matched_fields; i < n_uniq; i++) {
 
@@ -1333,11 +1327,11 @@
 @return offsets1 or offsets2 (the offsets of *out_rec),
 or NULL if the page is empty and does not contain user records. */
 UNIV_INLINE
-ulint*
+offset_t*
 dict_stats_scan_page(
 	const rec_t**		out_rec,
-	ulint*			offsets1,
-	ulint*			offsets2,
+	offset_t*		offsets1,
+	offset_t*		offsets2,
 	const dict_index_t*	index,
 	const page_t*		page,
 	ulint			n_prefix,
@@ -1345,8 +1339,8 @@
 	ib_uint64_t*		n_diff,
 	ib_uint64_t*		n_external_pages)
 {
-	ulint*		offsets_rec		= offsets1;
-	ulint*		offsets_next_rec	= offsets2;
+	offset_t*	offsets_rec		= offsets1;
+	offset_t*	offsets_next_rec	= offsets2;
 	const rec_t*	rec;
 	const rec_t*	next_rec;
 	/* A dummy heap, to be passed to rec_get_offsets().
@@ -1397,9 +1391,8 @@
 
 		/* check whether rec != next_rec when looking at
 		the first n_prefix fields */
-		cmp_rec_rec_with_match(rec, next_rec,
-				       offsets_rec, offsets_next_rec,
-				       index, FALSE, &matched_fields);
+		cmp_rec_rec(rec, next_rec, offsets_rec, offsets_next_rec,
+			    index, false, &matched_fields);
 
 		if (matched_fields < n_prefix) {
 			/* rec != next_rec, => rec is non-boring */
@@ -1412,23 +1405,16 @@
 		}
 
 		rec = next_rec;
-		{
-			/* Assign offsets_rec = offsets_next_rec
-			so that offsets_rec matches with rec which
-			was just assigned rec = next_rec above.
-			Also need to point offsets_next_rec to the
-			place where offsets_rec was pointing before
-			because we have just 2 placeholders where
-			data is actually stored:
-			offsets1 and offsets2 and we
-			are using them in circular fashion
-			(offsets[_next]_rec are just pointers to
-			those placeholders). */
-			ulint*	offsets_tmp;
-			offsets_tmp = offsets_rec;
-			offsets_rec = offsets_next_rec;
-			offsets_next_rec = offsets_tmp;
-		}
+		/* Assign offsets_rec = offsets_next_rec so that
+		offsets_rec matches with rec which was just assigned
+		rec = next_rec above.  Also need to point
+		offsets_next_rec to the place where offsets_rec was
+		pointing before because we have just 2 placeholders
+		where data is actually stored: offsets1 and offsets2
+		and we are using them in circular fashion
+		(offsets[_next]_rec are just pointers to those
+		placeholders). */
+		std::swap(offsets_rec, offsets_next_rec);
 
 		if (should_count_external_pages) {
 			*n_external_pages += btr_rec_get_externally_stored_len(
@@ -1467,9 +1453,9 @@
 	const page_t*	page;
 	mem_heap_t*	heap;
 	const rec_t*	rec;
-	ulint*		offsets1;
-	ulint*		offsets2;
-	ulint*		offsets_rec;
+	offset_t*	offsets1;
+	offset_t*	offsets2;
+	offset_t*	offsets_rec;
 	ulint		size;
 	mtr_t		mtr;
 
@@ -1487,10 +1473,10 @@
 
 	heap = mem_heap_create(size * (sizeof *offsets1 + sizeof *offsets2));
 
-	offsets1 = static_cast(mem_heap_alloc(
+	offsets1 = static_cast(mem_heap_alloc(
 			heap, size * sizeof *offsets1));
 
-	offsets2 = static_cast(mem_heap_alloc(
+	offsets2 = static_cast(mem_heap_alloc(
 			heap, size * sizeof *offsets2));
 
 	rec_offs_set_n_alloc(offsets1, size);
@@ -1748,8 +1734,8 @@
 		ut_a(left <= right);
 		ut_a(right <= last_idx_on_level);
 
-		const ulint	rnd = right == left ? 0 :
-			ut_rnd_gen_ulint() % (right - left);
+		const ulint	rnd = ut_rnd_interval(
+			static_cast(right - left));
 
 		const ib_uint64_t	dive_below_idx
 			= boundaries->at(static_cast(left + rnd));
@@ -1929,10 +1915,8 @@
 
 	dict_stats_empty_index(index, false);
 
-	mtr_start(&mtr);
-
-	mtr_s_lock(dict_index_get_lock(index), &mtr);
-
+	mtr.start();
+	mtr_s_lock_index(index, &mtr);
 	size = btr_get_size(index, BTR_TOTAL_SIZE, &mtr);
 
 	if (size != ULINT_UNDEFINED) {
@@ -1941,7 +1925,7 @@
 	}
 
 	/* Release the X locks on the root page taken by btr_get_size() */
-	mtr_commit(&mtr);
+	mtr.commit();
 
 	switch (size) {
 	case ULINT_UNDEFINED:
@@ -1954,10 +1938,8 @@
 
 	index->stat_n_leaf_pages = size;
 
-	mtr_start(&mtr);
-
-	mtr_sx_lock(dict_index_get_lock(index), &mtr);
-
+	mtr.start();
+	mtr_sx_lock_index(index, &mtr);
 	root_level = btr_height_get(index, &mtr);
 
 	n_uniq = dict_index_get_n_unique(index);
@@ -1997,7 +1979,7 @@
 			index->stat_n_sample_sizes[i] = total_pages;
 		}
 
-		mtr_commit(&mtr);
+		mtr.commit();
 
 		dict_stats_assert_initialized_index(index);
 		DBUG_VOID_RETURN;
@@ -2043,9 +2025,9 @@
 
 		/* Commit the mtr to release the tree S lock to allow
 		other threads to do some work too. */
-		mtr_commit(&mtr);
-		mtr_start(&mtr);
-		mtr_sx_lock(dict_index_get_lock(index), &mtr);
+		mtr.commit();
+		mtr.start();
+		mtr_sx_lock_index(index, &mtr);
 		if (root_level != btr_height_get(index, &mtr)) {
 			/* Just quit if the tree has changed beyond
 			recognition here. The old stats from previous
@@ -2183,7 +2165,7 @@
 			data, &mtr);
 	}
 
-	mtr_commit(&mtr);
+	mtr.commit();
 
 	UT_DELETE_ARRAY(n_diff_boundaries);
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/eval/eval0eval.cc mariadb-10.3-10.3.22/storage/innobase/eval/eval0eval.cc
--- mariadb-10.3-10.3.18/storage/innobase/eval/eval0eval.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/eval/eval0eval.cc	2020-01-26 18:37:29.000000000 +0000
@@ -30,9 +30,6 @@
 #include "row0sel.h"
 #include "rem0cmp.h"
 
-/** The RND function seed */
-static ulint	eval_rnd	= 128367121;
-
 /** Dummy adress used when we should allocate a buffer of size 0 in
 eval_node_alloc_val_buf */
 
@@ -310,120 +307,18 @@
 /*===========*/
 	func_node_t*	node)	/*!< in: aggregate operation node */
 {
-	que_node_t*	arg;
 	lint		val;
-	lint		arg_val;
-	int		func;
 
 	ut_ad(que_node_get_type(node) == QUE_NODE_FUNC);
 
 	val = eval_node_get_int_val(node);
 
-	func = node->func;
-
-	if (func == PARS_COUNT_TOKEN) {
-
-		val = val + 1;
-	} else {
-		ut_ad(func == PARS_SUM_TOKEN);
-
-		arg = node->args;
-		arg_val = eval_node_get_int_val(arg);
-
-		val = val + arg_val;
-	}
-
+	ut_a(node->func == PARS_COUNT_TOKEN);
+	val = val + 1;
 	eval_node_set_int_val(node, val);
 }
 
 /*****************************************************************//**
-Evaluates a predefined function node where the function is not relevant
-in benchmarks. */
-static
-void
-eval_predefined_2(
-/*==============*/
-	func_node_t*	func_node)	/*!< in: predefined function node */
-{
-	que_node_t*	arg;
-	que_node_t*	arg1;
-	que_node_t*	arg2 = 0; /* remove warning (??? bug ???) */
-	lint		int_val;
-	byte*		data;
-	ulint		len1;
-	ulint		len2;
-	int		func;
-	ulint		i;
-
-	ut_ad(que_node_get_type(func_node) == QUE_NODE_FUNC);
-
-	arg1 = func_node->args;
-
-	if (arg1) {
-		arg2 = que_node_get_next(arg1);
-	}
-
-	func = func_node->func;
-
-	if (func == PARS_PRINTF_TOKEN) {
-
-		arg = arg1;
-
-		while (arg) {
-			dfield_print(que_node_get_val(arg));
-
-			arg = que_node_get_next(arg);
-		}
-
-		putc('\n', stderr);
-
-	} else if (func == PARS_ASSERT_TOKEN) {
-
-		if (!eval_node_get_ibool_val(arg1)) {
-			fputs("SQL assertion fails in a stored procedure!\n",
-			      stderr);
-		}
-
-		ut_a(eval_node_get_ibool_val(arg1));
-
-		/* This function, or more precisely, a debug procedure,
-		returns no value */
-
-	} else if (func == PARS_RND_TOKEN) {
-
-		len1 = (ulint) eval_node_get_int_val(arg1);
-		len2 = (ulint) eval_node_get_int_val(arg2);
-
-		ut_ad(len2 >= len1);
-
-		if (len2 > len1) {
-			int_val = (lint) (len1
-					  + (eval_rnd % (len2 - len1 + 1)));
-		} else {
-			int_val = (lint) len1;
-		}
-
-		eval_rnd = ut_rnd_gen_next_ulint(eval_rnd);
-
-		eval_node_set_int_val(func_node, int_val);
-
-	} else if (func == PARS_RND_STR_TOKEN) {
-
-		len1 = (ulint) eval_node_get_int_val(arg1);
-
-		data = eval_node_ensure_val_buf(func_node, len1);
-
-		for (i = 0; i < len1; i++) {
-			data[i] = (byte)(97 + (eval_rnd % 3));
-
-			eval_rnd = ut_rnd_gen_next_ulint(eval_rnd);
-		}
-	} else {
-		ut_error;
-	}
-}
-
-/*****************************************************************//**
 Evaluates a notfound-function node. */
 UNIV_INLINE
 void
@@ -494,46 +389,6 @@
 }
 
 /*****************************************************************//**
-Evaluates a replstr-procedure node. */
-static
-void
-eval_replstr(
-/*=========*/
-	func_node_t*	func_node)	/*!< in: function node */
-{
-	que_node_t*	arg1;
-	que_node_t*	arg2;
-	que_node_t*	arg3;
-	que_node_t*	arg4;
-	byte*		str1;
-	byte*		str2;
-	ulint		len1;
-	ulint		len2;
-
-	arg1 = func_node->args;
-	arg2 = que_node_get_next(arg1);
-
-	ut_ad(que_node_get_type(arg1) == QUE_NODE_SYMBOL);
-
-	arg3 = que_node_get_next(arg2);
-	arg4 = que_node_get_next(arg3);
-
-	str1 = static_cast(dfield_get_data(que_node_get_val(arg1)));
-	str2 = static_cast(dfield_get_data(que_node_get_val(arg2)));
-
-	len1 = (ulint) eval_node_get_int_val(arg3);
-	len2 = (ulint) eval_node_get_int_val(arg4);
-
-	if ((dfield_get_len(que_node_get_val(arg1)) < len1 + len2)
-	    || (dfield_get_len(que_node_get_val(arg2)) < len2)) {
-
-		ut_error;
-	}
-
-	ut_memcpy(str1 + len1, str2, len2);
-}
-
-/*****************************************************************//**
 Evaluates an instr-function node. */
 static
 void
@@ -607,44 +462,6 @@
 
 /*****************************************************************//**
 Evaluates a predefined function node. */
-UNIV_INLINE
-void
-eval_binary_to_number(
-/*==================*/
-	func_node_t*	func_node)	/*!< in: function node */
-{
-	que_node_t*	arg1;
-	dfield_t*	dfield;
-	byte*		str1;
-	byte*		str2;
-	ulint		len1;
-	ulint		int_val;
-
-	arg1 = func_node->args;
-
-	dfield = que_node_get_val(arg1);
-
-	str1 = static_cast(dfield_get_data(dfield));
-	len1 = dfield_get_len(dfield);
-
-	if (len1 > 4) {
-		ut_error;
-	}
-
-	if (len1 == 4) {
-		str2 = str1;
-	} else {
-		int_val = 0;
-		str2 = (byte*) &int_val;
-
-		ut_memcpy(str2 + (4 - len1), str1, len1);
-	}
-
-	eval_node_copy_and_alloc_val(func_node, str2, 4);
-}
-
-/*****************************************************************//**
-Evaluates a predefined function node. */
 static
 void
 eval_concat(
@@ -734,95 +551,12 @@
 }
 
 /*****************************************************************//**
-Evaluates a predefined function node. */
-UNIV_INLINE
-void
-eval_predefined(
-/*============*/
-	func_node_t*	func_node)	/*!< in: function node */
+Evaluate LENGTH(). */
+inline void eval_length(func_node_t* func_node)
 {
-	que_node_t*	arg1;
-	lint		int_val;
-	byte*		data;
-	int		func;
-
-	func = func_node->func;
-
-	arg1 = func_node->args;
-
-	if (func == PARS_LENGTH_TOKEN) {
-
-		int_val = (lint) dfield_get_len(que_node_get_val(arg1));
-
-	} else if (func == PARS_TO_CHAR_TOKEN) {
-
-		/* Convert number to character string as a
-		signed decimal integer. */
-
-		ulint	uint_val;
-		int	int_len;
-
-		int_val = eval_node_get_int_val(arg1);
-
-		/* Determine the length of the string. */
-
-		if (int_val == 0) {
-			int_len = 1; /* the number 0 occupies 1 byte */
-		} else {
-			int_len = 0;
-			if (int_val < 0) {
-				uint_val = ((ulint) -int_val - 1) + 1;
-				int_len++; /* reserve space for minus sign */
-			} else {
-				uint_val = (ulint) int_val;
-			}
-			for (; uint_val > 0; int_len++) {
-				uint_val /= 10;
-			}
-		}
-
-		/* allocate the string */
-		data = eval_node_ensure_val_buf(func_node, ulint(int_len) + 1);
-
-		/* add terminating NUL character */
-		data[int_len] = 0;
-
-		/* convert the number */
-
-		if (int_val == 0) {
-			data[0] = '0';
-		} else {
-			int tmp;
-			if (int_val < 0) {
-				data[0] = '-'; /* preceding minus sign */
-				uint_val = ((ulint) -int_val - 1) + 1;
-			} else {
-				uint_val = (ulint) int_val;
-			}
-			for (tmp = int_len; uint_val > 0; uint_val /= 10) {
-				data[--tmp] = (byte)
-					('0' + (byte)(uint_val % 10));
-			}
-		}
-
-		dfield_set_len(que_node_get_val(func_node), ulint(int_len));
-
-		return;
-
-	} else if (func == PARS_TO_NUMBER_TOKEN) {
-
-		int_val = atoi((char*)
-			       dfield_get_data(que_node_get_val(arg1)));
-
-	} else if (func == PARS_SYSDATE_TOKEN) {
-		int_val = (lint) time(NULL);
-	} else {
-		eval_predefined_2(func_node);
-
-		return;
-	}
-
-	eval_node_set_int_val(func_node, int_val);
+	eval_node_set_int_val(func_node,
+			      dfield_get_len(que_node_get_val
+					     (func_node->args)));
 }
 
 /*****************************************************************//**
@@ -851,8 +585,7 @@
 
 		if (dfield_is_null(que_node_get_val(arg))
 		    && (fclass != PARS_FUNC_CMP)
-		    && (func != PARS_NOTFOUND_TOKEN)
-		    && (func != PARS_PRINTF_TOKEN)) {
+		    && (func != PARS_NOTFOUND_TOKEN)) {
 			ut_error;
 		}
 
@@ -877,24 +610,20 @@
 		case PARS_SUBSTR_TOKEN:
 			eval_substr(func_node);
 			return;
-		case PARS_REPLSTR_TOKEN:
-			eval_replstr(func_node);
-			return;
 		case PARS_INSTR_TOKEN:
 			eval_instr(func_node);
 			return;
-		case PARS_BINARY_TO_NUMBER_TOKEN:
-			eval_binary_to_number(func_node);
-			return;
 		case PARS_CONCAT_TOKEN:
 			eval_concat(func_node);
 			return;
 		case PARS_TO_BINARY_TOKEN:
 			eval_to_binary(func_node);
 			return;
-		default:
-			eval_predefined(func_node);
+		case PARS_LENGTH_TOKEN:
+			eval_length(func_node);
 			return;
+		default:
+			ut_error;
 		}
 	case PARS_FUNC_LOGICAL:
 		eval_logical(func_node);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fil/fil0crypt.cc mariadb-10.3-10.3.22/storage/innobase/fil/fil0crypt.cc
--- mariadb-10.3-10.3.18/storage/innobase/fil/fil0crypt.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fil/fil0crypt.cc	2020-01-26 18:37:29.000000000 +0000
@@ -792,7 +792,6 @@
 @param[in]	space			Tablespace
 @param[in]	tmp_frame		Temporary buffer used for decrypting
 @param[in,out]	src_frame		Page to decrypt
-@param[out]	decrypted		true if page was decrypted
 @return decrypted page, or original not encrypted page if decryption is
 not needed.*/
 UNIV_INTERN
@@ -800,13 +799,11 @@
 fil_space_decrypt(
 	const fil_space_t* space,
 	byte*		tmp_frame,
-	byte*		src_frame,
-	bool*		decrypted)
+	byte*		src_frame)
 {
 	dberr_t err = DB_SUCCESS;
 	byte* res = NULL;
 	const page_size_t page_size(space->flags);
-	*decrypted = false;
 
 	ut_ad(space->crypt_data != NULL && space->crypt_data->is_encrypted());
 	ut_ad(space->pending_io());
@@ -816,7 +813,6 @@
 
 	if (err == DB_SUCCESS) {
 		if (encrypted) {
-			*decrypted = true;
 			/* Copy the decrypted page back to page buffer, not
 			really any other options. */
 			memcpy(src_frame, tmp_frame, page_size.physical());
@@ -1770,8 +1766,6 @@
 		return;
 	}
 
-	ut_d(const bool was_free = fseg_page_is_free(space, (uint32_t)offset));
-
 	mtr_t mtr;
 	mtr.start();
 	if (buf_block_t* block = fil_crypt_get_page_throttle(state,
@@ -1786,9 +1780,9 @@
 		if (space->is_stopping()) {
 			/* The tablespace is closing (in DROP TABLE or
 			TRUNCATE TABLE or similar): avoid further access */
-		} else if (!*reinterpret_cast(FIL_PAGE_OFFSET
-							 + frame)) {
-			/* It looks like this page was never
+		} else if (!kv && !*reinterpret_cast
+			   (&frame[FIL_PAGE_TYPE])) {
+			/* It looks like this page is not
 			allocated. Because key rotation is accessing
 			pages in a pattern that is unlike the normal
 			B-tree and undo log access pattern, we cannot
@@ -1798,9 +1792,20 @@
 			tablespace latch before acquiring block->lock,
 			then the fseg_page_is_free() information
 			could be stale already. */
-			ut_ad(was_free);
-			ut_ad(kv == 0);
-			ut_ad(page_get_space_id(frame) == 0);
+
+			/* If the data file was originally created
+			before MariaDB 10.0 or MySQL 5.6, some
+			allocated data pages could carry 0 in
+			FIL_PAGE_TYPE. The FIL_PAGE_TYPE on those
+			pages will be updated in
+			buf_flush_init_for_writing() when the page
+			is modified the next time.
+
+			Also, when the doublewrite buffer pages are
+			allocated on bootstrap in a non-debug build,
+			some dummy pages will be allocated, with 0 in
+			the FIL_PAGE_TYPE. Those pages should be
+			skipped from key rotation forever. */
 		} else if (fil_crypt_needs_rotation(
 				crypt_data,
 				kv,
@@ -2296,8 +2301,8 @@
 			release fil_system.mutex. */
 			space->n_pending_ops++;
 #ifndef DBUG_OFF
-			fil_space_t* s= fil_system.read_page0(
-				space->id);
+			ut_d(const fil_space_t* s=)
+			        fil_system.read_page0(space->id);
 			ut_ad(!s || s == space);
 #endif
 			space->n_pending_ops--;
@@ -2330,7 +2335,7 @@
 			}
 		}
 
-		UT_LIST_ADD_LAST(fil_system.rotation_list, space);
+		fil_system.rotation_list.push_back(*space);
 	}
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fil/fil0fil.cc mariadb-10.3-10.3.22/storage/innobase/fil/fil0fil.cc
--- mariadb-10.3-10.3.18/storage/innobase/fil/fil0fil.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fil/fil0fil.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2019, MariaDB Corporation.
+Copyright (c) 2014, 2020, 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
@@ -155,7 +155,7 @@
 it is an absolute path. */
 const char*	fil_path_to_mysql_datadir;
 
-/** Common InnoDB file extentions */
+/** Common InnoDB file extensions */
 const char* dot_ext[] = { "", ".ibd", ".isl", ".cfg" };
 
 /** The number of fsyncs done to the log */
@@ -861,9 +861,7 @@
 			if (space->is_in_unflushed_spaces()
 			    && fil_space_is_flushed(space)) {
 
-				UT_LIST_REMOVE(
-					fil_system.unflushed_spaces,
-					space);
+				fil_system.unflushed_spaces.remove(*space);
 			}
 		}
 
@@ -1165,7 +1163,7 @@
 		} else if (space->is_in_unflushed_spaces()
 			   && fil_space_is_flushed(space)) {
 
-			UT_LIST_REMOVE(fil_system.unflushed_spaces, space);
+			fil_system.unflushed_spaces.remove(*space);
 		}
 
 		node->close();
@@ -1188,13 +1186,11 @@
 	if (space->is_in_unflushed_spaces()) {
 
 		ut_ad(!fil_buffering_disabled(space));
-
-		UT_LIST_REMOVE(fil_system.unflushed_spaces, space);
+		fil_system.unflushed_spaces.remove(*space);
 	}
 
 	if (space->is_in_rotation_list()) {
-
-		UT_LIST_REMOVE(fil_system.rotation_list, space);
+		fil_system.rotation_list.remove(*space);
 	}
 
 	UT_LIST_REMOVE(fil_system.space_list, space);
@@ -1409,7 +1405,7 @@
 		    srv_encrypt_tables)) {
 		/* Key rotation is not enabled, need to inform background
 		encryption threads. */
-		UT_LIST_ADD_LAST(fil_system.rotation_list, space);
+		fil_system.rotation_list.push_back(*space);
 		mutex_exit(&fil_system.mutex);
 		os_event_set(fil_crypt_threads_event);
 	} else {
@@ -1707,7 +1703,7 @@
 {
 	ut_ad(this == &fil_system);
 	ut_a(!UT_LIST_GET_LEN(LRU));
-	ut_a(!UT_LIST_GET_LEN(unflushed_spaces));
+	ut_a(unflushed_spaces.empty());
 	ut_a(!UT_LIST_GET_LEN(space_list));
 	ut_ad(!sys_space);
 	ut_ad(!temp_space);
@@ -4088,8 +4084,8 @@
 			node->needs_flush = true;
 
 			if (!node->space->is_in_unflushed_spaces()) {
-				UT_LIST_ADD_FIRST(fil_system.unflushed_spaces,
-						  node->space);
+				fil_system.unflushed_spaces.push_front(
+					*node->space);
 			}
 		}
 	}
@@ -4573,7 +4569,6 @@
 fil_flush_file_spaces(
 	fil_type_t	purpose)
 {
-	fil_space_t*	space;
 	ulint*		space_ids;
 	ulint		n_space_ids;
 
@@ -4581,30 +4576,25 @@
 
 	mutex_enter(&fil_system.mutex);
 
-	n_space_ids = UT_LIST_GET_LEN(fil_system.unflushed_spaces);
+	n_space_ids = fil_system.unflushed_spaces.size();
 	if (n_space_ids == 0) {
 
 		mutex_exit(&fil_system.mutex);
 		return;
 	}
 
-	/* Assemble a list of space ids to flush.  Previously, we
-	traversed fil_system.unflushed_spaces and called UT_LIST_GET_NEXT()
-	on a space that was just removed from the list by fil_flush().
-	Thus, the space could be dropped and the memory overwritten. */
 	space_ids = static_cast(
 		ut_malloc_nokey(n_space_ids * sizeof(*space_ids)));
 
 	n_space_ids = 0;
 
-	for (space = UT_LIST_GET_FIRST(fil_system.unflushed_spaces);
-	     space;
-	     space = UT_LIST_GET_NEXT(unflushed_spaces, space)) {
+	for (intrusive::list::iterator it
+	     = fil_system.unflushed_spaces.begin(),
+	     end = fil_system.unflushed_spaces.end();
+	     it != end; ++it) {
 
-		if (space->purpose == purpose
-		    && !space->is_stopping()) {
-
-			space_ids[n_space_ids++] = space->id;
+		if (it->purpose == purpose && !it->is_stopping()) {
+			space_ids[n_space_ids++] = it->id;
 		}
 	}
 
@@ -5222,8 +5212,8 @@
 	ut_ad(space);
 
 	if (!space->referenced() && space->is_in_rotation_list()) {
-		ut_a(UT_LIST_GET_LEN(fil_system.rotation_list) > 0);
-		UT_LIST_REMOVE(fil_system.rotation_list, space);
+		ut_a(!fil_system.rotation_list.empty());
+		fil_system.rotation_list.remove(*space);
 	}
 }
 
@@ -5239,53 +5229,45 @@
 @param[in]	key_version	key version of the key state thread
 @return pointer to the next fil_space_t.
 @retval NULL if this was the last */
-fil_space_t*
-fil_system_t::keyrotate_next(
-	fil_space_t*	prev_space,
-	bool		recheck,
-	uint		key_version)
+fil_space_t *fil_system_t::keyrotate_next(fil_space_t *prev_space,
+                                          bool recheck, uint key_version)
 {
-	mutex_enter(&fil_system.mutex);
+  mutex_enter(&fil_system.mutex);
 
-	/* If one of the encryption threads already started the encryption
-	of the table then don't remove the unencrypted spaces from
-	rotation list
-
-	If there is a change in innodb_encrypt_tables variables value then
-	don't remove the last processed tablespace from the rotation list. */
-	const bool remove = ((!recheck || prev_space->crypt_data)
-			     && (!key_version == !srv_encrypt_tables));
+  /* If one of the encryption threads already started the encryption
+  of the table then don't remove the unencrypted spaces from rotation list
 
-	fil_space_t* space = prev_space;
+  If there is a change in innodb_encrypt_tables variables value then
+  don't remove the last processed tablespace from the rotation list. */
+  const bool remove= (!recheck || prev_space->crypt_data) &&
+                     !key_version == !srv_encrypt_tables;
+  intrusive::list::iterator it=
+      prev_space == NULL ? fil_system.rotation_list.end() : prev_space;
 
-	if (prev_space == NULL) {
-		space = UT_LIST_GET_FIRST(fil_system.rotation_list);
+  if (it == fil_system.rotation_list.end())
+    it= fil_system.rotation_list.begin();
+  else
+  {
+    /* Move on to the next fil_space_t */
+    prev_space->release();
 
-		/* We can trust that space is not NULL because we
-		checked list length above */
-	} else {
-		/* Move on to the next fil_space_t */
-		space->release();
+    ++it;
 
-		space = UT_LIST_GET_NEXT(rotation_list, space);
+    while (it != fil_system.rotation_list.end() &&
+           (UT_LIST_GET_LEN(it->chain) == 0 || it->is_stopping()))
+      ++it;
 
-		while (space != NULL
-		       && (UT_LIST_GET_LEN(space->chain) == 0
-			   || space->is_stopping())) {
-			space = UT_LIST_GET_NEXT(rotation_list, space);
-		}
+    if (remove)
+      fil_space_remove_from_keyrotation(prev_space);
+  }
 
-		if (remove) {
-			fil_space_remove_from_keyrotation(prev_space);
-		}
-	}
+  fil_space_t *space= it == fil_system.rotation_list.end() ? NULL : &*it;
 
-	if (space != NULL) {
-		space->acquire();
-	}
+  if (space)
+    space->acquire();
 
-	mutex_exit(&fil_system.mutex);
-	return(space);
+  mutex_exit(&fil_system.mutex);
+  return space;
 }
 
 /** Determine the block size of the data file.
@@ -5363,18 +5345,21 @@
 
 /** Checks that this tablespace in a list of unflushed tablespaces.
 @return true if in a list */
-bool fil_space_t::is_in_unflushed_spaces() const {
-	ut_ad(mutex_own(&fil_system.mutex));
+bool fil_space_t::is_in_unflushed_spaces() const
+{
+  ut_ad(mutex_own(&fil_system.mutex));
 
-	return fil_system.unflushed_spaces.start == this
-	       || unflushed_spaces.next || unflushed_spaces.prev;
+  return static_cast *>(
+             this)
+      ->next;
 }
 
 /** Checks that this tablespace needs key rotation.
 @return true if in a rotation list */
-bool fil_space_t::is_in_rotation_list() const {
-	ut_ad(mutex_own(&fil_system.mutex));
+bool fil_space_t::is_in_rotation_list() const
+{
+  ut_ad(mutex_own(&fil_system.mutex));
 
-	return fil_system.rotation_list.start == this || rotation_list.next
-	       || rotation_list.prev;
+  return static_cast *>(this)
+      ->next;
 }
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fsp/fsp0fsp.cc mariadb-10.3-10.3.22/storage/innobase/fsp/fsp0fsp.cc
--- mariadb-10.3-10.3.18/storage/innobase/fsp/fsp0fsp.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fsp/fsp0fsp.cc	2020-01-26 18:37:29.000000000 +0000
@@ -657,7 +657,7 @@
 	const page_id_t		page_id(space->id, 0);
 	const page_size_t	page_size(space->flags);
 
-	mtr_x_lock(&space->latch, mtr);
+	mtr_x_lock_space(space, mtr);
 	buf_block_t* block = buf_page_create(page_id, page_size, mtr);
 	buf_page_get(page_id, page_size, RW_SX_LATCH, mtr);
 	buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
@@ -1426,7 +1426,8 @@
 	const ulint	bit = offset % FSP_EXTENT_SIZE;
 
 	xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr);
-	xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr);
+	/* xdes_init() should have set all XDES_CLEAN_BIT */
+	ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit));
 
 	frag_n_used = mtr_read_ulint(header + FSP_FRAG_N_USED, MLOG_4BYTES,
 				     mtr);
@@ -1583,9 +1584,7 @@
 	fsp_header_t*	space_header,
 	mtr_t*		mtr)
 {
-	fseg_inode_t*	inode;
 	buf_block_t*	block;
-	page_t*		page;
 
 	ut_ad(page_offset(space_header) == FSP_HEADER_OFFSET);
 	ut_ad(page_get_space_id(page_align(space_header)) == space->id);
@@ -1603,22 +1602,20 @@
 	buf_block_dbg_add_level(block, SYNC_FSP_PAGE);
 	ut_ad(rw_lock_get_sx_lock_count(&block->lock) == 1);
 
-	page = buf_block_get_frame(block);
-
-	mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_INODE,
+	mlog_write_ulint(block->frame + FIL_PAGE_TYPE, FIL_PAGE_INODE,
 			 MLOG_2BYTES, mtr);
 
-	for (ulint i = 0; i < FSP_SEG_INODES_PER_PAGE(page_size); i++) {
-
-		inode = fsp_seg_inode_page_get_nth_inode(
-			page, i, page_size, mtr);
-
-		mlog_write_ull(inode + FSEG_ID, 0, mtr);
+#ifdef UNIV_DEBUG
+	const byte* inode = FSEG_ID + FSEG_ARR_OFFSET + block->frame;
+	for (ulint i = FSP_SEG_INODES_PER_PAGE(page_size); i--;
+	     inode += FSEG_INODE_SIZE) {
+		ut_ad(!mach_read_from_8(inode));
 	}
+#endif
 
 	flst_add_last(
 		space_header + FSP_SEG_INODES_FREE,
-		page + FSEG_INODE_PAGE_NODE, mtr);
+		block->frame + FSEG_INODE_PAGE_NODE, mtr);
 
 	return(true);
 }
@@ -1947,7 +1944,7 @@
 	ut_ad(byte_offset + FSEG_HEADER_SIZE
 	      <= srv_page_size - FIL_PAGE_DATA_END);
 
-	mtr_x_lock(&space->latch, mtr);
+	mtr_x_lock_space(space, mtr);
 	const page_size_t	page_size(space->flags);
 	ut_d(space->modify_check(*mtr));
 
@@ -2652,7 +2649,7 @@
 	ut_ad(mtr);
 	*n_reserved = n_ext;
 
-	mtr_x_lock(&space->latch, mtr);
+	mtr_x_lock_space(space, mtr);
 	const page_size_t	page_size(space->flags);
 
 	space_header = fsp_get_space_header(space, page_size, mtr);
@@ -2907,7 +2904,8 @@
 	const ulint	bit = offset % FSP_EXTENT_SIZE;
 
 	xdes_set_bit(descr, XDES_FREE_BIT, bit, TRUE, mtr);
-	xdes_set_bit(descr, XDES_CLEAN_BIT, bit, TRUE, mtr);
+	/* xdes_init() should have set all XDES_CLEAN_BIT */
+	ut_ad(xdes_get_bit(descr, XDES_CLEAN_BIT, bit));
 
 	if (xdes_is_free(descr, mtr)) {
 		/* The extent has become free: free it to space */
@@ -2942,7 +2940,7 @@
 	DBUG_ENTER("fseg_free_page");
 	fseg_inode_t*		seg_inode;
 	buf_block_t*		iblock;
-	mtr_x_lock(&space->latch, mtr);
+	mtr_x_lock_space(space, mtr);
 	const page_size_t	page_size(space->flags);
 
 	DBUG_LOG("fseg_free_page", "space_id: " << space->id
@@ -2972,7 +2970,7 @@
 	page_no_t	dpage = xdes_calc_descriptor_page(page_size, page);
 
 	mtr.start();
-	mtr_s_lock(&space->latch, &mtr);
+	mtr_s_lock_space(space, &mtr);
 
 	if (page >= space->free_limit || page >= space->size_in_header) {
 		is_free = true;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fts/fts0config.cc mariadb-10.3-10.3.22/storage/innobase/fts/fts0config.cc
--- mariadb-10.3-10.3.18/storage/innobase/fts/fts0config.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fts/fts0config.cc	2020-01-26 18:37:29.000000000 +0000
@@ -215,8 +215,7 @@
 	pars_info_bind_varchar_literal(info, "value",
 				       value->f_str, value->f_len);
 
-	const bool dict_locked = fts_table->table->fts->fts_status
-		& TABLE_DICT_LOCKED;
+	const bool dict_locked = fts_table->table->fts->dict_locked;
 
 	fts_table->suffix = "CONFIG";
 	fts_get_table_name(fts_table, table_name, dict_locked);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fts/fts0fts.cc mariadb-10.3-10.3.22/storage/innobase/fts/fts0fts.cc
--- mariadb-10.3-10.3.18/storage/innobase/fts/fts0fts.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fts/fts0fts.cc	2020-01-26 18:37:29.000000000 +0000
@@ -459,7 +459,7 @@
 	dberr_t		error = DB_SUCCESS;
 	ibool		ret = TRUE;
 	trx_t*		trx;
-	ibool		has_lock = fts->fts_status & TABLE_DICT_LOCKED;
+	ibool		has_lock = fts->dict_locked;
 
 	trx = trx_create();
 	trx->op_info = "Load user stopword table into FTS cache";
@@ -917,18 +917,16 @@
 	const fts_index_cache_t*index_cache,	/*!< in: FTS index cache */
 	que_t*			graph)		/*!< in: query graph */
 {
-	ibool	has_dict = FALSE;
+	bool	has_dict = FALSE;
 
 	if (fts_table && fts_table->table) {
 		ut_ad(fts_table->table->fts);
 
-		has_dict = fts_table->table->fts->fts_status
-			 & TABLE_DICT_LOCKED;
+		has_dict = fts_table->table->fts->dict_locked;
 	} else if (index_cache) {
 		ut_ad(index_cache->index->table->fts);
 
-		has_dict = index_cache->index->table->fts->fts_status
-			 & TABLE_DICT_LOCKED;
+		has_dict = index_cache->index->table->fts->dict_locked;
 	}
 
 	if (!has_dict) {
@@ -2687,6 +2685,10 @@
 	}
 
 	if (read_only) {
+		/* InnoDB stores actual synced_doc_id value + 1 in
+		FTS_CONFIG table. Reduce the value by 1 while reading
+		after startup. */
+		if (*doc_id) *doc_id -= 1;
 		goto func_exit;
 	}
 
@@ -2780,7 +2782,7 @@
 	pars_info_bind_varchar_literal(info, "doc_id", id, id_len);
 
 	fts_get_table_name(&fts_table, fts_name,
-			   table->fts->fts_status & TABLE_DICT_LOCKED);
+			   table->fts->dict_locked);
 	pars_info_bind_id(info, true, "table_name", fts_name);
 
 	graph = fts_parse_sql(
@@ -2894,7 +2896,7 @@
 	into cache from last crash (delete Doc will not initialize the
 	sync). Avoid any added counter accounting until the FTS cache
 	is re-established and sync-ed */
-	if (table->fts->fts_status & ADDED_TABLE_SYNCED
+	if (table->fts->added_synced
 	    && doc_id > cache->synced_doc_id) {
 		mutex_enter(&table->fts->cache->deleted_lock);
 
@@ -3200,7 +3202,7 @@
 	dict_index_t*	clust_index,	/*!< in: cluster index */
 	btr_pcur_t*	pcur,		/*!< in: cursor whose position
 					has been stored */
-	ulint*		offsets,	/*!< in: offsets */
+	offset_t*	offsets,	/*!< in: offsets */
 	fts_doc_t*	doc)		/*!< out: fts doc to hold parsed
 					documents */
 {
@@ -3357,7 +3359,7 @@
 
        ut_ad(cache->get_docs);
 
-       if (!(ftt->table->fts->fts_status & ADDED_TABLE_SYNCED)) {
+       if (!ftt->table->fts->added_synced) {
                fts_init_index(ftt->table, FALSE);
        }
 
@@ -3442,7 +3444,7 @@
 	/* If Doc ID has been supplied by the user, then the table
 	might not yet be sync-ed */
 
-	if (!(ftt->table->fts->fts_status & ADDED_TABLE_SYNCED)) {
+	if (!ftt->table->fts->added_synced) {
 		fts_init_index(ftt->table, FALSE);
 	}
 
@@ -3484,7 +3486,7 @@
 		btr_pcur_t*	doc_pcur;
 		const rec_t*	clust_rec;
 		btr_pcur_t	clust_pcur;
-		ulint*		offsets = NULL;
+		offset_t*	offsets = NULL;
 		ulint		num_idx = ib_vector_size(cache->get_docs);
 
 		rec = btr_pcur_get_rec(&pcur);
@@ -3675,8 +3677,8 @@
 
 	if (!page_is_empty(btr_pcur_get_page(&pcur))) {
 		const rec_t*    rec = NULL;
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-		ulint*		offsets = offsets_;
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t*	offsets = offsets_;
 		mem_heap_t*	heap = NULL;
 		ulint		len;
 		const void*	data;
@@ -4877,7 +4879,7 @@
 		fts_init_index((dict_table_t*) table, TRUE);
 	}
 
-	table->fts->fts_status |= ADDED_TABLE_SYNCED;
+	table->fts->added_synced = true;
 
 	table->fts->cache->first_doc_id = max_doc_id;
 
@@ -5184,8 +5186,8 @@
 	const byte*	data;
 	ulint		col_no;
 	doc_id_t	doc_id = 0;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets = offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets = offsets_;
 	mem_heap_t*	my_heap = heap;
 
 	ut_a(table->fts->doc_col != ULINT_UNDEFINED);
@@ -5287,67 +5289,6 @@
 }
 
 /*********************************************************************//**
-Wait for the background thread to start. We poll to detect change
-of state, which is acceptable, since the wait should happen only
-once during startup.
-@return true if the thread started else FALSE (i.e timed out) */
-ibool
-fts_wait_for_background_thread_to_start(
-/*====================================*/
-	dict_table_t*		table,		/*!< in: table to which the thread
-						is attached */
-	ulint			max_wait)	/*!< in: time in microseconds, if
-						set to 0 then it disables
-						timeout checking */
-{
-	ulint			count = 0;
-	ibool			done = FALSE;
-
-	ut_a(max_wait == 0 || max_wait >= FTS_MAX_BACKGROUND_THREAD_WAIT);
-
-	for (;;) {
-		fts_t*		fts = table->fts;
-
-		mutex_enter(&fts->bg_threads_mutex);
-
-		if (fts->fts_status & BG_THREAD_READY) {
-
-			done = TRUE;
-		}
-
-		mutex_exit(&fts->bg_threads_mutex);
-
-		if (!done) {
-			os_thread_sleep(FTS_MAX_BACKGROUND_THREAD_WAIT);
-
-			if (max_wait > 0) {
-
-				max_wait -= FTS_MAX_BACKGROUND_THREAD_WAIT;
-
-				/* We ignore the residual value. */
-				if (max_wait < FTS_MAX_BACKGROUND_THREAD_WAIT) {
-					break;
-				}
-			}
-
-			++count;
-		} else {
-			break;
-		}
-
-		if (count >= FTS_BACKGROUND_THREAD_WAIT_COUNT) {
-			ib::error() << "The background thread for the FTS"
-				" table " << table->name
-				<< " refuses to start";
-
-			count = 0;
-		}
-	}
-
-	return(done);
-}
-
-/*********************************************************************//**
 Add the FTS document id hidden column. */
 void
 fts_add_doc_id_column(
@@ -5429,11 +5370,11 @@
 	const dict_table_t*	table,
 	mem_heap_t*		heap)
 	:
+	added_synced(0), dict_locked(0),
 	bg_threads(0),
-	fts_status(0),
 	add_wq(NULL),
 	cache(NULL),
-	doc_col(ULINT_UNDEFINED),
+	doc_col(ULINT_UNDEFINED), in_queue(false),
 	fts_heap(heap)
 {
 	ut_a(table->fts == NULL);
@@ -5500,42 +5441,6 @@
 	table->fts = NULL;
 }
 
-#if 0 // TODO: Enable this in WL#6608
-/*********************************************************************//**
-Signal FTS threads to initiate shutdown. */
-void
-fts_start_shutdown(
-/*===============*/
-	dict_table_t*	table,		/*!< in: table with FTS indexes */
-	fts_t*		fts)		/*!< in: fts instance that needs
-					to be informed about shutdown */
-{
-	mutex_enter(&fts->bg_threads_mutex);
-
-	fts->fts_status |= BG_THREAD_STOP;
-
-	mutex_exit(&fts->bg_threads_mutex);
-
-}
-
-/*********************************************************************//**
-Wait for FTS threads to shutdown. */
-void
-fts_shutdown(
-/*=========*/
-	dict_table_t*	table,		/*!< in: table with FTS indexes */
-	fts_t*		fts)		/*!< in: fts instance to shutdown */
-{
-	mutex_enter(&fts->bg_threads_mutex);
-
-	ut_a(fts->fts_status & BG_THREAD_STOP);
-
-	dict_table_wait_for_bg_threads_to_exit(table, 20000);
-
-	mutex_exit(&fts->bg_threads_mutex);
-}
-#endif
-
 /*********************************************************************//**
 Take a FTS savepoint. */
 UNIV_INLINE
@@ -7517,7 +7422,7 @@
 	}
 	rw_lock_x_unlock(&cache->init_lock);
 
-	if (table->fts->fts_status & ADDED_TABLE_SYNCED) {
+	if (table->fts->added_synced) {
 		goto func_exit;
 	}
 
@@ -7559,7 +7464,7 @@
 		}
 	}
 
-	table->fts->fts_status |= ADDED_TABLE_SYNCED;
+	table->fts->added_synced = true;
 
 	fts_get_docs_clear(cache->get_docs);
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fts/fts0opt.cc mariadb-10.3-10.3.22/storage/innobase/fts/fts0opt.cc
--- mariadb-10.3-10.3.18/storage/innobase/fts/fts0opt.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fts/fts0opt.cc	2020-01-26 18:37:29.000000000 +0000
@@ -35,9 +35,10 @@
 #include "srv0start.h"
 #include "ut0list.h"
 #include "zlib.h"
+#include "fts0opt.h"
 
 /** The FTS optimize thread's work queue. */
-static ib_wqueue_t* fts_optimize_wq;
+ib_wqueue_t* fts_optimize_wq;
 
 /** The FTS vector to store fts_slot_t */
 static ib_vector_t*  fts_slots;
@@ -168,8 +169,8 @@
 /** We use this information to determine when to start the optimize
 cycle for a table. */
 struct fts_slot_t {
-	/** table identifier, or 0 if the slot is empty */
-	table_id_t	table_id;
+	/** table, or NULL if the slot is unused */
+	dict_table_t*	table;
 
 	/** whether this slot is being processed */
 	bool		running;
@@ -2391,14 +2392,7 @@
 		return(DB_SUCCESS);
 	}
 
-	dict_table_t* table = dict_table_open_on_id(
-		slot->table_id, FALSE, DICT_TABLE_OP_NORMAL);
-
-	if (!table) {
-		slot->last_run = now;
-		return DB_SUCCESS;
-	}
-
+	dict_table_t*	table = slot->table;
 	dberr_t		error;
 
 	if (fil_table_accessible(table)
@@ -2418,8 +2412,6 @@
 		error = DB_SUCCESS;
 	}
 
-	dict_table_close(table, FALSE, FALSE);
-
 	return(error);
 }
 /*********************************************************************//**
@@ -2553,12 +2545,24 @@
 		return;
 	}
 
+	/* If there is no fts index present then don't add to
+	optimize queue. */
+	if (!ib_vector_size(table->fts->indexes)) {
+		return;
+	}
+
 	/* Make sure table with FTS index cannot be evicted */
 	dict_table_prevent_eviction(table);
 
 	msg = fts_optimize_create_msg(FTS_MSG_ADD_TABLE, table);
 
-	ib_wqueue_add(fts_optimize_wq, msg, msg->heap);
+	mutex_enter(&fts_optimize_wq->mutex);
+
+	ib_wqueue_add(fts_optimize_wq, msg, msg->heap, true);
+
+	table->fts->in_queue = true;
+
+	mutex_exit(&fts_optimize_wq->mutex);
 }
 
 /**********************************************************************//**
@@ -2585,6 +2589,13 @@
 		return;
 	}
 
+	mutex_enter(&fts_optimize_wq->mutex);
+
+	if (!table->fts->in_queue) {
+		mutex_exit(&fts_optimize_wq->mutex);
+		return;
+	}
+
 	msg = fts_optimize_create_msg(FTS_MSG_DEL_TABLE, NULL);
 
 	/* We will wait on this event until signalled by the consumer. */
@@ -2597,11 +2608,17 @@
 	remove->event = event;
 	msg->ptr = remove;
 
-	ib_wqueue_add(fts_optimize_wq, msg, msg->heap);
+	ib_wqueue_add(fts_optimize_wq, msg, msg->heap, true);
+
+	mutex_exit(&fts_optimize_wq->mutex);
 
 	os_event_wait(event);
 
 	os_event_destroy(event);
+
+	ut_d(mutex_enter(&fts_optimize_wq->mutex));
+	ut_ad(!table->fts->in_queue);
+	ut_d(mutex_exit(&fts_optimize_wq->mutex));
 }
 
 /** Send sync fts cache for the table.
@@ -2610,9 +2627,6 @@
 fts_optimize_request_sync_table(
 	dict_table_t*	table)
 {
-	fts_msg_t*	msg;
-	table_id_t*	table_id;
-
 	/* if the optimize system not yet initialized, return */
 	if (!fts_optimize_wq) {
 		return;
@@ -2625,35 +2639,36 @@
 		return;
 	}
 
-	msg = fts_optimize_create_msg(FTS_MSG_SYNC_TABLE, NULL);
+	fts_msg_t* msg = fts_optimize_create_msg(FTS_MSG_SYNC_TABLE, table);
 
-	table_id = static_cast(
-		mem_heap_alloc(msg->heap, sizeof(table_id_t)));
-	*table_id = table->id;
-	msg->ptr = table_id;
+	mutex_enter(&fts_optimize_wq->mutex);
 
-	ib_wqueue_add(fts_optimize_wq, msg, msg->heap);
+	ib_wqueue_add(fts_optimize_wq, msg, msg->heap, true);
+
+	table->fts->in_queue = true;
+
+	mutex_exit(&fts_optimize_wq->mutex);
 }
 
 /** Add a table to fts_slots if it doesn't already exist. */
 static bool fts_optimize_new_table(dict_table_t* table)
 {
+	ut_ad(table);
+
 	ulint		i;
 	fts_slot_t*	slot;
 	fts_slot_t*	empty = NULL;
-	const table_id_t table_id = table->id;
-	ut_ad(table_id);
 
 	/* Search for duplicates, also find a free slot if one exists. */
 	for (i = 0; i < ib_vector_size(fts_slots); ++i) {
 
 		slot = static_cast(ib_vector_get(fts_slots, i));
 
-		if (!slot->table_id) {
+		if (!slot->table) {
 			empty = slot;
-		} else if (slot->table_id == table_id) {
+		} else if (slot->table == table) {
 			/* Already exists in our optimize queue. */
-			return(FALSE);
+			return false;
 		}
 	}
 
@@ -2662,36 +2677,35 @@
 
 	memset(slot, 0x0, sizeof(*slot));
 
-	slot->table_id = table->id;
-	slot->running = false;
-
-	return(TRUE);
+	slot->table = table;
+	return true;
 }
 
 /** Remove a table from fts_slots if it exists.
 @param[in,out]	table	table to be removed from fts_slots */
 static bool fts_optimize_del_table(const dict_table_t* table)
 {
-	const table_id_t table_id = table->id;
-	ut_ad(table_id);
-
+	ut_ad(table);
 	for (ulint i = 0; i < ib_vector_size(fts_slots); ++i) {
 		fts_slot_t*	slot;
 
 		slot = static_cast(ib_vector_get(fts_slots, i));
 
-		if (slot->table_id == table_id) {
+		if (slot->table == table) {
 			if (fts_enable_diag_print) {
 				ib::info() << "FTS Optimize Removing table "
 					<< table->name;
 			}
 
-			slot->table_id = 0;
-			return(TRUE);
+			mutex_enter(&fts_optimize_wq->mutex);
+			slot->table->fts->in_queue = false;
+			mutex_exit(&fts_optimize_wq->mutex);
+			slot->table = NULL;
+			return true;
 		}
 	}
 
-	return(FALSE);
+	return false;
 }
 
 /**********************************************************************//**
@@ -2705,7 +2719,7 @@
 	for (ulint i = 0; i < ib_vector_size(fts_slots); ++i) {
 		const fts_slot_t* slot = static_cast(
 			ib_vector_get_const(fts_slots, i));
-		if (slot->table_id == 0) {
+		if (!slot->table) {
 			continue;
 		}
 
@@ -2741,22 +2755,14 @@
 		const fts_slot_t* slot = static_cast(
 			ib_vector_get_const(fts_slots, i));
 
-		if (slot->table_id == 0) {
-			continue;
-		}
-
-		dict_table_t* table = dict_table_open_on_id(
-			slot->table_id, FALSE, DICT_TABLE_OP_NORMAL);
-		if (!table) {
+		if (!slot->table) {
 			continue;
 		}
 
-		if (table->fts && table->fts->cache) {
-			total_memory += table->fts->cache->total_size;
+		if (slot->table->fts && slot->table->fts->cache) {
+			total_memory += slot->table->fts->cache->total_size;
 		}
 
-		dict_table_close(table, FALSE, FALSE);
-
 		if (total_memory > fts_max_total_cache_size) {
 			return(true);
 		}
@@ -2766,18 +2772,14 @@
 }
 
 /** Sync fts cache of a table
-@param[in]	table_id	table id */
-static void fts_optimize_sync_table(table_id_t table_id)
+@param[in,out]	table	table to be synced */
+static void fts_optimize_sync_table(dict_table_t* table)
 {
-	if (dict_table_t* table = dict_table_open_on_id(
-		    table_id, FALSE, DICT_TABLE_OP_NORMAL)) {
-		if (fil_table_accessible(table)
-		    && table->fts && table->fts->cache) {
-			fts_sync_table(table, false);
-		}
-
-		dict_table_close(table, FALSE, FALSE);
+	if (table->fts && table->fts->cache && fil_table_accessible(table)) {
+		fts_sync_table(table, false);
 	}
+
+	DBUG_EXECUTE_IF("ib_optimize_wq_hang", os_thread_sleep(6000000););
 }
 
 /**********************************************************************//**
@@ -2816,7 +2818,7 @@
 				ib_vector_get(fts_slots, current));
 
 			/* Handle the case of empty slots. */
-			if (slot->table_id) {
+			if (slot->table) {
 				slot->running = true;
 				fts_optimize_table_bk(slot);
 			}
@@ -2875,7 +2877,7 @@
 					os_thread_sleep(300000););
 
 				fts_optimize_sync_table(
-					*static_cast(msg->ptr));
+					static_cast(msg->ptr));
 				break;
 
 			default:
@@ -2894,8 +2896,8 @@
 			fts_slot_t* slot = static_cast(
 				ib_vector_get(fts_slots, i));
 
-			if (table_id_t table_id = slot->table_id) {
-				fts_optimize_sync_table(table_id);
+			if (slot->table) {
+				fts_optimize_sync_table(slot->table);
 			}
 		}
 	}
@@ -2923,7 +2925,6 @@
 {
 	mem_heap_t*	heap;
 	ib_alloc_t*     heap_alloc;
-	dict_table_t*   table;
 
 	ut_ad(!srv_read_only_mode);
 
@@ -2939,31 +2940,25 @@
 	heap_alloc = ib_heap_allocator_create(heap);
 	fts_slots = ib_vector_create(heap_alloc, sizeof(fts_slot_t), 4);
 
-	/* Add fts tables to the fts_slots vector which were skipped during restart */
-	std::vector table_vector;
-	std::vector::iterator it;
-
+	/* Add fts tables to fts_slots which could be skipped
+	during dict_load_table_one() because fts_optimize_thread
+	wasn't even started. */
 	mutex_enter(&dict_sys->mutex);
-	for (table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
-             table != NULL;
-             table = UT_LIST_GET_NEXT(table_LRU, table)) {
-                if (table->fts &&
-                    dict_table_has_fts_index(table)) {
-			if (fts_optimize_new_table(table)){
-				table_vector.push_back(table);
-			}
+	for (dict_table_t* table = UT_LIST_GET_FIRST(dict_sys->table_LRU);
+	     table != NULL;
+	     table = UT_LIST_GET_NEXT(table_LRU, table)) {
+		if (!table->fts || !dict_table_has_fts_index(table)) {
+			continue;
 		}
-	}
 
-	/* It is better to call dict_table_prevent_eviction()
-	outside the above loop because it operates on
-	dict_sys->table_LRU list.*/
-	for (it=table_vector.begin();it!=table_vector.end();++it) {
-		dict_table_prevent_eviction(*it);
+		/* fts_optimize_thread is not started yet. So there is no
+		need to acquire fts_optimize_wq->mutex for adding the fts
+		table to the fts slots. */
+		ut_ad(!table->can_be_evicted);
+		fts_optimize_new_table(table);
+		table->fts->in_queue = true;
 	}
-
 	mutex_exit(&dict_sys->mutex);
-	table_vector.clear();
 
 	fts_opt_shutdown_event = os_event_create(0);
 	last_check_sync_time = time(NULL);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/fts/fts0sql.cc mariadb-10.3-10.3.22/storage/innobase/fts/fts0sql.cc
--- mariadb-10.3-10.3.18/storage/innobase/fts/fts0sql.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/fts/fts0sql.cc	2020-01-26 18:37:29.000000000 +0000
@@ -154,8 +154,7 @@
 	str = ut_str3cat(fts_sql_begin, sql, fts_sql_end);
 
 	dict_locked = (fts_table && fts_table->table->fts
-		       && (fts_table->table->fts->fts_status
-			   & TABLE_DICT_LOCKED));
+		       && fts_table->table->fts->dict_locked);
 
 	if (!dict_locked) {
 		ut_ad(!mutex_own(&dict_sys->mutex));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/gis/gis0geo.cc mariadb-10.3-10.3.22/storage/innobase/gis/gis0geo.cc
--- mariadb-10.3-10.3.18/storage/innobase/gis/gis0geo.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/gis/gis0geo.cc	2020-01-26 18:37:29.000000000 +0000
@@ -434,26 +434,6 @@
 	}
 }
 
-/*********************************************************//**
-Generates a random iboolean value.
-@return the random value */
-static
-ibool
-ut_rnd_gen_ibool(void)
-/*=================*/
-{
-	ulint    x;
-
-	x = ut_rnd_gen_ulint();
-
-	if (((x >> 20) + (x >> 15)) & 1) {
-
-		return(TRUE);
-	}
-
-	return(FALSE);
-}
-
 /*************************************************************//**
 Select next node and group where to add. */
 static
@@ -490,8 +470,7 @@
 			/* Introduce some randomness if the record
 			is identical */
 			if (diff == 0) {
-				diff = static_cast(
-					ut_rnd_gen_ibool());
+				diff = static_cast(ut_rnd_gen() & 1);
 			}
 
 			*n_group = 1 + (diff > 0);
@@ -791,35 +770,3 @@
 
 	return(area);
 }
-
-/** Get the wkb of default POINT value, which represents POINT(0 0)
-if it's of dimension 2, etc.
-@param[in]	n_dims		dimensions
-@param[out]	wkb		wkb buffer for default POINT
-@param[in]	len		length of wkb buffer
-@return non-0 indicate the length of wkb of the default POINT,
-0 if the buffer is too small */
-uint
-get_wkb_of_default_point(
-	uint	n_dims,
-	uchar*	wkb,
-	uint	len)
-{
-  // JAN: TODO: MYSQL 5.7 GIS
-  #define GEOM_HEADER_SIZE 16
-	if (len < GEOM_HEADER_SIZE + sizeof(double) * n_dims) {
-		return(0);
-	}
-
-	/** POINT wkb comprises SRID, wkb header(byte order and type)
-	and coordinates of the POINT */
-	len = GEOM_HEADER_SIZE + sizeof(double) * n_dims;
-	/** We always use 0 as default coordinate */
-	memset(wkb, 0, len);
-	/** We don't need to write SRID, write 0x01 for Byte Order */
-	mach_write_to_n_little_endian(wkb + SRID_SIZE, 1, 0x01);
-	/** Write wkbType::wkbPoint for the POINT type */
-	mach_write_to_n_little_endian(wkb + SRID_SIZE + 1, 4, wkbPoint);
-
-	return(len);
-}
diff -Nru mariadb-10.3-10.3.18/storage/innobase/gis/gis0rtree.cc mariadb-10.3-10.3.22/storage/innobase/gis/gis0rtree.cc
--- mariadb-10.3-10.3.18/storage/innobase/gis/gis0rtree.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/gis/gis0rtree.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, 2019, MariaDB Corporation.
+Copyright (c) 2018, 2020, 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,7 +51,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor at which to insert; when the
 				function returns, the cursor is positioned
 				on the predecessor of the inserted record */
-	ulint**		offsets,/*!< in: offsets on inserted record */
+	offset_t**	offsets,/*!< in: offsets on inserted record */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
 	double**	buf_pos)/*!< in/out: current buffer position */
 {
@@ -192,7 +192,7 @@
 /*==========================*/
 	dict_index_t*	index,		/*!< in: spatial index. */
 	rec_t*		rec,		/*!< in/out: rec to be modified.*/
-	ulint*		offsets,	/*!< in/out: offsets on rec. */
+	offset_t*	offsets,	/*!< in/out: offsets on rec. */
 	rtr_mbr_t*	mbr,		/*!< in: the new mbr. */
 	mtr_t*		mtr)		/*!< in: mtr */
 {
@@ -266,7 +266,7 @@
 rtr_update_mbr_field(
 /*=================*/
 	btr_cur_t*	cursor,		/*!< in/out: cursor pointed to rec.*/
-	ulint*		offsets,	/*!< in/out: offsets on rec. */
+	offset_t*	offsets,	/*!< in/out: offsets on rec. */
 	btr_cur_t*	cursor2,	/*!< in/out: cursor pointed to rec
 					that should be deleted.
 					this cursor is for btr_compress to
@@ -295,7 +295,7 @@
 	bool		ins_suc = true;
 	ulint		cur2_pos = 0;
 	ulint		del_page_no = 0;
-	ulint*		offsets2;
+	offset_t*	offsets2;
 
 	rec = btr_cur_get_rec(cursor);
 	page = page_align(rec);
@@ -382,7 +382,7 @@
 		}
 
 		if (cursor2) {
-			ulint* offsets2;
+			offset_t* offsets2;
 
 			if (page_zip) {
 				cursor2->page_cur.rec
@@ -404,7 +404,7 @@
 
 		page_cur_t		page_cur;
 		rec_t*			insert_rec;
-		ulint*			insert_offsets = NULL;
+		offset_t*		insert_offsets = NULL;
 		ulint			old_pos;
 		rec_t*			old_rec;
 
@@ -436,7 +436,7 @@
 		/* When there're not only 1 rec in the page, we do delete/insert
 		to avoid page split. */
 		rec_t*			insert_rec;
-		ulint*			insert_offsets = NULL;
+		offset_t*		insert_offsets = NULL;
 		rec_t*			next_rec;
 
 		/* Delete the rec which cursor point to. */
@@ -603,16 +603,10 @@
 		}
 	}
 
-#ifdef UNIV_DEBUG
-	ulint	left_page_no = btr_page_get_prev(page, mtr);
-
-	if (left_page_no == FIL_NULL) {
-
-		ut_a(REC_INFO_MIN_REC_FLAG & rec_get_info_bits(
-			page_rec_get_next(page_get_infimum_rec(page)),
-			page_is_comp(page)));
-	}
-#endif /* UNIV_DEBUG */
+	ut_ad(page_has_prev(page)
+	      || (REC_INFO_MIN_REC_FLAG & rec_get_info_bits(
+			  page_rec_get_next(page_get_infimum_rec(page)),
+			  page_is_comp(page))));
 
 	mem_heap_free(heap);
 
@@ -642,13 +636,10 @@
 	page_zip_des_t*	new_page_zip;
 	dict_index_t*	index = sea_cur->index;
 	btr_cur_t	cursor;
-	ulint*		offsets;
+	offset_t*	offsets;
 	mem_heap_t*	heap;
 	ulint		level;
 	dtuple_t*	node_ptr_upper;
-	ulint		prev_page_no;
-	ulint		next_page_no;
-	ulint		space;
 	page_cur_t*	page_cursor;
 	lock_prdt_t	prdt;
 	lock_prdt_t	new_prdt;
@@ -749,38 +740,19 @@
 
 	mem_heap_free(heap);
 
-	/* Get the previous and next pages of page */
-	prev_page_no = btr_page_get_prev(page, mtr);
-	next_page_no = btr_page_get_next(page, mtr);
-	space = block->page.id.space();
-	const page_size_t&	page_size = dict_table_page_size(index->table);
-
-	/* Update page links of the level */
-	if (prev_page_no != FIL_NULL) {
-		page_id_t	prev_page_id(space, prev_page_no);
-
-		buf_block_t*	prev_block = btr_block_get(
-			prev_page_id, page_size, RW_X_LATCH, index, mtr);
-#ifdef UNIV_BTR_DEBUG
-		ut_a(page_is_comp(prev_block->frame) == page_is_comp(page));
-		ut_a(btr_page_get_next(prev_block->frame, mtr)
-		     == block->page.id.page_no());
-#endif /* UNIV_BTR_DEBUG */
-
-		btr_page_set_next(buf_block_get_frame(prev_block),
-				  buf_block_get_page_zip(prev_block),
-				  page_no, mtr);
-	}
+	const uint32_t next_page_no = btr_page_get_next(page);
 
 	if (next_page_no != FIL_NULL) {
-		page_id_t	next_page_id(space, next_page_no);
+		page_id_t	next_page_id(block->page.id.space(),
+					     next_page_no);
 
 		buf_block_t*	next_block = btr_block_get(
-			next_page_id, page_size, RW_X_LATCH, index, mtr);
+			next_page_id, dict_table_page_size(index->table),
+			RW_X_LATCH, index, mtr);
 #ifdef UNIV_BTR_DEBUG
 		ut_a(page_is_comp(next_block->frame) == page_is_comp(page));
-		ut_a(btr_page_get_prev(next_block->frame, mtr)
-		     == page_get_page_no(page));
+		ut_a(btr_page_get_prev(next_block->frame)
+		     == block->page.id.page_no());
 #endif /* UNIV_BTR_DEBUG */
 
 		btr_page_set_prev(buf_block_get_frame(next_block),
@@ -788,7 +760,6 @@
 				  new_page_no, mtr);
 	}
 
-	btr_page_set_prev(page, page_zip, prev_page_no, mtr);
 	btr_page_set_next(page, page_zip, new_page_no, mtr);
 
 	btr_page_set_prev(new_page, new_page_zip, page_no, mtr);
@@ -828,8 +799,8 @@
 	page_cur_t		new_page_cursor;
 	page_t*			page;
 	page_t*			new_page;
-	ulint			offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*			offsets		= offsets_;
+	offset_t		offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*		offsets		= offsets_;
 	page_zip_des_t*		new_page_zip
 		= buf_block_get_page_zip(new_block);
 	rec_t*			rec;
@@ -989,7 +960,7 @@
 	btr_cur_t*	cursor,	/*!< in/out: cursor at which to insert; when the
 				function returns, the cursor is positioned
 				on the predecessor of the inserted record */
-	ulint**		offsets,/*!< out: offsets on inserted record */
+	offset_t**	offsets,/*!< out: offsets on inserted record */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
@@ -1338,7 +1309,7 @@
 	mem_heap_t*		heap;
 	dict_index_t*		index = btr_cur->index;
 	page_cur_t*		page_cursor;
-	ulint*			offsets;
+	offset_t*		offsets;
 	node_visit_t*		node_visit;
 	btr_cur_t		cursor;
 	page_t*			page;
@@ -1422,10 +1393,10 @@
 	page_cur_t	page_cur;
 	page_cur_t	cur1;
 	rec_t*		cur_rec;
-	ulint		offsets_1[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets1 = offsets_1;
-	ulint		offsets_2[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets2 = offsets_2;
+	offset_t	offsets_1[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets1 = offsets_1;
+	offset_t	offsets_2[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets2 = offsets_2;
 	ulint		moved = 0;
 	bool		is_leaf = page_is_leaf(new_page);
 
@@ -1465,10 +1436,9 @@
 			offsets2 = rec_get_offsets(cur_rec, index, offsets2,
 						   is_leaf,
 						   ULINT_UNDEFINED, &heap);
-			cmp = cmp_rec_rec_with_match(cur1_rec, cur_rec,
-						     offsets1, offsets2,
-						     index, FALSE,
-						     &cur_matched_fields);
+			cmp = cmp_rec_rec(cur1_rec, cur_rec,
+					  offsets1, offsets2, index, false,
+					  &cur_matched_fields);
 			if (cmp < 0) {
 				page_cur_move_to_prev(&page_cur);
 				break;
@@ -1549,10 +1519,10 @@
 {
 	page_cur_t	cur1;
 	rec_t*		cur_rec;
-	ulint		offsets_1[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets1 = offsets_1;
-	ulint		offsets_2[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets2 = offsets_2;
+	offset_t	offsets_1[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets1 = offsets_1;
+	offset_t	offsets_2[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets2 = offsets_2;
 	page_cur_t	page_cur;
 	ulint		moved = 0;
 	bool		is_leaf = page_is_leaf(buf_block_get_frame(block));
@@ -1580,15 +1550,13 @@
 
 		while (!page_rec_is_supremum(cur_rec)) {
 			ulint		cur_matched_fields = 0;
-			int		cmp;
 
 			offsets2 = rec_get_offsets(cur_rec, index, offsets2,
 						   is_leaf,
 						   ULINT_UNDEFINED, &heap);
-			cmp = cmp_rec_rec_with_match(cur1_rec, cur_rec,
-						     offsets1, offsets2,
-						     index, FALSE,
-						     &cur_matched_fields);
+			int cmp = cmp_rec_rec(cur1_rec, cur_rec,
+					      offsets1, offsets2, index, false,
+					      &cur_matched_fields);
 			if (cmp < 0) {
 				page_cur_move_to_prev(&page_cur);
 				cur_rec = page_cur_get_rec(&page_cur);
@@ -1661,8 +1629,8 @@
 /*==================*/
 	btr_cur_t*		cursor,		/*!< in/out: cursor */
 	btr_cur_t*		cursor2,	/*!< in: the other cursor */
-	ulint*			offsets,	/*!< in: rec offsets */
-	ulint*			offsets2,	/*!< in: rec offsets */
+	offset_t*		offsets,	/*!< in: rec offsets */
+	offset_t*		offsets2,	/*!< in: rec offsets */
 	rtr_mbr_t*		new_mbr)	/*!< out: MBR to update */
 {
 	double*		mbr;
@@ -1705,8 +1673,8 @@
 /*=====================*/
 	btr_cur_t*		cursor,		/*!< in/out: cursor */
 	btr_cur_t*		cursor2,	/*!< in: the other cursor */
-	ulint*			offsets,	/*!< in: rec offsets */
-	ulint*			offsets2,	/*!< in: rec offsets */
+	offset_t*		offsets,	/*!< in: rec offsets */
+	offset_t*		offsets2,	/*!< in: rec offsets */
 	page_t*			child_page,	/*!< in: the page. */
 	mtr_t*			mtr)		/*!< in: mtr */
 {
@@ -1769,7 +1737,7 @@
 
 {
 	ulint		page_no = childb->page.id.page_no();
-	ulint*		offsets;
+	offset_t*	offsets;
 	rec_t*		rec = page_rec_get_next(page_get_infimum_rec(
 				buf_block_get_frame(parentb)));
 
@@ -1800,7 +1768,7 @@
 				dtuple in some of the common fields, or which
 				has an equal number or more fields than
 				dtuple */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	double*		area)	/*!< out: increased area */
 {
 	const dfield_t*	dtuple_field;
@@ -1875,7 +1843,7 @@
 
 	mtr.start();
 	index->set_modified(mtr);
-	mtr_s_lock(&index->lock, &mtr);
+	mtr_s_lock_index(index, &mtr);
 
 	buf_block_t* block = btr_block_get(
 		page_id_t(index->table->space_id, index->page),
diff -Nru mariadb-10.3-10.3.18/storage/innobase/gis/gis0sea.cc mariadb-10.3-10.3.22/storage/innobase/gis/gis0sea.cc
--- mariadb-10.3-10.3.18/storage/innobase/gis/gis0sea.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/gis/gis0sea.cc	2020-01-26 18:37:29.000000000 +0000
@@ -137,7 +137,7 @@
 	if (!index_locked) {
 		ut_ad(latch_mode & BTR_SEARCH_LEAF
 		      || latch_mode & BTR_MODIFY_LEAF);
-		mtr_s_lock(dict_index_get_lock(index), mtr);
+		mtr_s_lock_index(index, mtr);
 	} else {
 		ut_ad(mtr_memo_contains_flagged(mtr, &index->lock,
 						MTR_MEMO_SX_LOCK
@@ -288,7 +288,7 @@
 		Note that we have SX lock on index->lock, there
 		should not be any split/shrink happening here */
 		if (page_ssn > path_ssn) {
-			ulint next_page_no = btr_page_get_next(page, mtr);
+			uint32_t next_page_no = btr_page_get_next(page);
 			rtr_non_leaf_stack_push(
 				rtr_info->path, next_page_no, path_ssn,
 				level, 0, NULL, 0);
@@ -526,7 +526,7 @@
 	mem_heap_t**	heap)		/*!< in: memory heap */
 {
 	const rec_t*	rec;
-	ulint*		offsets;
+	offset_t*	offsets;
 
 	rec = btr_cur_get_rec(cursor);
 
@@ -668,7 +668,7 @@
 {
 	mem_heap_t*	heap = mem_heap_create(100);
 #ifdef UNIV_DEBUG
-	ulint*		offsets;
+	offset_t*	offsets;
 
 	offsets = rtr_page_get_father_block(
 		NULL, heap, index, block, mtr, sea_cur, cursor);
@@ -689,9 +689,9 @@
 that mtr holds an SX-latch or X-latch on the tree.
 @return	rec_get_offsets() of the node pointer record */
 static
-ulint*
+offset_t*
 rtr_page_get_father_node_ptr(
-	ulint*		offsets,/*!< in: work area for the return value */
+	offset_t*	offsets,/*!< in: work area for the return value */
 	mem_heap_t*	heap,	/*!< in: memory heap to use */
 	btr_cur_t*	sea_cur,/*!< in: search cursor */
 	btr_cur_t*	cursor,	/*!< in: cursor pointing to user record,
@@ -784,10 +784,10 @@
 Returns the father block to a page. It is assumed that mtr holds
 an X or SX latch on the tree.
 @return rec_get_offsets() of the node pointer record */
-ulint*
+offset_t*
 rtr_page_get_father_block(
 /*======================*/
-	ulint*		offsets,/*!< in: work area for the return value */
+	offset_t*	offsets,/*!< in: work area for the return value */
 	mem_heap_t*	heap,	/*!< in: memory heap to use */
 	dict_index_t*	index,	/*!< in: b-tree index */
 	buf_block_t*	block,	/*!< in: child page in the index */
@@ -1302,8 +1302,8 @@
 #ifdef UNIV_DEBUG
 		do {
 			const rec_t*	rec;
-			const ulint*	offsets1;
-			const ulint*	offsets2;
+			const offset_t*	offsets1;
+			const offset_t*	offsets2;
 			ulint		comp;
 
 			rec = btr_pcur_get_rec(r_cursor);
@@ -1375,8 +1375,8 @@
 
 	if (low_match == r_cursor->old_n_fields) {
 		const rec_t*	rec;
-		const ulint*	offsets1;
-		const ulint*	offsets2;
+		const offset_t*	offsets1;
+		const offset_t*	offsets2;
 		ulint		comp;
 
 		rec = btr_pcur_get_rec(r_cursor);
@@ -1405,7 +1405,7 @@
 	/* Check the page SSN to see if it has been splitted, if so, search
 	the right page */
 	if (!ret && page_ssn > path_ssn) {
-		page_no = btr_page_get_next(page, mtr);
+		page_no = btr_page_get_next(page);
 		goto search_again;
 	}
 
@@ -1422,7 +1422,7 @@
 /*====================*/
 	const rec_t*	rec,		/*!< in: record to copy */
 	rtr_info_t*	rtr_info,	/*!< in/out: search stack */
-	ulint*		offsets,	/*!< in: offsets */
+	offset_t*	offsets,	/*!< in: offsets */
 	bool		is_comp)	/*!< in: is compact format */
 {
 	byte*		buf;
@@ -1608,7 +1608,7 @@
 rtr_get_mbr_from_rec(
 /*=================*/
 	const rec_t*	rec,	/*!< in: data tuple */
-	const ulint*	offsets,/*!< in: offsets array */
+	const offset_t*	offsets,/*!< in: offsets array */
 	rtr_mbr_t*	mbr)	/*!< out MBR */
 {
 	ulint		rec_f_len;
@@ -1655,8 +1655,8 @@
 	const page_t*	page;
 	const rec_t*	rec;
 	const rec_t*	last_rec;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	mem_heap_t*	heap = NULL;
 	int		cmp = 1;
 	double		least_inc = DBL_MAX;
@@ -1939,8 +1939,8 @@
 
 			test_rec = match_rec->matched_recs->back();
 #ifdef UNIV_DEBUG
-			ulint		offsets_2[REC_OFFS_NORMAL_SIZE];
-			ulint*		offsets2	= offsets_2;
+			offset_t	offsets_2[REC_OFFS_NORMAL_SIZE];
+			offset_t*	offsets2	= offsets_2;
 			rec_offs_init(offsets_2);
 
 			ut_ad(found);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/handler/ha_innodb.cc mariadb-10.3-10.3.22/storage/innobase/handler/ha_innodb.cc
--- mariadb-10.3-10.3.18/storage/innobase/handler/ha_innodb.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/handler/ha_innodb.cc	2020-01-26 18:37:29.000000000 +0000
@@ -4,7 +4,7 @@
 Copyright (c) 2008, 2009 Google Inc.
 Copyright (c) 2009, Percona Inc.
 Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
 
 Portions of this file contain modifications contributed and copyrighted by
 Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -2587,11 +2587,10 @@
 	if (next_value == 0) {
 		ulonglong	next;
 
-		if (current >= offset) {
+		if (current > offset) {
 			next = (current - offset) / step;
 		} else {
-			next = 0;
-			block -= step;
+			next = (offset - current) / step;
 		}
 
 		ut_a(max_value > next);
@@ -3430,17 +3429,6 @@
 	return(trx && trx->mysql_thd && thd_kill_level(trx->mysql_thd));
 }
 
-/**********************************************************************//**
-Determines if the currently running transaction is in strict mode.
-@return TRUE if strict */
-ibool
-trx_is_strict(
-/*==========*/
-	trx_t*	trx)	/*!< in: transaction */
-{
-	return(trx && trx->mysql_thd && THDVAR(trx->mysql_thd, strict_mode));
-}
-
 /**************************************************************//**
 Resets some fields of a m_prebuilt struct. The template is used in fast
 retrieval of just those column values MySQL needs in its processing. */
@@ -5455,7 +5443,7 @@
 
 create_table_info_t::create_table_info_t(
 	THD*		thd,
-	TABLE*		form,
+	const TABLE*	form,
 	HA_CREATE_INFO*	create_info,
 	char*		table_name,
 	char*		remote_path,
@@ -6467,7 +6455,7 @@
 	DBUG_ENTER("ha_innobase::clone");
 
 	ha_innobase*	new_handler = static_cast(
-		handler::clone(name, mem_root));
+		handler::clone(m_prebuilt->table->name.m_name, mem_root));
 
 	if (new_handler != NULL) {
 		DBUG_ASSERT(new_handler->m_prebuilt != NULL);
@@ -9938,10 +9926,10 @@
 		return(NULL);
 	}
 
-	if (!(ft_table->fts->fts_status & ADDED_TABLE_SYNCED)) {
+	if (!(ft_table->fts->added_synced)) {
 		fts_init_index(ft_table, FALSE);
 
-		ft_table->fts->fts_status |= ADDED_TABLE_SYNCED;
+		ft_table->fts->added_synced = true;
 	}
 
 	const byte*	q = reinterpret_cast(
@@ -10906,6 +10894,9 @@
 
 	heap = mem_heap_create(1000);
 
+	ut_d(bool have_vers_start = false);
+	ut_d(bool have_vers_end = false);
+
 	for (ulint i = 0, j = 0; j < n_cols; i++) {
 		Field*	field = m_form->field[i];
 		ulint vers_row = 0;
@@ -10913,8 +10904,10 @@
 		if (m_form->versioned()) {
 			if (i == m_form->s->row_start_field) {
 				vers_row = DATA_VERS_START;
+				ut_d(have_vers_start = true);
 			} else if (i == m_form->s->row_end_field) {
 				vers_row = DATA_VERS_END;
+				ut_d(have_vers_end = true);
 			} else if (!(field->flags
 				     & VERS_UPDATE_UNVERSIONED_FLAG)) {
 				vers_row = DATA_VERSIONED;
@@ -11035,6 +11028,10 @@
 		j++;
 	}
 
+	ut_ad(have_vers_start == have_vers_end);
+	ut_ad(table->versioned() == have_vers_start);
+	ut_ad(!table->versioned() || table->vers_start != table->vers_end);
+
 	if (num_v) {
 		for (ulint i = 0, j = 0; i < n_cols; i++) {
 			dict_v_col_t*	v_col;
@@ -12449,7 +12446,7 @@
 						 DICT_ERR_IGNORE_NONE,
 						 fk_tables);
 			while (err == DB_SUCCESS && !fk_tables.empty()) {
-				dict_load_table(fk_tables.front(), true,
+				dict_load_table(fk_tables.front(),
 						DICT_ERR_IGNORE_NONE);
 				fk_tables.pop_front();
 			}
@@ -12494,9 +12491,240 @@
 		}
 	}
 
+	/* In TRUNCATE TABLE, we will merely warn about the maximum
+	row size being too large. */
+	if (!row_size_is_acceptable(*m_table, create_fk)) {
+		DBUG_RETURN(convert_error_code_to_mysql(
+			    DB_TOO_BIG_RECORD, m_flags, NULL));
+	}
+
 	DBUG_RETURN(0);
 }
 
+bool create_table_info_t::row_size_is_acceptable(
+  const dict_table_t &table, bool strict) const
+{
+  for (dict_index_t *index= dict_table_get_first_index(&table); index;
+       index= dict_table_get_next_index(index))
+    if (!row_size_is_acceptable(*index, strict))
+      return false;
+  return true;
+}
+
+/* FIXME: row size check has some flaws and should be improved */
+dict_index_t::record_size_info_t dict_index_t::record_size_info() const
+{
+  ut_ad(!(type & DICT_FTS));
+
+  /* maximum allowed size of a node pointer record */
+  ulint page_ptr_max;
+  const bool comp= dict_table_is_comp(table);
+  /* table->space == NULL after DISCARD TABLESPACE */
+  const page_size_t page_size(dict_tf_get_page_size(table->flags));
+  record_size_info_t result;
+
+  if (page_size.is_compressed() &&
+      page_size.physical() < univ_page_size.physical())
+  {
+    /* On a ROW_FORMAT=COMPRESSED page, two records must fit in the
+    uncompressed page modification log. On compressed pages
+    with size.physical() == univ_page_size.physical(),
+    this limit will never be reached. */
+    ut_ad(comp);
+    /* The maximum allowed record size is the size of
+    an empty page, minus a byte for recoding the heap
+    number in the page modification log.  The maximum
+    allowed node pointer size is half that. */
+    result.max_leaf_size= page_zip_empty_size(n_fields, page_size.physical());
+    if (result.max_leaf_size)
+    {
+      result.max_leaf_size--;
+    }
+    page_ptr_max= result.max_leaf_size / 2;
+    /* On a compressed page, there is a two-byte entry in
+    the dense page directory for every record.  But there
+    is no record header. */
+    result.shortest_size= 2;
+  }
+  else
+  {
+    /* The maximum allowed record size is half a B-tree
+    page(16k for 64k page size).  No additional sparse
+    page directory entry will be generated for the first
+    few user records. */
+    result.max_leaf_size= (comp || srv_page_size < UNIV_PAGE_SIZE_MAX)
+                              ? page_get_free_space_of_empty(comp) / 2
+                              : REDUNDANT_REC_MAX_DATA_SIZE;
+
+    page_ptr_max= result.max_leaf_size;
+    /* Each record has a header. */
+    result.shortest_size= comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES;
+  }
+
+  if (comp)
+  {
+    /* Include the "null" flags in the
+    maximum possible record size. */
+    result.shortest_size+= UT_BITS_IN_BYTES(n_nullable);
+  }
+  else
+  {
+    /* For each column, include a 2-byte offset and a
+    "null" flag.  The 1-byte format is only used in short
+    records that do not contain externally stored columns.
+    Such records could never exceed the page limit, even
+    when using the 2-byte format. */
+    result.shortest_size+= 2 * n_fields;
+  }
+
+  const ulint max_local_len= table->get_overflow_field_local_len();
+
+  /* Compute the maximum possible record size. */
+  for (unsigned i= 0; i < n_fields; i++)
+  {
+    const dict_field_t &f= fields[i];
+    const dict_col_t &col= *f.col;
+
+    /* In dtuple_convert_big_rec(), variable-length columns
+    that are longer than BTR_EXTERN_LOCAL_STORED_MAX_SIZE
+    may be chosen for external storage.
+
+    Fixed-length columns, and all columns of secondary
+    index records are always stored inline. */
+
+    /* Determine the maximum length of the index field.
+    The field_ext_max_size should be computed as the worst
+    case in rec_get_converted_size_comp() for
+    REC_STATUS_ORDINARY records. */
+
+    size_t field_max_size= dict_col_get_fixed_size(&col, comp);
+    if (field_max_size && f.fixed_len != 0)
+    {
+      /* dict_index_add_col() should guarantee this */
+      ut_ad(!f.prefix_len || f.fixed_len == f.prefix_len);
+      /* Fixed lengths are not encoded
+      in ROW_FORMAT=COMPACT. */
+      goto add_field_size;
+    }
+
+    field_max_size= dict_col_get_max_size(&col);
+
+    if (f.prefix_len)
+    {
+      if (f.prefix_len < field_max_size)
+      {
+        field_max_size= f.prefix_len;
+      }
+
+      /* those conditions were copied from dtuple_convert_big_rec()*/
+    }
+    else if (field_max_size > max_local_len &&
+             field_max_size > BTR_EXTERN_LOCAL_STORED_MAX_SIZE &&
+             DATA_BIG_COL(&col) && dict_index_is_clust(this))
+    {
+
+      /* In the worst case, we have a locally stored
+      column of BTR_EXTERN_LOCAL_STORED_MAX_SIZE bytes.
+      The length can be stored in one byte.  If the
+      column were stored externally, the lengths in
+      the clustered index page would be
+      BTR_EXTERN_FIELD_REF_SIZE and 2. */
+      field_max_size= max_local_len;
+    }
+
+    if (comp)
+    {
+      /* Add the extra size for ROW_FORMAT=COMPACT.
+      For ROW_FORMAT=REDUNDANT, these bytes were
+      added to result.shortest_size before this loop. */
+      result.shortest_size+= field_max_size < 256 ? 1 : 2;
+    }
+  add_field_size:
+    result.shortest_size+= field_max_size;
+
+    /* Check the size limit on leaf pages. */
+    if (result.shortest_size >= result.max_leaf_size)
+    {
+      result.set_too_big(i);
+    }
+
+    /* Check the size limit on non-leaf pages.  Records
+    stored in non-leaf B-tree pages consist of the unique
+    columns of the record (the key columns of the B-tree)
+    and a node pointer field.  When we have processed the
+    unique columns, result.shortest_size equals the size of the
+    node pointer record minus the node pointer column. */
+    if (i + 1 == dict_index_get_n_unique_in_tree(this) &&
+        result.shortest_size + REC_NODE_PTR_SIZE >= page_ptr_max)
+    {
+      result.set_too_big(i);
+    }
+  }
+
+  return result;
+}
+
+/** Issue a warning that the row is too big. */
+static void ib_warn_row_too_big(THD *thd, const dict_table_t *table)
+{
+  /* FIXME: this row size check should be improved */
+  /* If prefix is true then a 768-byte prefix is stored
+  locally for BLOB fields. Refer to dict_table_get_format() */
+  const bool prefix= !dict_table_has_atomic_blobs(table);
+
+  const ulint free_space=
+      page_get_free_space_of_empty(table->flags & DICT_TF_COMPACT) / 2;
+
+  push_warning_printf(
+      thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_TO_BIG_ROW,
+      "Row size too large (> " ULINTPF "). Changing some columns to TEXT"
+      " or BLOB %smay help. In current row format, BLOB prefix of"
+      " %d bytes is stored inline.",
+      free_space,
+      prefix ? "or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED " : "",
+      prefix ? DICT_MAX_FIXED_COL_LEN : 0);
+}
+
+bool create_table_info_t::row_size_is_acceptable(
+    const dict_index_t &index, bool strict) const
+{
+  if ((index.type & DICT_FTS) || index.table->is_system_db)
+  {
+    /* Ignore system tables check because innodb_table_stats
+    maximum row size can not fit on 4k page. */
+    return true;
+  }
+
+  const bool innodb_strict_mode= THDVAR(m_thd, strict_mode);
+  dict_index_t::record_size_info_t info= index.record_size_info();
+
+  if (info.row_is_too_big())
+  {
+    ut_ad(info.get_overrun_size() != 0);
+    ut_ad(info.max_leaf_size != 0);
+
+    const size_t idx= info.get_first_overrun_field_index();
+    const dict_field_t *field= dict_index_get_nth_field(&index, idx);
+
+    if (innodb_strict_mode || global_system_variables.log_warnings > 2)
+    {
+      ib::error_or_warn(strict && innodb_strict_mode)
+          << "Cannot add field " << field->name << " in table "
+          << index.table->name << " because after adding it, the row size is "
+          << info.get_overrun_size()
+          << " which is greater than maximum allowed size ("
+          << info.max_leaf_size << " bytes) for a record on index leaf page.";
+    }
+
+    if (strict && innodb_strict_mode)
+      return false;
+
+    ib_warn_row_too_big(m_thd, index.table);
+  }
+
+  return true;
+}
+
 /** Update a new table in an InnoDB database.
 @return error number */
 int
@@ -16539,7 +16767,7 @@
 	if (increment > 1 && thd_sql_command(m_user_thd) != SQLCOM_ALTER_TABLE
 	    && autoinc < col_max_value) {
 
-		ulonglong	prev_auto_inc = autoinc;
+		ulonglong prev_auto_inc = autoinc;
 
 		autoinc = ((autoinc - 1) + increment - offset)/ increment;
 
@@ -16593,27 +16821,6 @@
 
 		current = *first_value;
 
-		if (m_prebuilt->autoinc_increment != increment) {
-
-			WSREP_DEBUG("autoinc decrease: %llu -> %llu\n"
-				    "THD: %ld, current: %llu, autoinc: %llu",
-				    m_prebuilt->autoinc_increment,
-				    increment,
-				    thd_get_thread_id(m_user_thd),
-				    current, autoinc);
-			if (!wsrep_on(m_user_thd)) {
-				current = autoinc
-					- m_prebuilt->autoinc_increment;
-				current = innobase_next_autoinc(
-					current, 1, increment, offset, col_max_value);
-			}
-
-			dict_table_autoinc_initialize(
-				m_prebuilt->table, current);
-
-			*first_value = current;
-		}
-
 		/* Compute the last value in the interval */
 		next_value = innobase_next_autoinc(
 			current, *nb_reserved_values, increment, offset,
@@ -18296,7 +18503,7 @@
 		       + (log_sys.append_on_checkpoint != NULL
 			  ? log_sys.append_on_checkpoint->size() : 0)
 		       < log_sys.lsn) {
-			log_make_checkpoint_at(LSN_MAX);
+			log_make_checkpoint();
 			fil_flush_file_spaces(FIL_TYPE_LOG);
 		}
 
@@ -18573,6 +18780,33 @@
 		thd, *static_cast(save));
 }
 
+#ifdef UNIV_DEBUG
+static
+void
+innobase_debug_sync_callback(srv_slot_t *slot, const void *value)
+{
+	const char *value_str = *static_cast(value);
+	size_t len = strlen(value_str) + 1;
+
+
+	// One allocatoin for list node object and value.
+	void *buf = ut_malloc_nokey(sizeof(srv_slot_t::debug_sync_t) + len);
+	srv_slot_t::debug_sync_t *sync = new(buf) srv_slot_t::debug_sync_t();
+	strcpy(reinterpret_cast(&sync[1]), value_str);
+
+	rw_lock_x_lock(&slot->debug_sync_lock);
+	UT_LIST_ADD_LAST(slot->debug_sync, sync);
+	rw_lock_x_unlock(&slot->debug_sync_lock);
+}
+static
+void
+innobase_debug_sync_set(THD *thd, st_mysql_sys_var*, void *, const void *value)
+{
+	srv_for_each_thread(SRV_WORKER, innobase_debug_sync_callback, value);
+	srv_for_each_thread(SRV_PURGE, innobase_debug_sync_callback, value);
+}
+#endif
+
 static SHOW_VAR innodb_status_variables_export[]= {
 	{"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
 	{NullS, NullS, SHOW_LONG}
@@ -19025,7 +19259,8 @@
   NULL, NULL,
   4,			/* Default setting */
   1,			/* Minimum value */
-  32, 0);		/* Maximum value */
+  srv_max_purge_threads,/* Maximum value */
+  0);
 
 static MYSQL_SYSVAR_ULONG(sync_array_size, srv_sync_array_size,
   PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
@@ -19749,10 +19984,15 @@
    NULL, NULL, SRV_STATS_NULLS_EQUAL, &innodb_stats_method_typelib);
 
 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
+static MYSQL_SYSVAR_BOOL(change_buffer_dump, ibuf_dump,
+  PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
+  "Dump the change buffer at startup.",
+  NULL, NULL, FALSE);
+
 static MYSQL_SYSVAR_UINT(change_buffering_debug, ibuf_debug,
   PLUGIN_VAR_RQCMDARG,
-  "Debug flags for InnoDB change buffering (0=none, 2=crash at merge)",
-  NULL, NULL, 0, 0, 2, 0);
+  "Debug flags for InnoDB change buffering (0=none, 1=try to buffer)",
+  NULL, NULL, 0, 0, 1, 0);
 
 static MYSQL_SYSVAR_BOOL(disable_background_merge,
   srv_ibuf_disable_background_merge,
@@ -20092,6 +20332,16 @@
 			 0,
 			 "Perform extra scrubbing to increase test exposure",
 			 NULL, NULL, FALSE);
+
+char *innobase_debug_sync;
+static MYSQL_SYSVAR_STR(debug_sync, innobase_debug_sync,
+			PLUGIN_VAR_NOCMDARG,
+			"debug_sync for innodb purge threads. "
+			"Use it to set up sync points for all purge threads "
+			"at once. The commands will be applied sequentially at "
+			"the beginning of purging the next undo record.",
+			NULL,
+			innobase_debug_sync_set, NULL);
 #endif /* UNIV_DEBUG */
 
 static MYSQL_SYSVAR_BOOL(encrypt_temporary_tables, innodb_encrypt_temporary_tables,
@@ -20222,6 +20472,7 @@
   MYSQL_SYSVAR(change_buffering),
   MYSQL_SYSVAR(change_buffer_max_size),
 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
+  MYSQL_SYSVAR(change_buffer_dump),
   MYSQL_SYSVAR(change_buffering_debug),
   MYSQL_SYSVAR(disable_background_merge),
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
@@ -20303,6 +20554,7 @@
   MYSQL_SYSVAR(background_scrub_data_check_interval),
 #ifdef UNIV_DEBUG
   MYSQL_SYSVAR(debug_force_scrubbing),
+  MYSQL_SYSVAR(debug_sync),
 #endif
   MYSQL_SYSVAR(buf_dump_status_frequency),
   MYSQL_SYSVAR(background_thread),
@@ -21236,31 +21488,6 @@
 				cs2, to, static_cast(len), errors)));
 }
 
-/**********************************************************************
-Issue a warning that the row is too big. */
-void
-ib_warn_row_too_big(const dict_table_t*	table)
-{
-	/* If prefix is true then a 768-byte prefix is stored
-	locally for BLOB fields. */
-	const bool	prefix = !dict_table_has_atomic_blobs(table);
-
-	const ulint	free_space = page_get_free_space_of_empty(
-		table->flags & DICT_TF_COMPACT) / 2;
-
-	THD*	thd = current_thd;
-
-	push_warning_printf(
-		thd, Sql_condition::WARN_LEVEL_WARN, HA_ERR_TO_BIG_ROW,
-		"Row size too large (> " ULINTPF ")."
-		" Changing some columns to TEXT"
-		" or BLOB %smay help. In current row format, BLOB prefix of"
-		" %d bytes is stored inline.", free_space
-		, prefix ? "or using ROW_FORMAT=DYNAMIC or"
-		" ROW_FORMAT=COMPRESSED ": ""
-		, prefix ? DICT_MAX_FIXED_COL_LEN : 0);
-}
-
 /** Validate the requested buffer pool size.  Also, reserve the necessary
 memory needed for buffer pool resize.
 @param[in]	thd	thread handle
diff -Nru mariadb-10.3-10.3.18/storage/innobase/handler/ha_innodb.h mariadb-10.3-10.3.22/storage/innobase/handler/ha_innodb.h
--- mariadb-10.3-10.3.18/storage/innobase/handler/ha_innodb.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/handler/ha_innodb.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, 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
@@ -641,7 +641,7 @@
 	- all but name/path is used, when validating options and using flags. */
 	create_table_info_t(
 		THD*		thd,
-		TABLE*		form,
+		const TABLE*	form,
 		HA_CREATE_INFO*	create_info,
 		char*		table_name,
 		char*		remote_path,
@@ -689,6 +689,13 @@
 
 	void allocate_trx();
 
+	/** Checks that every index have sane size. Depends on strict mode */
+	bool row_size_is_acceptable(const dict_table_t& table,
+				    bool strict) const;
+	/** Checks that given index have sane size. Depends on strict mode */
+	bool row_size_is_acceptable(const dict_index_t& index,
+				    bool strict) const;
+
 	/** Determines InnoDB table flags.
 	If strict_mode=OFF, this will adjust the flags to what should be assumed.
 	@retval true if successful, false if error */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/handler/handler0alter.cc mariadb-10.3-10.3.22/storage/innobase/handler/handler0alter.cc
--- mariadb-10.3-10.3.18/storage/innobase/handler/handler0alter.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/handler/handler0alter.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2005, 2019, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, 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
@@ -122,6 +122,15 @@
 	= ALTER_DROP_NON_UNIQUE_NON_PRIM_INDEX
 	| ALTER_DROP_UNIQUE_INDEX;
 
+/** Operations that InnoDB cares about and can perform without validation */
+static const alter_table_operations INNOBASE_ALTER_NOVALIDATE
+	= INNOBASE_ALTER_NOCREATE
+	| ALTER_VIRTUAL_COLUMN_ORDER
+	| ALTER_COLUMN_NAME
+	| INNOBASE_FOREIGN_OPERATIONS
+	| ALTER_COLUMN_UNVERSIONED
+	| ALTER_DROP_VIRTUAL_COLUMN;
+
 /** Operations that InnoDB cares about and can perform without rebuild */
 static const alter_table_operations INNOBASE_ALTER_NOREBUILD
 	= INNOBASE_ONLINE_CREATE
@@ -2162,7 +2171,7 @@
 	struct TABLE*		table,	/*!< in/out: MySQL table */
 	const rec_t*		rec,	/*!< in: record */
 	const dict_index_t*	index,	/*!< in: index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(
+	const offset_t*		offsets)/*!< in: rec_get_offsets(
 					rec, index, ...) */
 {
 	uint	n_fields	= table->s->fields;
@@ -4278,10 +4287,17 @@
 			case MYSQL_TYPE_MEDIUM_BLOB:
 			case MYSQL_TYPE_BLOB:
 			case MYSQL_TYPE_LONG_BLOB:
+			variable_length:
 				/* Store the empty string for 'core'
 				variable-length NOT NULL columns. */
 				dfield_set_data(d, field_ref_zero, 0);
 				break;
+			case MYSQL_TYPE_STRING:
+				if (col->mbminlen != col->mbmaxlen
+				    && dict_table_is_comp(user_table)) {
+					goto variable_length;
+				}
+				/* fall through */
 			default:
 				/* For fixed-length NOT NULL 'core' columns,
 				get a dummy default value from SQL. Note that
@@ -4394,7 +4410,7 @@
 			uf->field_no = f;
 			uf->new_val = entry->fields[f];
 		}
-		ulint* offsets = NULL;
+		offset_t* offsets = NULL;
 		mem_heap_t* offsets_heap = NULL;
 		big_rec_t* big_rec;
 		err = btr_cur_pessimistic_update(
@@ -4450,7 +4466,7 @@
 		index->set_modified(mtr);
 		err = row_ins_clust_index_entry_low(
 			BTR_NO_LOCKING_FLAG, BTR_MODIFY_TREE, index,
-			index->n_uniq, entry, 0, thr, false);
+			index->n_uniq, entry, 0, thr);
 	} else {
 err_exit:
 		err = DB_CORRUPTION;
@@ -4921,6 +4937,10 @@
 
 	new_clustered = (DICT_CLUSTERED & index_defs[0].ind_type) != 0;
 
+	create_table_info_t info(ctx->prebuilt->trx->mysql_thd, altered_table,
+				 ha_alter_info->create_info, NULL, NULL,
+				 srv_file_per_table);
+
 	/* The primary index would be rebuilt if a FTS Doc ID
 	column is to be added, and the primary index definition
 	is just copied from old table and stored in indexdefs[0] */
@@ -5299,9 +5319,8 @@
 
 		for (uint a = 0; a < ctx->num_to_add_index; a++) {
 			ctx->add_index[a]->table = ctx->new_table;
-			ctx->add_index[a] = dict_index_add_to_cache(
-				ctx->add_index[a], FIL_NULL, false,
-				&error, add_v);
+			error = dict_index_add_to_cache(
+				ctx->add_index[a], FIL_NULL, add_v);
 			ut_a(error == DB_SUCCESS);
 		}
 		DBUG_ASSERT(ha_alter_info->key_count
@@ -5531,6 +5550,7 @@
 				if (index) {
 					dict_mem_index_free(index);
 				}
+error_handling_drop_uncached_1:
 				while (++a < ctx->num_to_add_index) {
 					dict_mem_index_free(ctx->add_index[a]);
 				}
@@ -5540,6 +5560,18 @@
 			}
 
 			ctx->add_index[a] = index;
+			/* For ALTER TABLE...FORCE or OPTIMIZE TABLE,
+			we may only issue warnings, because there will
+			be no schema change from the user perspective. */
+			if (!info.row_size_is_acceptable(
+				    *index,
+				    !!(ha_alter_info->handler_flags
+				       & ~(INNOBASE_INPLACE_IGNORE
+					   | INNOBASE_ALTER_NOVALIDATE
+					   | ALTER_RECREATE_TABLE)))) {
+				error = DB_TOO_BIG_RECORD;
+				goto error_handling_drop_uncached_1;
+			}
 			index->parser = index_defs[a].parser;
 			index->has_new_v_col = has_new_v_col;
 			/* Note the id of the transaction that created this
@@ -5638,6 +5670,10 @@
 				DBUG_ASSERT(index != ctx->add_index[a]);
 			}
 			ctx->add_index[a]= index;
+			if (!info.row_size_is_acceptable(*index, true)) {
+				error = DB_TOO_BIG_RECORD;
+				goto error_handling_drop_uncached;
+			}
 
 			index->parser = index_defs[a].parser;
 			index->has_new_v_col = has_new_v_col;
@@ -5686,6 +5722,10 @@
 				}
 			}
 		}
+	} else if (ctx->is_instant()
+		   && !info.row_size_is_acceptable(*user_table, true)) {
+		error = DB_TOO_BIG_RECORD;
+		goto error_handling;
 	}
 
 	if (ctx->online && ctx->num_to_add_index) {
@@ -5751,15 +5791,13 @@
 				goto error_handling;
 			}
 
-			ctx->new_table->fts->fts_status
-				|= TABLE_DICT_LOCKED;
+			ctx->new_table->fts->dict_locked = true;
 
 			error = innobase_fts_load_stopword(
 				ctx->new_table, ctx->trx,
 				ctx->prebuilt->trx->mysql_thd)
 				? DB_SUCCESS : DB_ERROR;
-			ctx->new_table->fts->fts_status
-				&= ulint(~TABLE_DICT_LOCKED);
+			ctx->new_table->fts->dict_locked = false;
 
 			if (error != DB_SUCCESS) {
 				goto error_handling;
@@ -7430,27 +7468,23 @@
 }
 
 /** Rename a column in the data dictionary tables.
-@param[in] user_table		InnoDB table that was being altered
-@param[in] trx			Data dictionary transaction
+@param[in] ctx			ALTER TABLE context
+@param[in,out] trx		Data dictionary transaction
 @param[in] table_name		Table name in MySQL
 @param[in] nth_col		0-based index of the column
 @param[in] from			old column name
 @param[in] to			new column name
-@param[in] new_clustered	whether the table has been rebuilt
-@param[in] evict_fk_cache	Evict the fk info from cache
 @retval true Failure
 @retval false Success */
 static MY_ATTRIBUTE((nonnull, warn_unused_result))
 bool
 innobase_rename_column_try(
-	const dict_table_t*	user_table,
-	trx_t*			trx,
-	const char*		table_name,
-	ulint			nth_col,
-	const char*		from,
-	const char*		to,
-	bool			new_clustered,
-	bool			evict_fk_cache)
+	const ha_innobase_inplace_ctx&	ctx,
+	trx_t*				trx,
+	const char*			table_name,
+	ulint				nth_col,
+	const char*			from,
+	const char*			to)
 {
 	pars_info_t*	info;
 	dberr_t		error;
@@ -7462,13 +7496,13 @@
 	ut_ad(mutex_own(&dict_sys->mutex));
 	ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
 
-	if (new_clustered) {
+	if (ctx.need_rebuild()) {
 		goto rename_foreign;
 	}
 
 	info = pars_info_create();
 
-	pars_info_add_ull_literal(info, "tableid", user_table->id);
+	pars_info_add_ull_literal(info, "tableid", ctx.old_table->id);
 	pars_info_add_int4_literal(info, "nth", nth_col);
 	pars_info_add_str_literal(info, "new", to);
 
@@ -7498,7 +7532,7 @@
 	trx->op_info = "renaming column in SYS_FIELDS";
 
 	for (const dict_index_t* index = dict_table_get_first_index(
-		     user_table);
+		     ctx.old_table);
 	     index != NULL;
 	     index = dict_table_get_next_index(index)) {
 
@@ -7551,8 +7585,8 @@
 	std::set fk_evict;
 	bool		foreign_modified;
 
-	for (dict_foreign_set::const_iterator it = user_table->foreign_set.begin();
-	     it != user_table->foreign_set.end();
+	for (dict_foreign_set::const_iterator it = ctx.old_table->foreign_set.begin();
+	     it != ctx.old_table->foreign_set.end();
 	     ++it) {
 
 		dict_foreign_t*	foreign = *it;
@@ -7565,6 +7599,14 @@
 				continue;
 			}
 
+			/* Ignore the foreign key rename if fk info
+			is being dropped. */
+			if (innobase_dropping_foreign(
+				    foreign, ctx.drop_fk,
+				    ctx.num_to_drop_fk)) {
+				continue;
+			}
+
 			info = pars_info_create();
 
 			pars_info_add_str_literal(info, "id", foreign->id);
@@ -7593,8 +7635,8 @@
 	}
 
 	for (dict_foreign_set::const_iterator it
-		= user_table->referenced_set.begin();
-	     it != user_table->referenced_set.end();
+		= ctx.old_table->referenced_set.begin();
+	     it != ctx.old_table->referenced_set.end();
 	     ++it) {
 
 		foreign_modified = false;
@@ -7635,7 +7677,7 @@
 	}
 
 	/* Reload the foreign key info for instant table too. */
-	if (new_clustered || evict_fk_cache) {
+	if (ctx.need_rebuild() || ctx.is_instant()) {
 		std::for_each(fk_evict.begin(), fk_evict.end(),
 			      dict_foreign_remove_from_cache);
 	}
@@ -7686,12 +7728,10 @@
 						: i - num_v;
 
 				if (innobase_rename_column_try(
-					    ctx->old_table, trx, table_name,
+					    *ctx, trx, table_name,
 					    col_n,
 					    cf->field->field_name.str,
-					    cf->field_name.str,
-					    ctx->need_rebuild(),
-					    ctx->is_instant())) {
+					    cf->field_name.str)) {
 					return(true);
 				}
 				goto processed_field;
@@ -8214,7 +8254,7 @@
 	also be loaded. */
 	while (err == DB_SUCCESS && !fk_tables.empty()) {
 		dict_table_t*	table = dict_load_table(
-			fk_tables.front(), true, DICT_ERR_IGNORE_NONE);
+			fk_tables.front(), DICT_ERR_IGNORE_NONE);
 
 		if (table == NULL) {
 			err = DB_TABLE_NOT_FOUND;
@@ -8924,6 +8964,7 @@
 					    || (index->type
 						& DICT_CORRUPT));
 				DBUG_ASSERT(index->table->fts);
+				DEBUG_SYNC_C("norebuild_fts_drop");
 				fts_drop_index(index->table, index, trx);
 			}
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/ibuf/ibuf0ibuf.cc mariadb-10.3-10.3.22/storage/innobase/ibuf/ibuf0ibuf.cc
--- mariadb-10.3-10.3.18/storage/innobase/ibuf/ibuf0ibuf.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/ibuf/ibuf0ibuf.cc	2020-01-26 18:37:29.000000000 +0000
@@ -185,6 +185,8 @@
 ulong	innodb_change_buffering;
 
 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
+/** Dump the change buffer at startup */
+my_bool	ibuf_dump;
 /** Flag to control insert buffer debugging. */
 uint	ibuf_debug;
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
@@ -336,10 +338,8 @@
 		page_id_t(IBUF_SPACE_ID, FSP_IBUF_HEADER_PAGE_NO),
 		univ_page_size, RW_X_LATCH, mtr);
 
-
-	if (!block->page.encrypted) {
+	if (block) {
 		buf_block_dbg_add_level(block, SYNC_IBUF_HEADER);
-
 		page = buf_block_get_frame(block);
 	}
 
@@ -361,7 +361,7 @@
 	ut_ad(ibuf_inside(mtr));
 	ut_ad(mutex_own(&ibuf_mutex));
 
-	mtr_sx_lock(dict_index_get_lock(ibuf->index), mtr);
+	mtr_sx_lock_index(ibuf->index, mtr);
 
 	/* only segment list access is exclusive each other */
 	block = buf_page_get(
@@ -459,7 +459,7 @@
 
 	compile_time_assert(IBUF_SPACE_ID == TRX_SYS_SPACE);
 	compile_time_assert(IBUF_SPACE_ID == 0);
-	mtr_x_lock(&fil_system.sys_space->latch, &mtr);
+	mtr_x_lock_space(fil_system.sys_space, &mtr);
 
 	mutex_enter(&ibuf_mutex);
 
@@ -508,6 +508,25 @@
 #endif /* BTR_CUR_ADAPT */
 	ibuf->index->page = FSP_IBUF_TREE_ROOT_PAGE_NO;
 	ut_d(ibuf->index->cached = TRUE);
+
+#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
+	if (!ibuf_dump) {
+		return error;
+	}
+	ib::info() << "Dumping the change buffer";
+	ibuf_mtr_start(&mtr);
+	btr_pcur_t pcur;
+	if (DB_SUCCESS == btr_pcur_open_at_index_side(
+		    true, ibuf->index, BTR_SEARCH_LEAF, &pcur,
+		    true, 0, &mtr)) {
+		while (btr_pcur_move_to_next_user_rec(&pcur, &mtr)) {
+			rec_print_old(stderr, btr_pcur_get_rec(&pcur));
+		}
+	}
+	ibuf_mtr_commit(&mtr);
+	ib::info() << "Dumped the change buffer";
+#endif
+
 	return (error);
 }
 
@@ -1958,7 +1977,7 @@
 	mtr_start(&mtr);
 	/* Acquire the fsp latch before the ibuf header, obeying the latching
 	order */
-	mtr_x_lock(&fil_system.sys_space->latch, &mtr);
+	mtr_x_lock_space(fil_system.sys_space, &mtr);
 	header_page = ibuf_header_page_get(&mtr);
 
 	/* Allocate a new page: NOTE that if the page has been a part of a
@@ -1989,14 +2008,14 @@
 	buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
 	page = buf_block_get_frame(block);
 
+	mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST,
+			 MLOG_2BYTES, &mtr);
+
 	/* Add the page to the free list and update the ibuf size data */
 
 	flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
 		      page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr);
 
-	mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST,
-			 MLOG_2BYTES, &mtr);
-
 	ibuf->seg_size++;
 	ibuf->free_list_len++;
 
@@ -2037,7 +2056,7 @@
 	/* Acquire the fsp latch before the ibuf header, obeying the latching
 	order */
 
-	mtr_x_lock(&fil_system.sys_space->latch, &mtr);
+	mtr_x_lock_space(fil_system.sys_space, &mtr);
 	header_page = ibuf_header_page_get(&mtr);
 
 	/* Prevent pessimistic inserts to insert buffer trees for a while */
@@ -2961,7 +2980,7 @@
 
 	/* Look at the previous page */
 
-	prev_page_no = btr_page_get_prev(page, mtr);
+	prev_page_no = btr_page_get_prev(page);
 
 	if (prev_page_no == FIL_NULL) {
 
@@ -2982,7 +3001,7 @@
 	}
 
 #ifdef UNIV_BTR_DEBUG
-	ut_a(btr_page_get_next(prev_page, mtr) == page_get_page_no(page));
+	ut_a(!memcmp(prev_page + FIL_PAGE_NEXT, page + FIL_PAGE_OFFSET, 4));
 #endif /* UNIV_BTR_DEBUG */
 
 	rec = page_get_supremum_rec(prev_page);
@@ -3033,7 +3052,7 @@
 
 	/* Look at the next page */
 
-	next_page_no = btr_page_get_next(page, mtr);
+	next_page_no = btr_page_get_next(page);
 
 	if (next_page_no == FIL_NULL) {
 
@@ -3054,7 +3073,7 @@
 	}
 
 #ifdef UNIV_BTR_DEBUG
-	ut_a(btr_page_get_prev(next_page, mtr) == page_get_page_no(page));
+	ut_a(!memcmp(next_page + FIL_PAGE_PREV, page + FIL_PAGE_OFFSET, 4));
 #endif /* UNIV_BTR_DEBUG */
 
 	rec = page_get_infimum_rec(next_page);
@@ -3291,7 +3310,7 @@
 	dtuple_t*	ibuf_entry;
 	mem_heap_t*	offsets_heap	= NULL;
 	mem_heap_t*	heap;
-	ulint*		offsets		= NULL;
+	offset_t*	offsets		= NULL;
 	ulint		buffered;
 	lint		min_n_recs;
 	rec_t*		ins_rec;
@@ -3751,7 +3770,7 @@
 	buf_block_t*	block,	/*!< in/out: index page where the buffered
 				entry should be placed */
 	dict_index_t*	index,	/*!< in: record descriptor */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t*	heap,	/*!< in/out: memory heap */
 	mtr_t*		mtr,	/*!< in/out: mtr */
 	page_cur_t*	page_cur)/*!< in/out: cursor positioned on the record
@@ -3831,7 +3850,7 @@
 	ulint		low_match;
 	page_t*		page		= buf_block_get_frame(block);
 	rec_t*		rec;
-	ulint*		offsets;
+	offset_t*	offsets;
 	mem_heap_t*	heap;
 
 	DBUG_ENTER("ibuf_insert_to_index_page");
@@ -4088,8 +4107,8 @@
 		/* TODO: the below should probably be a separate function,
 		it's a bastardized version of btr_cur_optimistic_delete. */
 
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-		ulint*		offsets	= offsets_;
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t*	offsets	= offsets_;
 		mem_heap_t*	heap = NULL;
 		ulint		max_ins_size = 0;
 
@@ -4224,23 +4243,6 @@
 	ut_ad(ibuf_rec_get_page_no(mtr, btr_pcur_get_rec(pcur)) == page_no);
 	ut_ad(ibuf_rec_get_space(mtr, btr_pcur_get_rec(pcur)) == space);
 
-#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
-	if (ibuf_debug == 2) {
-		/* Inject a fault (crash). We do this before trying
-		optimistic delete, because a pessimistic delete in the
-		change buffer would require a larger test case. */
-
-		/* Flag the buffered record as processed, to avoid
-		an assertion failure after crash recovery. */
-		btr_cur_set_deleted_flag_for_ibuf(
-			btr_pcur_get_rec(pcur), NULL, TRUE, mtr);
-
-		ibuf_mtr_commit(mtr);
-		log_write_up_to(LSN_MAX, true);
-		DBUG_SUICIDE();
-	}
-#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
-
 	success = btr_cur_optimistic_delete(btr_pcur_get_btr_cur(pcur),
 					    0, mtr);
 
@@ -4311,6 +4313,71 @@
 	return(TRUE);
 }
 
+/**
+Delete any buffered entries for a page.
+This prevents an infinite loop on slow shutdown
+in the case where the change buffer bitmap claims that no buffered
+changes exist, while entries exist in the change buffer tree.
+@param page_id  page number for which there should be no unbuffered changes */
+ATTRIBUTE_COLD void ibuf_delete_recs(const page_id_t page_id)
+{
+	ulint dops[IBUF_OP_COUNT];
+	mtr_t mtr;
+	btr_pcur_t pcur;
+	mem_heap_t* heap = mem_heap_create(512);
+	const dtuple_t* tuple = ibuf_search_tuple_build(
+		page_id.space(), page_id.page_no(), heap);
+	memset(dops, 0, sizeof(dops));
+
+loop:
+	ibuf_mtr_start(&mtr);
+	btr_pcur_open(ibuf->index, tuple, PAGE_CUR_GE, BTR_MODIFY_LEAF,
+		      &pcur, &mtr);
+
+	if (!btr_pcur_is_on_user_rec(&pcur)) {
+		ut_ad(btr_pcur_is_after_last_in_tree(&pcur));
+		goto func_exit;
+	}
+
+	for (;;) {
+		ut_ad(btr_pcur_is_on_user_rec(&pcur));
+
+		const rec_t* ibuf_rec = btr_pcur_get_rec(&pcur);
+
+		if (ibuf_rec_get_space(&mtr, ibuf_rec)
+		    != page_id.space()
+		    || ibuf_rec_get_page_no(&mtr, ibuf_rec)
+		    != page_id.page_no()) {
+			break;
+		}
+
+		dops[ibuf_rec_get_op_type(&mtr, ibuf_rec)]++;
+
+		/* Delete the record from ibuf */
+		if (ibuf_delete_rec(page_id.space(), page_id.page_no(),
+				    &pcur, tuple, &mtr)) {
+			/* Deletion was pessimistic and mtr was committed:
+			we start from the beginning again */
+			ut_ad(mtr.has_committed());
+			goto loop;
+		}
+
+		if (btr_pcur_is_after_last_on_page(&pcur)) {
+			ibuf_mtr_commit(&mtr);
+			btr_pcur_close(&pcur);
+			goto loop;
+		}
+	}
+
+func_exit:
+	ibuf_mtr_commit(&mtr);
+	btr_pcur_close(&pcur);
+
+	ibuf_add_ops(ibuf->n_discarded_ops, dops);
+
+	mem_heap_free(heap);
+}
+
 /** When an index page is read from a disk to the buffer pool, this function
 applies any buffered operations to the page and deletes the entries from the
 insert buffer. If the page is not read, but created in the buffer pool, this
@@ -4330,9 +4397,7 @@
 	const page_size_t*	page_size,
 	ibool			update_ibuf_bitmap)
 {
-	mem_heap_t*	heap;
 	btr_pcur_t	pcur;
-	dtuple_t*	search_tuple;
 #ifdef UNIV_IBUF_DEBUG
 	ulint		volume			= 0;
 #endif /* UNIV_IBUF_DEBUG */
@@ -4405,9 +4470,16 @@
 			ibuf_mtr_commit(&mtr);
 
 			if (!bitmap_bits) {
-				/* No inserts buffered for this page */
-
+				/* No changes are buffered for this page. */
 				space->release();
+				if (UNIV_UNLIKELY(srv_shutdown_state)
+				    && !srv_fast_shutdown) {
+					/* Prevent an infinite loop on slow
+					shutdown, in case the bitmap bits are
+					wrongly clear even though buffered
+					changes exist. */
+					ibuf_delete_recs(page_id);
+				}
 				return;
 			}
 		}
@@ -4420,9 +4492,9 @@
 		space = NULL;
 	}
 
-	heap = mem_heap_create(512);
+	mem_heap_t* heap = mem_heap_create(512);
 
-	search_tuple = ibuf_search_tuple_build(
+	const dtuple_t* search_tuple = ibuf_search_tuple_build(
 		page_id.space(), page_id.page_no(), heap);
 
 	if (block != NULL) {
@@ -4487,7 +4559,7 @@
 	}
 
 	if (!btr_pcur_is_on_user_rec(&pcur)) {
-		ut_ad(btr_pcur_is_after_last_in_tree(&pcur));
+		ut_ad(btr_pcur_is_after_last_on_page(&pcur));
 		goto reset_bit;
 	}
 
@@ -4720,7 +4792,7 @@
 		&pcur, &mtr);
 
 	if (!btr_pcur_is_on_user_rec(&pcur)) {
-		ut_ad(btr_pcur_is_after_last_in_tree(&pcur));
+		ut_ad(btr_pcur_is_after_last_on_page(&pcur));
 		goto leave_loop;
 	}
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/btr0btr.h mariadb-10.3-10.3.22/storage/innobase/include/btr0btr.h
--- mariadb-10.3-10.3.18/storage/innobase/include/btr0btr.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/btr0btr.h	2020-01-26 18:37:29.000000000 +0000
@@ -30,6 +30,7 @@
 
 #include "dict0dict.h"
 #include "data0data.h"
+#include "rem0types.h"
 #include "page0cur.h"
 #include "btr0types.h"
 #include "gis0type.h"
@@ -242,7 +243,6 @@
 	dict_index_t*		index,
 	mtr_t*			mtr);
 
-# ifdef UNIV_DEBUG
 /** Gets a buffer page and declares its latching order level.
 @param page_id tablespace/page identifier
 @param page_size page size
@@ -250,37 +250,9 @@
 @param index index tree, may be NULL if not the insert buffer tree
 @param mtr mini-transaction handle
 @return the block descriptor */
-#  define btr_block_get(page_id, page_size, mode, index, mtr)	\
+# define btr_block_get(page_id, page_size, mode, index, mtr)	\
 	btr_block_get_func(page_id, page_size, mode,		\
 		__FILE__, __LINE__, (dict_index_t*)index, mtr)
-# else /* UNIV_DEBUG */
-/** Gets a buffer page and declares its latching order level.
-@param page_id tablespace/page identifier
-@param page_size page size
-@param mode latch mode
-@param index index tree, may be NULL if not the insert buffer tree
-@param mtr mini-transaction handle
-@return the block descriptor */
-#  define btr_block_get(page_id, page_size, mode, index, mtr)	\
-	btr_block_get_func(page_id, page_size, mode, __FILE__, __LINE__, (dict_index_t*)index, mtr)
-# endif /* UNIV_DEBUG */
-/** Gets a buffer page and declares its latching order level.
-@param page_id tablespace/page identifier
-@param page_size page size
-@param mode latch mode
-@param index index tree, may be NULL if not the insert buffer tree
-@param mtr mini-transaction handle
-@return the uncompressed page frame */
-UNIV_INLINE
-page_t*
-btr_page_get(
-/*=========*/
-	const page_id_t		page_id,
-	const page_size_t&	page_size,
-	ulint			mode,
-	dict_index_t*		index,
-	mtr_t*			mtr)
-	MY_ATTRIBUTE((warn_unused_result));
 /**************************************************************//**
 Gets the index id field of a page.
 @return index id */
@@ -308,26 +280,23 @@
 
 	return(level);
 } MY_ATTRIBUTE((warn_unused_result))
-/********************************************************//**
-Gets the next index page number.
-@return next page number */
-UNIV_INLINE
-ulint
-btr_page_get_next(
-/*==============*/
-	const page_t*	page,	/*!< in: index page */
-	mtr_t*		mtr)	/*!< in: mini-transaction handle */
-	MY_ATTRIBUTE((warn_unused_result));
-/********************************************************//**
-Gets the previous index page number.
-@return prev page number */
-UNIV_INLINE
-ulint
-btr_page_get_prev(
-/*==============*/
-	const page_t*	page,	/*!< in: index page */
-	mtr_t*		mtr)	/*!< in: mini-transaction handle */
-	MY_ATTRIBUTE((warn_unused_result));
+
+/** Read FIL_PAGE_NEXT.
+@param page  buffer pool page
+@return previous page number */
+inline uint32_t btr_page_get_next(const page_t* page)
+{
+  return mach_read_from_4(page + FIL_PAGE_NEXT);
+}
+
+/** Read FIL_PAGE_PREV.
+@param page  buffer pool page
+@return previous page number */
+inline uint32_t btr_page_get_prev(const page_t* page)
+{
+  return mach_read_from_4(page + FIL_PAGE_PREV);
+}
+
 /**************************************************************//**
 Releases the latch on a leaf page and bufferunfixes it. */
 UNIV_INLINE
@@ -351,7 +320,7 @@
 btr_node_ptr_get_child_page_no(
 /*===========================*/
 	const rec_t*	rec,	/*!< in: node pointer record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 
 /** Create the root node for a new index tree.
@@ -436,7 +405,7 @@
 				on the root page; when the function returns,
 				the cursor is positioned on the predecessor
 				of the inserted record */
-	ulint**		offsets,/*!< out: offsets on inserted record */
+	offset_t**	offsets,/*!< out: offsets on inserted record */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap
 				that can be emptied, or NULL */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
@@ -486,30 +455,22 @@
 	dict_index_t*	index,	/*!< in: the index tree of the page */
 	mtr_t*		mtr)	/*!< in/out: mini-transaction */
 	MY_ATTRIBUTE((nonnull));
-/*************************************************************//**
-Decides if the page should be split at the convergence point of
-inserts converging to left.
-@return TRUE if split recommended */
-ibool
-btr_page_get_split_rec_to_left(
-/*===========================*/
-	btr_cur_t*	cursor,	/*!< in: cursor at which to insert */
-	rec_t**		split_rec)/*!< out: if split recommended,
-				the first record on upper half page,
-				or NULL if tuple should be first */
-	MY_ATTRIBUTE((warn_unused_result));
-/*************************************************************//**
-Decides if the page should be split at the convergence point of
-inserts converging to right.
-@return TRUE if split recommended */
-ibool
-btr_page_get_split_rec_to_right(
-/*============================*/
-	btr_cur_t*	cursor,	/*!< in: cursor at which to insert */
-	rec_t**		split_rec)/*!< out: if split recommended,
-				the first record on upper half page,
-				or NULL if tuple should be first */
-	MY_ATTRIBUTE((warn_unused_result));
+/** Decide if the page should be split at the convergence point of inserts
+converging to the left.
+@param[in]	cursor	insert position
+@return the first record to be moved to the right half page
+@retval	NULL if no split is recommended */
+rec_t* btr_page_get_split_rec_to_left(const btr_cur_t* cursor);
+/** Decide if the page should be split at the convergence point of inserts
+converging to the right.
+@param[in]	cursor		insert position
+@param[out]	split_rec	if split recommended, the first record
+				on the right half page, or
+				NULL if the to-be-inserted record
+				should be first
+@return whether split is recommended */
+bool
+btr_page_get_split_rec_to_right(const btr_cur_t* cursor, rec_t** split_rec);
 
 /*************************************************************//**
 Splits an index page to halves and inserts the tuple. It is assumed
@@ -527,7 +488,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor at which to insert; when the
 				function returns, the cursor is positioned
 				on the predecessor of the inserted record */
-	ulint**		offsets,/*!< out: offsets on inserted record */
+	offset_t**	offsets,/*!< out: offsets on inserted record */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap
 				that can be emptied, or NULL */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
@@ -549,14 +510,10 @@
 	mtr_t*		mtr);	/*!< in: mtr */
 #define btr_insert_on_non_leaf_level(f,i,l,t,m)			\
 	btr_insert_on_non_leaf_level_func(f,i,l,t,__FILE__,__LINE__,m)
-/****************************************************************//**
-Sets a record as the predefined minimum record. */
-void
-btr_set_min_rec_mark(
-/*=================*/
-	rec_t*	rec,	/*!< in/out: record */
-	mtr_t*	mtr)	/*!< in: mtr */
-	MY_ATTRIBUTE((nonnull));
+
+/** Sets a record as the predefined minimum record. */
+void btr_set_min_rec_mark(rec_t* rec, mtr_t* mtr) MY_ATTRIBUTE((nonnull));
+
 /** Seek to the parent page of a B-tree page.
 @param[in,out]	index	b-tree
 @param[in]	block	child page
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/btr0btr.ic mariadb-10.3-10.3.22/storage/innobase/include/btr0btr.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/btr0btr.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/btr0btr.ic	2020-01-26 18:37:29.000000000 +0000
@@ -95,36 +95,6 @@
 	}
 }
 
-/** Gets a buffer page and declares its latching order level.
-@param space	tablespace identifier
-@param zip_size	compressed page size in bytes or 0 for uncompressed pages
-@param page_no	page number
-@param mode	latch mode
-@param idx	index tree, may be NULL if not the insert buffer tree
-@param mtr	mini-transaction handle
-@return the uncompressed page frame */
-UNIV_INLINE
-page_t*
-btr_page_get(
-/*=========*/
-	const page_id_t		page_id,
-	const page_size_t&	page_size,
-	ulint			mode,
-	dict_index_t*		index,
-	mtr_t*			mtr)
-{
-	buf_block_t* block=NULL;
-	buf_frame_t* frame=NULL;
-
-	block = btr_block_get(page_id, page_size, mode, index, mtr);
-
-	if (block) {
-		frame = buf_block_get_frame(block);
-	}
-
-	return ((page_t*)frame);
-}
-
 /**************************************************************//**
 Gets the index id field of a page.
 @return index id */
@@ -165,23 +135,6 @@
 }
 
 /********************************************************//**
-Gets the next index page number.
-@return next page number */
-UNIV_INLINE
-ulint
-btr_page_get_next(
-/*==============*/
-	const page_t*	page,	/*!< in: index page */
-	mtr_t*		mtr MY_ATTRIBUTE((unused)))
-				/*!< in: mini-transaction handle */
-{
-	ut_ad(page != NULL);
-	ut_ad(mtr != NULL);
-
-	return(mach_read_from_4(page + FIL_PAGE_NEXT));
-}
-
-/********************************************************//**
 Sets the next index page field. */
 UNIV_INLINE
 void
@@ -205,22 +158,6 @@
 }
 
 /********************************************************//**
-Gets the previous index page number.
-@return prev page number */
-UNIV_INLINE
-ulint
-btr_page_get_prev(
-/*==============*/
-	const page_t*	page,	/*!< in: index page */
-	mtr_t*	mtr MY_ATTRIBUTE((unused))) /*!< in: mini-transaction handle */
-{
-	ut_ad(page != NULL);
-	ut_ad(mtr != NULL);
-
-	return(mach_read_from_4(page + FIL_PAGE_PREV));
-}
-
-/********************************************************//**
 Sets the previous index page field. */
 UNIV_INLINE
 void
@@ -255,7 +192,7 @@
 btr_node_ptr_get_child_page_no(
 /*===========================*/
 	const rec_t*	rec,	/*!< in: node pointer record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	const byte*	field;
 	ulint		len;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/btr0bulk.h mariadb-10.3-10.3.22/storage/innobase/include/btr0bulk.h
--- mariadb-10.3-10.3.18/storage/innobase/include/btr0bulk.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/btr0bulk.h	2020-01-26 18:37:29.000000000 +0000
@@ -28,6 +28,7 @@
 #define btr0bulk_h
 
 #include "dict0dict.h"
+#include "rem0types.h"
 #include "page0cur.h"
 
 #include 
@@ -103,7 +104,7 @@
 	/** Insert a record in the page.
 	@param[in]	rec		record
 	@param[in]	offsets		record offsets */
-	void insert(const rec_t* rec, ulint* offsets);
+	void insert(const rec_t* rec, offset_t* offsets);
 
 	/** Mark end of insertion to the page. Scan all records to set page
 	dirs, and set page header members. */
@@ -127,7 +128,7 @@
 	@param[in]	big_rec		external recrod
 	@param[in]	offsets		record offsets
 	@return	error code */
-	dberr_t storeExt(const big_rec_t* big_rec, ulint* offsets);
+	dberr_t storeExt(const big_rec_t* big_rec, offset_t* offsets);
 
 	/** Get node pointer
 	@return node pointer */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/btr0cur.h mariadb-10.3-10.3.22/storage/innobase/include/btr0cur.h
--- mariadb-10.3-10.3.18/storage/innobase/include/btr0cur.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/btr0cur.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2020, 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
@@ -30,6 +30,7 @@
 #include "dict0dict.h"
 #include "page0cur.h"
 #include "btr0types.h"
+#include "rem0types.h"
 #include "gis0type.h"
 #include "my_base.h"
 
@@ -271,7 +272,7 @@
 				specified */
 	btr_cur_t*	cursor,	/*!< in: cursor on page after which to insert;
 				cursor stays valid */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap */
 	dtuple_t*	entry,	/*!< in/out: entry to insert */
 	rec_t**		rec,	/*!< out: pointer to inserted record if
@@ -307,7 +308,7 @@
 				insertion will certainly succeed */
 	btr_cur_t*	cursor,	/*!< in: cursor after which to insert;
 				cursor stays valid */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap
 				that can be emptied */
 	dtuple_t*	entry,	/*!< in/out: entry to insert */
@@ -341,7 +342,7 @@
 	page_cur_t*	cursor,	/*!< in/out: B-tree page cursor */
 	dict_index_t*	index,	/*!< in: the index corresponding to cursor */
 #ifdef UNIV_DEBUG
-	ulint*		offsets,/*!< in/out: offsets of the cursor record */
+	offset_t*	offsets,/*!< in/out: offsets of the cursor record */
 #endif /* UNIV_DEBUG */
 	ulint		length,	/*!< in: size needed */
 	bool		create,	/*!< in: true=delete-and-insert,
@@ -368,7 +369,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor on the record to update;
 				cursor stays valid and positioned on the
 				same record */
-	ulint*		offsets,/*!< in/out: offsets on cursor->page_cur.rec */
+	offset_t*	offsets,/*!< in/out: offsets on cursor->page_cur.rec */
 	const upd_t*	update,	/*!< in: update vector */
 	ulint		cmpl_info,/*!< in: compiler info on secondary index
 				updates */
@@ -410,7 +411,7 @@
 	btr_cur_t*	cursor,	/*!< in: cursor on the record to update;
 				cursor stays valid and positioned on the
 				same record */
-	ulint**		offsets,/*!< out: offsets on cursor->page_cur.rec */
+	offset_t**	offsets,/*!< out: offsets on cursor->page_cur.rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to NULL or memory heap */
 	const upd_t*	update,	/*!< in: update vector; this must also
 				contain trx id and roll ptr fields */
@@ -437,7 +438,7 @@
 	btr_cur_t*	cursor,	/*!< in/out: cursor on the record to update;
 				cursor may become invalid if *big_rec == NULL
 				|| !(flags & BTR_KEEP_POS_FLAG) */
-	ulint**		offsets,/*!< out: offsets on cursor->page_cur.rec */
+	offset_t**	offsets,/*!< out: offsets on cursor->page_cur.rec */
 	mem_heap_t**	offsets_heap,
 				/*!< in/out: pointer to memory heap
 				that can be emptied */
@@ -469,7 +470,7 @@
 	buf_block_t*	block,	/*!< in/out: buffer block of the record */
 	rec_t*		rec,	/*!< in/out: record */
 	dict_index_t*	index,	/*!< in: clustered index of the record */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec) */
 	que_thr_t*	thr,	/*!< in: query thread */
 	const dtuple_t*	entry,	/*!< in: dtuple for the deleting record */
 	mtr_t*		mtr)	/*!< in/out: mini-transaction */
@@ -636,7 +637,7 @@
 ulint
 btr_rec_get_externally_stored_len(
 	const rec_t*	rec,
-	const ulint*	offsets);
+	const offset_t*	offsets);
 
 /*******************************************************************//**
 Marks non-updated off-page fields as disowned by this record. The ownership
@@ -650,7 +651,7 @@
 				part will be updated, or NULL */
 	rec_t*		rec,	/*!< in/out: record in a clustered index */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	const upd_t*	update,	/*!< in: update vector */
 	mtr_t*		mtr)	/*!< in/out: mini-transaction */
 	MY_ATTRIBUTE((nonnull(2,3,4,5,6)));
@@ -689,7 +690,7 @@
 	btr_pcur_t*	pcur,		/*!< in/out: a persistent cursor. if
 					btr_mtr is restarted, then this can
 					be repositioned. */
-	ulint*		offsets,	/*!< in/out: rec_get_offsets() on
+	offset_t*	offsets,	/*!< in/out: rec_get_offsets() on
 					pcur. the "external storage" flags
 					in offsets will correctly correspond
 					to rec when this function returns */
@@ -720,7 +721,7 @@
 	byte*		field_ref,	/*!< in/out: field reference */
 	const rec_t*	rec,		/*!< in: record containing field_ref, for
 					page_zip_write_blob_ptr(), or NULL */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index),
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec, index),
 					or NULL */
 	page_zip_des_t*	page_zip,	/*!< in: compressed page corresponding
 					to rec, or NULL if rec == NULL */
@@ -777,24 +778,12 @@
 byte*
 btr_rec_copy_externally_stored_field(
 	const rec_t*		rec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	const page_size_t&	page_size,
 	ulint			no,
 	ulint*			len,
 	mem_heap_t*		heap);
 
-/*******************************************************************//**
-Flags the data tuple fields that are marked as extern storage in the
-update vector.  We use this function to remember which fields we must
-mark as extern storage in a record inserted for an update.
-@return number of flagged external columns */
-ulint
-btr_push_update_extern_fields(
-/*==========================*/
-	dtuple_t*	tuple,	/*!< in/out: data tuple */
-	const upd_t*	update,	/*!< in: update vector */
-	mem_heap_t*	heap)	/*!< in: memory heap */
-	MY_ATTRIBUTE((nonnull));
 /***********************************************************//**
 Sets a secondary index record's delete mark to the given value. This
 function is only used by the insert buffer merge mechanism. */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/buf0buf.h mariadb-10.3-10.3.22/storage/innobase/include/buf0buf.h
--- mariadb-10.3-10.3.18/storage/innobase/include/buf0buf.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/buf0buf.h	2020-01-26 18:37:29.000000000 +0000
@@ -706,6 +706,27 @@
 #endif
 	MY_ATTRIBUTE((warn_unused_result));
 
+inline void *aligned_malloc(size_t size, size_t align)
+{
+#ifdef _MSC_VER
+  return _aligned_malloc(size, align);
+#else
+  void *result;
+  if (posix_memalign(&result, align, size))
+    result= NULL;
+  return result;
+#endif
+}
+
+inline void aligned_free(void *ptr)
+{
+#ifdef _MSC_VER
+  _aligned_free(ptr);
+#else
+  free(ptr);
+#endif
+}
+
 #ifndef UNIV_INNOCHECKSUM
 /**********************************************************************//**
 Gets the space id, page offset, and byte offset within page of a
@@ -1468,8 +1489,6 @@
 					if written again we check is TRIM
 					operation needed. */
 
-	bool            encrypted;	/*!< page is still encrypted */
-
 	ulint           real_size;	/*!< Real size of the page
 					Normal pages == srv_page_size
 					page compressed pages, payload
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/buf0buf.ic mariadb-10.3-10.3.22/storage/innobase/include/buf0buf.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/buf0buf.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/buf0buf.ic	2020-01-26 18:37:29.000000000 +0000
@@ -113,7 +113,17 @@
 buf_pool_get_n_pages(void)
 /*======================*/
 {
-	return buf_pool_get_curr_size() >> srv_page_size_shift;
+  if (!buf_pool_ptr)
+    return buf_pool_get_curr_size() >> srv_page_size_shift;
+
+  ulint chunk_size= 0;
+  for (uint i= 0; i < srv_buf_pool_instances; i++)
+  {
+    buf_pool_t* buf_pool = buf_pool_from_array(i);
+    for (uint j= 0; j < buf_pool->n_chunks; j++)
+      chunk_size+= buf_pool->chunks[j].size;
+  }
+  return chunk_size;
 }
 
 /********************************************************************//**
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/buf0flu.h mariadb-10.3-10.3.22/storage/innobase/include/buf0flu.h
--- mariadb-10.3-10.3.18/storage/innobase/include/buf0flu.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/buf0flu.h	2020-01-26 18:37:29.000000000 +0000
@@ -167,16 +167,6 @@
 buf_flush_wait_flushed(
 	lsn_t		new_oldest);
 
-/******************************************************************//**
-Waits until a flush batch of the given type ends. This is called by
-a thread that only wants to wait for a flush to end but doesn't do
-any flushing itself. */
-void
-buf_flush_wait_batch_end_wait_only(
-/*===============================*/
-	buf_pool_t*	buf_pool,	/*!< in: buffer pool instance */
-	buf_flush_t	type);		/*!< in: BUF_FLUSH_LRU
-					or BUF_FLUSH_LIST */
 /********************************************************************//**
 This function should be called at a mini-transaction commit, if a page was
 modified in it. Puts the block to the list of modified blocks, if it not
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/data0data.h mariadb-10.3-10.3.22/storage/innobase/include/data0data.h
--- mariadb-10.3-10.3.18/storage/innobase/include/data0data.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/data0data.h	2020-01-26 18:37:29.000000000 +0000
@@ -168,7 +168,7 @@
 	const dfield_t*	field,	/*!< in: field */
 	ulint		len,	/*!< in: data length or UNIV_SQL_NULL */
 	const byte*	data)	/*!< in: data */
-	MY_ATTRIBUTE((nonnull, warn_unused_result));
+	MY_ATTRIBUTE((nonnull(1), warn_unused_result));
 
 /*********************************************************************//**
 Gets info bits in a data tuple.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/data0data.ic mariadb-10.3-10.3.22/storage/innobase/include/data0data.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/data0data.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/data0data.ic	2020-01-26 18:37:29.000000000 +0000
@@ -225,7 +225,7 @@
 {
 	ut_ad(len != UNIV_SQL_DEFAULT);
 	return(len == dfield_get_len(field)
-	       && (len == UNIV_SQL_NULL
+	       && (!len || len == UNIV_SQL_NULL
 		   || !memcmp(dfield_get_data(field), data, len)));
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dict0crea.h mariadb-10.3-10.3.22/storage/innobase/include/dict0crea.h
--- mariadb-10.3-10.3.18/storage/innobase/include/dict0crea.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dict0crea.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -123,13 +123,11 @@
 /** Drop the index tree associated with a row in SYS_INDEXES table.
 @param[in,out]	rec	SYS_INDEXES record
 @param[in,out]	pcur	persistent cursor on rec
+@param[in,out]	trx	dictionary transaction
 @param[in,out]	mtr	mini-transaction
 @return	whether freeing the B-tree was attempted */
-bool
-dict_drop_index_tree(
-	rec_t*		rec,
-	btr_pcur_t*	pcur,
-	mtr_t*		mtr);
+bool dict_drop_index_tree(rec_t* rec, btr_pcur_t* pcur, trx_t* trx, mtr_t* mtr)
+	MY_ATTRIBUTE((nonnull));
 
 /***************************************************************//**
 Creates an index tree for the index if it is not a member of a cluster.
@@ -226,16 +224,6 @@
 	const char*	path,
 	trx_t*		trx);
 
-/** Delete records from SYS_TABLESPACES and SYS_DATAFILES associated
-with a particular tablespace ID.
-@param[in]	space	Tablespace ID
-@param[in,out]	trx	Current transaction
-@return DB_SUCCESS if OK, dberr_t if the operation failed */
-dberr_t
-dict_delete_tablespace_and_datafiles(
-	ulint		space,
-	trx_t*		trx);
-
 /********************************************************************//**
 Add a foreign key definition to the data dictionary tables.
 @return error code or DB_SUCCESS */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dict0dict.h mariadb-10.3-10.3.22/storage/innobase/include/dict0dict.h
--- mariadb-10.3-10.3.18/storage/innobase/include/dict0dict.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dict0dict.h	2020-01-26 18:37:29.000000000 +0000
@@ -1040,17 +1040,6 @@
 	dtuple_t*		tuple,	/*!< in/out: data tuple */
 	const dict_table_t*	table)	/*!< in: table */
 	MY_ATTRIBUTE((nonnull));
-/********************************************************************
-Wait until all the background threads of the given table have exited, i.e.,
-bg_threads == 0. Note: bg_threads_mutex must be reserved when
-calling this. */
-void
-dict_table_wait_for_bg_threads_to_exit(
-/*===================================*/
-	dict_table_t*	table,	/* in: table */
-	ulint		delay)	/* in: time in microseconds to wait between
-				checks of bg_threads. */
-	MY_ATTRIBUTE((nonnull));
 /**********************************************************************//**
 Looks for an index with the given id. NOTE that we do not reserve
 the dictionary mutex: this function is for emergency purposes like
@@ -1078,26 +1067,17 @@
 
 /** Adds an index to the dictionary cache, with possible indexing newly
 added column.
-@param[in]	index	index; NOTE! The index memory
+@param[in,out]	index	index; NOTE! The index memory
 			object is freed in this function!
 @param[in]	page_no	root page number of the index
-@param[in]	strict	true=refuse to create the index
-			if records could be too big to fit in
-			an B-tree page
-@param[out]	err	DB_SUCCESS, DB_TOO_BIG_RECORD, or DB_CORRUPTION
-@param[in]	add_v	new virtual column that being added along with
-			an add index call
-@return	the added index
-@retval	NULL	on error */
-dict_index_t*
+@param[in]	add_v	virtual columns being added along with ADD INDEX
+@return DB_SUCCESS, or DB_CORRUPTION */
+dberr_t
 dict_index_add_to_cache(
-	dict_index_t*		index,
+	dict_index_t*&		index,
 	ulint			page_no,
-	bool			strict = false,
-	dberr_t*		err = NULL,
 	const dict_add_v_col_t* add_v = NULL)
-	MY_ATTRIBUTE((nonnull(1)));
-
+	MY_ATTRIBUTE((warn_unused_result));
 /********************************************************************//**
 Gets the number of fields in the internal representation of an index,
 including fields added by the dictionary system.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dict0load.h mariadb-10.3-10.3.22/storage/innobase/include/dict0load.h
--- mariadb-10.3-10.3.18/storage/innobase/include/dict0load.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dict0load.h	2020-01-26 18:37:29.000000000 +0000
@@ -101,17 +101,12 @@
 all foreign key constraints where the foreign key is in the table or where
 a foreign key references columns in this table.
 @param[in]	name		Table name in the dbname/tablename format
-@param[in]	cached		true=add to cache, false=do not
 @param[in]	ignore_err	Error to be ignored when loading
 				table and its index definition
 @return table, NULL if does not exist; if the table is stored in an
 .ibd file, but the file does not exist, then we set the file_unreadable
 flag in the table object we return. */
-dict_table_t*
-dict_load_table(
-	const char*	name,
-	bool		cached,
-	dict_err_ignore_t ignore_err);
+dict_table_t* dict_load_table(const char* name, dict_err_ignore_t ignore_err);
 
 /***********************************************************************//**
 Loads a table object based on the table id.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dict0mem.h mariadb-10.3-10.3.22/storage/innobase/include/dict0mem.h
--- mariadb-10.3-10.3.18/storage/innobase/include/dict0mem.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dict0mem.h	2020-01-26 18:37:29.000000000 +0000
@@ -832,10 +832,6 @@
 system clustered index when there is no primary key. */
 const char innobase_index_reserve_name[] = "GEN_CLUST_INDEX";
 
-/* Estimated number of offsets in records (based on columns)
-to start with. */
-#define OFFS_IN_REC_NORMAL_SIZE		100
-
 /** Data structure for an index.  Most fields will be
 initialized to 0, NULL or FALSE in dict_mem_index_create(). */
 struct dict_index_t{
@@ -1112,7 +1108,7 @@
 	@param[in]	offsets	offsets
 	@return true if row is historical */
 	bool
-	vers_history_row(const rec_t* rec, const ulint* offsets);
+	vers_history_row(const rec_t* rec, const offset_t* offsets);
 
 	/** Check if record in secondary index is historical row.
 	@param[in]	rec	record in a secondary index
@@ -1121,11 +1117,65 @@
 	bool
 	vers_history_row(const rec_t* rec, bool &history_row);
 
-	/** If a record of this index might not fit on a single B-tree page,
-	  return true.
-	@param[in]	strict	issue error or warning
-	@return true if the index record could become too big */
-	bool rec_potentially_too_big(bool strict) const;
+	/** This ad-hoc class is used by record_size_info only.	*/
+	class record_size_info_t {
+	public:
+		record_size_info_t()
+		    : max_leaf_size(0), shortest_size(0), too_big(false),
+		      first_overrun_field_index(SIZE_T_MAX), overrun_size(0)
+		{
+		}
+
+		/** Mark row potentially too big for page and set up first
+		overflow field index. */
+		void set_too_big(size_t field_index)
+		{
+			ut_ad(field_index != SIZE_T_MAX);
+
+			too_big = true;
+			if (first_overrun_field_index > field_index) {
+				first_overrun_field_index = field_index;
+				overrun_size = shortest_size;
+			}
+		}
+
+		/** @return overrun field index or SIZE_T_MAX if nothing
+		overflowed*/
+		size_t get_first_overrun_field_index() const
+		{
+			ut_ad(row_is_too_big());
+			ut_ad(first_overrun_field_index != SIZE_T_MAX);
+			return first_overrun_field_index;
+		}
+
+		size_t get_overrun_size() const
+		{
+			ut_ad(row_is_too_big());
+			return overrun_size;
+		}
+
+		bool row_is_too_big() const { return too_big; }
+
+		size_t max_leaf_size; /** Bigger row size this index can
+				      produce */
+		size_t shortest_size; /** shortest because it counts everything
+				      as in overflow pages */
+
+	private:
+		bool too_big; /** This one is true when maximum row size this
+			      index can produce is bigger than maximum row
+			      size given page can hold. */
+		size_t first_overrun_field_index; /** After adding this field
+						  index row overflowed maximum
+						  allowed size. Useful for
+						  reporting back to user. */
+		size_t overrun_size;		  /** Just overrun row size */
+	};
+
+	/** Returns max possibly record size for that index, size of a shortest
+	everything in overflow) size of the longest possible row and index
+	of a field which made index records too big to fit on a page.*/
+	inline record_size_info_t record_size_info() const;
 };
 
 /** Detach a column from an index.
@@ -1553,10 +1603,14 @@
 	/** Add the table definition to the data dictionary cache */
 	void add_to_cache();
 
+	/** @return whether the table is versioned.
+	It is assumed that both vers_start and vers_end set to 0
+	iff table is not versioned. In any other case,
+	these fields correspond to actual positions in cols[]. */
 	bool versioned() const { return vers_start || vers_end; }
 	bool versioned_by_id() const
 	{
-		return vers_start && cols[vers_start].mtype == DATA_INT;
+		return versioned() && cols[vers_start].mtype == DATA_INT;
 	}
 
 	void inc_fk_checks()
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dict0priv.ic mariadb-10.3-10.3.22/storage/innobase/include/dict0priv.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/dict0priv.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dict0priv.ic	2020-01-26 18:37:29.000000000 +0000
@@ -55,7 +55,7 @@
 	}
 
 	if (table == NULL) {
-		table = dict_load_table(table_name, true, DICT_ERR_IGNORE_NONE);
+		table = dict_load_table(table_name, DICT_ERR_IGNORE_NONE);
 	}
 
 	ut_ad(!table || table->cached);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dict0types.h mariadb-10.3-10.3.22/storage/innobase/include/dict0types.h
--- mariadb-10.3-10.3.18/storage/innobase/include/dict0types.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dict0types.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2017, MariaDB Corporation.
+Copyright (c) 2013, 2019, 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
@@ -142,6 +142,8 @@
 };
 
 #if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
+/** Dump the change buffer at startup */
+extern my_bool		ibuf_dump;
 /** Flag to control insert buffer debugging. */
 extern uint		ibuf_debug;
 #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/dyn0buf.h mariadb-10.3-10.3.22/storage/innobase/include/dyn0buf.h
--- mariadb-10.3-10.3.18/storage/innobase/include/dyn0buf.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/dyn0buf.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, 2019, MariaDB Corporation.
+Copyright (c) 2018, 2020, 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
@@ -29,7 +29,8 @@
 
 #include "mem0mem.h"
 #include "dyn0types.h"
-#include "ut0lst.h"
+#include "intrusive_list.h"
+
 
 /** Class that manages dynamic buffers. It uses a UT_LIST of
 mtr_buf_t::block_t instances. We don't use STL containers in
@@ -40,17 +41,11 @@
 the blocks to be contiguous. */
 class mtr_buf_t {
 public:
-
-	class block_t;
-
-	typedef UT_LIST_NODE_T(block_t) block_node_t;
-	typedef UT_LIST_BASE_NODE_T(block_t) block_list_t;
-
 	/** SIZE - sizeof(m_node) + sizeof(m_used) */
 	enum { MAX_DATA_SIZE = DYN_ARRAY_DATA_SIZE
-	       - sizeof(block_node_t) + sizeof(ib_uint32_t) };
+	       - sizeof(intrusive::list_node<>) + sizeof(uint32_t) };
 
-	class block_t {
+	class block_t : public intrusive::list_node<> {
 	public:
 
 		block_t()
@@ -158,9 +153,6 @@
 		/** Storage */
 		byte		m_data[MAX_DATA_SIZE];
 
-		/** Doubly linked list node. */
-		block_node_t	m_node;
-
 		/** number of data bytes used in this block;
 		DYN_BLOCK_FULL_FLAG is set when the block becomes full */
 		uint32_t	m_used;
@@ -168,13 +160,14 @@
 		friend class mtr_buf_t;
 	};
 
+	typedef intrusive::list list_t;
+
 	/** Default constructor */
 	mtr_buf_t()
 		:
 		m_heap(),
 		m_size()
 	{
-		UT_LIST_INIT(m_list, &block_t::m_node);
 		push_back(&m_first_block);
 	}
 
@@ -192,11 +185,11 @@
 			m_heap = NULL;
 
 			/* Initialise the list and add the first block. */
-			UT_LIST_INIT(m_list, &block_t::m_node);
-			push_back(&m_first_block);
+			m_list.clear();
+			m_list.push_back(m_first_block);
 		} else {
 			m_first_block.init();
-			ut_ad(UT_LIST_GET_LEN(m_list) == 1);
+			ut_ad(m_list.size() == 1);
 		}
 
 		m_size = 0;
@@ -228,7 +221,7 @@
 	@param ptr	end of used space */
 	void close(const byte* ptr)
 	{
-		ut_ad(UT_LIST_GET_LEN(m_list) > 0);
+		ut_ad(!m_list.empty());
 		block_t*	block = back();
 
 		m_size -= block->used();
@@ -310,11 +303,9 @@
 #ifdef UNIV_DEBUG
 		ulint	total_size = 0;
 
-		for (const block_t* block = UT_LIST_GET_FIRST(m_list);
-		     block != NULL;
-		     block = UT_LIST_GET_NEXT(m_node, block)) {
-
-			total_size += block->used();
+		for (list_t::iterator it = m_list.begin(), end = m_list.end();
+		     it != end; ++it) {
+			total_size += it->used();
 		}
 
 		ut_ad(total_size == m_size);
@@ -328,12 +319,11 @@
 	template 
 	bool for_each_block(Functor& functor) const
 	{
-		for (const block_t* block = UT_LIST_GET_FIRST(m_list);
-		     block != NULL;
-		     block = UT_LIST_GET_NEXT(m_node, block)) {
+		for (list_t::iterator it = m_list.begin(), end = m_list.end();
+		     it != end; ++it) {
 
-			if (!functor(block)) {
-				return(false);
+			if (!functor(&*it)) {
+				return false;
 			}
 		}
 
@@ -346,12 +336,12 @@
 	template 
 	bool for_each_block_in_reverse(Functor& functor) const
 	{
-		for (block_t* block = UT_LIST_GET_LAST(m_list);
-		     block != NULL;
-		     block = UT_LIST_GET_PREV(m_node, block)) {
+		for (list_t::reverse_iterator it = m_list.rbegin(),
+					      end = m_list.rend();
+		     it != end; ++it) {
 
-			if (!functor(block)) {
-				return(false);
+			if (!functor(&*it)) {
+				return false;
 			}
 		}
 
@@ -364,12 +354,12 @@
 	template 
 	bool for_each_block_in_reverse(const Functor& functor) const
 	{
-		for (block_t* block = UT_LIST_GET_LAST(m_list);
-		     block != NULL;
-		     block = UT_LIST_GET_PREV(m_node, block)) {
+		for (list_t::reverse_iterator it = m_list.rbegin(),
+					      end = m_list.rend();
+		     it != end; ++it) {
 
-			if (!functor(block)) {
-				return(false);
+			if (!functor(&*it)) {
+				return false;
 			}
 		}
 
@@ -381,8 +371,7 @@
 	block_t* front()
 		MY_ATTRIBUTE((warn_unused_result))
 	{
-		ut_ad(UT_LIST_GET_LEN(m_list) > 0);
-		return(UT_LIST_GET_FIRST(m_list));
+		return &m_list.front();
 	}
 
 	/**
@@ -403,14 +392,13 @@
 	void push_back(block_t* block)
 	{
 		block->init();
-
-		UT_LIST_ADD_LAST(m_list, block);
+		m_list.push_back(*block);
 	}
 
 	/** @return the last block in the list */
 	block_t* back() const
 	{
-		return(UT_LIST_GET_LAST(m_list));
+		return &const_cast(m_list.back());
 	}
 
 	/*
@@ -433,25 +421,21 @@
 	@return the block containing the pos. */
 	block_t* find(ulint& pos)
 	{
-		block_t*	block;
+		ut_ad(!m_list.empty());
 
-		ut_ad(UT_LIST_GET_LEN(m_list) > 0);
+		for (list_t::iterator it = m_list.begin(), end = m_list.end();
+		     it != end; ++it) {
 
-		for (block = UT_LIST_GET_FIRST(m_list);
-		     block != NULL;
-		     block = UT_LIST_GET_NEXT(m_node, block)) {
+			if (pos < it->used()) {
+				ut_ad(it->used() >= pos);
 
-			if (pos < block->used()) {
-				break;
+				return &*it;
 			}
 
-			pos -= block->used();
+			pos -= it->used();
 		}
 
-		ut_ad(block != NULL);
-		ut_ad(block->used() >= pos);
-
-		return(block);
+		return NULL;
 	}
 
 	/**
@@ -477,7 +461,7 @@
 	mem_heap_t*		m_heap;
 
 	/** Allocated blocks */
-	block_list_t		m_list;
+	list_t			m_list;
 
 	/** Total size used by all blocks */
 	ulint			m_size;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/fil0crypt.h mariadb-10.3-10.3.22/storage/innobase/include/fil0crypt.h
--- mariadb-10.3-10.3.18/storage/innobase/include/fil0crypt.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/fil0crypt.h	2020-01-26 18:37:29.000000000 +0000
@@ -373,7 +373,6 @@
 @param[in]	space			Tablespace
 @param[in]	tmp_frame		Temporary buffer used for decrypting
 @param[in,out]	src_frame		Page to decrypt
-@param[out]	decrypted		true if page was decrypted
 @return decrypted page, or original not encrypted page if decryption is
 not needed.*/
 UNIV_INTERN
@@ -381,8 +380,7 @@
 fil_space_decrypt(
 	const fil_space_t* space,
 	byte*		tmp_frame,
-	byte*		src_frame,
-	bool*		decrypted)
+	byte*		src_frame)
 	MY_ATTRIBUTE((warn_unused_result));
 
 /******************************************************************
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/fil0fil.h mariadb-10.3-10.3.22/storage/innobase/include/fil0fil.h
--- mariadb-10.3-10.3.18/storage/innobase/include/fil0fil.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/fil0fil.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, 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
@@ -32,6 +32,10 @@
 #include "log0recv.h"
 #include "dict0types.h"
 #include "page0size.h"
+#include "intrusive_list.h"
+
+struct unflushed_spaces_tag_t;
+struct rotation_list_tag_t;
 
 // Forward declaration
 extern my_bool srv_use_doublewrite_buf;
@@ -73,7 +77,9 @@
 struct fil_node_t;
 
 /** Tablespace or log data space */
-struct fil_space_t {
+struct fil_space_t : intrusive::list_node,
+                     intrusive::list_node
+{
 	ulint		id;	/*!< space id */
 	hash_node_t	hash;	/*!< hash chain node */
 	char*		name;	/*!< Tablespace name */
@@ -151,9 +157,6 @@
 	ulint		n_pending_ios;
 	rw_lock_t	latch;	/*!< latch protecting the file space storage
 				allocation */
-	UT_LIST_NODE_T(fil_space_t) unflushed_spaces;
-				/*!< list of spaces with at least one unflushed
-				file we have written to */
 	UT_LIST_NODE_T(fil_space_t) named_spaces;
 				/*!< list of spaces for which MLOG_FILE_NAME
 				records have been issued */
@@ -162,8 +165,6 @@
 	bool is_in_unflushed_spaces() const;
 	UT_LIST_NODE_T(fil_space_t) space_list;
 				/*!< list of all spaces */
-	/** other tablespaces needing key rotation */
-	UT_LIST_NODE_T(fil_space_t) rotation_list;
 	/** Checks that this tablespace needs key rotation.
 	@return true if in a rotation list */
 	bool is_in_rotation_list() const;
@@ -350,7 +351,7 @@
 /** Value of fil_node_t::magic_n */
 #define	FIL_NODE_MAGIC_N	89389
 
-/** Common InnoDB file extentions */
+/** Common InnoDB file extensions */
 enum ib_extention {
 	NO_EXT = 0,
 	IBD = 1,
@@ -579,8 +580,6 @@
   {
     UT_LIST_INIT(LRU, &fil_node_t::LRU);
     UT_LIST_INIT(space_list, &fil_space_t::space_list);
-    UT_LIST_INIT(rotation_list, &fil_space_t::rotation_list);
-    UT_LIST_INIT(unflushed_spaces, &fil_space_t::unflushed_spaces);
     UT_LIST_INIT(named_spaces, &fil_space_t::named_spaces);
   }
 
@@ -616,8 +615,8 @@
 					not put to this list: they are opened
 					after the startup, and kept open until
 					shutdown */
-	UT_LIST_BASE_NODE_T(fil_space_t) unflushed_spaces;
-					/*!< base node for the list of those
+	intrusive::list unflushed_spaces;
+					/*!< list of those
 					tablespaces whose files contain
 					unflushed writes; those spaces have
 					at least one file node where
@@ -637,7 +636,7 @@
 					record has been written since
 					the latest redo log checkpoint.
 					Protected only by log_sys.mutex. */
-	UT_LIST_BASE_NODE_T(fil_space_t) rotation_list;
+	intrusive::list rotation_list;
 					/*!< list of all file spaces needing
 					key rotation.*/
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/fil0fil.ic mariadb-10.3-10.3.22/storage/innobase/include/fil0fil.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/fil0fil.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/fil0fil.ic	2020-01-26 18:37:29.000000000 +0000
@@ -69,7 +69,7 @@
 	case FIL_PAGE_TYPE_ZBLOB2:
 		return "ZBLOB2";
 	case FIL_PAGE_TYPE_UNKNOWN:
-		return "OLD UNKOWN PAGE TYPE";
+		return "OLD UNKNOWN PAGE TYPE";
 	default:
 		return "PAGE TYPE CORRUPTED";
 	}
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/fts0fts.h mariadb-10.3-10.3.22/storage/innobase/include/fts0fts.h
--- mariadb-10.3-10.3.18/storage/innobase/include/fts0fts.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/fts0fts.h	2020-01-26 18:37:29.000000000 +0000
@@ -304,27 +304,6 @@
 					index auxiliary table */
 };
 
-enum	fts_status {
-	BG_THREAD_STOP = 1,	 	/*!< TRUE if the FTS background thread
-					has finished reading the ADDED table,
-					meaning more items can be added to
-					the table. */
-
-	BG_THREAD_READY = 2,		/*!< TRUE if the FTS background thread
-					is ready */
-
-	ADD_THREAD_STARTED = 4,		/*!< TRUE if the FTS add thread
-					has started */
-
-	ADDED_TABLE_SYNCED = 8,		/*!< TRUE if the ADDED table record is
-					sync-ed after crash recovery */
-
-	TABLE_DICT_LOCKED = 16		/*!< Set if the table has
-					dict_sys->mutex */
-};
-
-typedef	enum fts_status	fts_status_t;
-
 /** The state of the FTS sub system. */
 class fts_t {
 public:
@@ -341,13 +320,16 @@
 	/** Mutex protecting bg_threads* and fts_add_wq. */
 	ib_mutex_t	bg_threads_mutex;
 
+	/** Whether the ADDED table record sync-ed after
+	crash recovery; protected by bg_threads_mutex */
+	unsigned	added_synced:1;
+	/** Whether the table holds dict_sys->mutex;
+	protected by bg_threads_mutex */
+	unsigned	dict_locked:1;
+
 	/** Number of background threads accessing this table. */
 	ulint		bg_threads;
 
-	/** Status bit regarding fts running state. TRUE if background
-	threads running should stop themselves. */
-	ulint		fts_status;
-
 	/** Work queue for scheduling jobs for the FTS 'Add' thread, or NULL
 	if the thread has not yet been created. Each work item is a
 	fts_trx_doc_ids_t*. */
@@ -363,6 +345,10 @@
 	/** Vector of FTS indexes, this is mainly for caching purposes. */
 	ib_vector_t*	indexes;
 
+	/** Whether the table exists in fts_optimize_wq;
+	protected by fts_optimize_wq mutex */
+	bool		in_queue;
+
 	/** Heap for fts_t allocation. */
 	mem_heap_t*	fts_heap;
 };
@@ -634,28 +620,6 @@
 fts_startup(void);
 /*==============*/
 
-#if 0 // TODO: Enable this in WL#6608
-/******************************************************************//**
-Signal FTS threads to initiate shutdown. */
-void
-fts_start_shutdown(
-/*===============*/
-	dict_table_t*	table,			/*!< in: table with FTS
-						indexes */
-	fts_t*		fts);			/*!< in: fts instance to
-						shutdown */
-
-/******************************************************************//**
-Wait for FTS threads to shutdown. */
-void
-fts_shutdown(
-/*=========*/
-	dict_table_t*	table,			/*!< in: table with FTS
-						indexes */
-	fts_t*		fts);			/*!< in: fts instance to
-						shutdown */
-#endif
-
 /******************************************************************//**
 Create an instance of fts_t.
 @return instance of fts_t */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/fts0opt.h mariadb-10.3-10.3.22/storage/innobase/include/fts0opt.h
--- mariadb-10.3-10.3.18/storage/innobase/include/fts0opt.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/fts0opt.h	2020-01-26 18:37:29.000000000 +0000
@@ -25,6 +25,9 @@
 #ifndef INNODB_FTS0OPT_H
 #define INNODB_FTS0OPT_H
 
+/** The FTS optimize thread's work queue. */
+extern ib_wqueue_t*	fts_optimize_wq;
+
 /********************************************************************
 Callback function to fetch the rows in an FTS INDEX record. */
 ibool
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/fts0priv.h mariadb-10.3-10.3.22/storage/innobase/include/fts0priv.h
--- mariadb-10.3-10.3.18/storage/innobase/include/fts0priv.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/fts0priv.h	2020-01-26 18:37:29.000000000 +0000
@@ -442,19 +442,6 @@
 			cache,		/*!< in: cache to use */
 	ib_vector_t*	vector);	/*!< in: append to this vector */
 /******************************************************************//**
-Wait for the background thread to start. We poll to detect change
-of state, which is acceptable, since the wait should happen only
-once during startup.
-@return true if the thread started else FALSE (i.e timed out) */
-ibool
-fts_wait_for_background_thread_to_start(
-/*====================================*/
-	dict_table_t*	table,		/*!< in: table to which the thread
-					is attached */
-	ulint		max_wait);	/*!< in: time in microseconds, if set
-					to 0 then it disables timeout
-					checking */
-/******************************************************************//**
 Search the index specific cache for a particular FTS index.
 @return the index specific cache else NULL */
 fts_index_cache_t*
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/gis0geo.h mariadb-10.3-10.3.22/storage/innobase/include/gis0geo.h
--- mariadb-10.3-10.3.18/storage/innobase/include/gis0geo.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/gis0geo.h	2020-01-26 18:37:29.000000000 +0000
@@ -54,19 +54,6 @@
   wkbNDR = 1     /* Little Endian */
 };
 
-/** Get the wkb of default POINT value, which represents POINT(0 0)
-if it's of dimension 2, etc.
-@param[in]	n_dims		dimensions
-@param[out]	wkb		wkb buffer for default POINT
-@param[in]	len		length of wkb buffer
-@return non-0 indicate the length of wkb of the default POINT,
-0 if the buffer is too small */
-uint
-get_wkb_of_default_point(
-	uint	n_dims,
-	uchar*	wkb,
-	uint	len);
-
 /*************************************************************//**
 Calculate minimal bounding rectangle (mbr) of the spatial object
 stored in "well-known binary representation" (wkb) format.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/gis0rtree.h mariadb-10.3-10.3.22/storage/innobase/include/gis0rtree.h
--- mariadb-10.3-10.3.18/storage/innobase/include/gis0rtree.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/gis0rtree.h	2020-01-26 18:37:29.000000000 +0000
@@ -28,6 +28,7 @@
 #define gis0rtree_h
 
 #include "btr0cur.h"
+#include "rem0types.h"
 
 /* Whether MBR 'a' contains 'b' */
 #define	MBR_CONTAIN_CMP(a, b)					\
@@ -88,7 +89,7 @@
 	btr_cur_t*	cursor,	/*!< in/out: cursor at which to insert; when the
 				function returns, the cursor is positioned
 				on the predecessor of the inserted record */
-	ulint**		offsets,/*!< out: offsets on inserted record */
+	offset_t**	offsets,/*!< out: offsets on inserted record */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	const dtuple_t*	tuple,	/*!< in: tuple to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
@@ -150,7 +151,7 @@
 				dtuple in some of the common fields, or which
 				has an equal number or more fields than
 				dtuple */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	double*		area);	/*!< out: increased area */
 
 /****************************************************************//**
@@ -273,7 +274,7 @@
 rtr_get_mbr_from_rec(
 /*=================*/
 	const rec_t*	rec,	/*!< in: data tuple */
-	const ulint*	offsets,/*!< in: offsets array */
+	const offset_t*	offsets,/*!< in: offsets array */
 	rtr_mbr_t*	mbr);	/*!< out MBR */
 
 /****************************************************************//**
@@ -305,10 +306,10 @@
 Returns the father block to a page. It is assumed that mtr holds
 an X or SX latch on the tree.
 @return rec_get_offsets() of the node pointer record */
-ulint*
+offset_t*
 rtr_page_get_father_block(
 /*======================*/
-	ulint*		offsets,/*!< in: work area for the return value */
+	offset_t*	offsets,/*!< in: work area for the return value */
 	mem_heap_t*	heap,	/*!< in: memory heap to use */
 	dict_index_t*	index,	/*!< in: b-tree index */
 	buf_block_t*	block,	/*!< in: child page in the index */
@@ -415,8 +416,8 @@
 /*=====================*/
 	btr_cur_t*		cursor,		/*!< in/out: cursor */
 	btr_cur_t*		cursor2,	/*!< in: the other cursor */
-	ulint*			offsets,	/*!< in: rec offsets */
-	ulint*			offsets2,	/*!< in: rec offsets */
+	offset_t*		offsets,	/*!< in: rec offsets */
+	offset_t*		offsets2,	/*!< in: rec offsets */
 	page_t*			child_page,	/*!< in: the child page. */
 	mtr_t*			mtr);		/*!< in: mtr */
 
@@ -436,8 +437,8 @@
 /*==================*/
 	btr_cur_t*	cursor,		/*!< in: cursor */
 	btr_cur_t*	cursor2,	/*!< in: the other cursor */
-	ulint*		offsets,	/*!< in: rec offsets */
-	ulint*		offsets2,	/*!< in: rec offsets */
+	offset_t*	offsets,	/*!< in: rec offsets */
+	offset_t*	offsets2,	/*!< in: rec offsets */
 	rtr_mbr_t*	new_mbr);	/*!< out: MBR to update */
 
 
@@ -448,7 +449,7 @@
 rtr_update_mbr_field(
 /*=================*/
 	btr_cur_t*	cursor,		/*!< in: cursor pointed to rec.*/
-	ulint*		offsets,	/*!< in: offsets on rec. */
+	offset_t*	offsets,	/*!< in: offsets on rec. */
 	btr_cur_t*	cursor2,	/*!< in/out: cursor pointed to rec
 					that should be deleted.
 					this cursor is for btr_compress to
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/gis0rtree.ic mariadb-10.3-10.3.22/storage/innobase/include/gis0rtree.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/gis0rtree.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/gis0rtree.ic	2020-01-26 18:37:29.000000000 +0000
@@ -40,7 +40,7 @@
 	rec_t*		rec;
 	const byte*	field;
 	ulint		len;
-	ulint*		offsets = NULL;
+	offset_t*	offsets = NULL;
 	double		bmin, bmax;
 	double*		amin;
 	double*		amax;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/handler0alter.h mariadb-10.3-10.3.22/storage/innobase/include/handler0alter.h
--- mariadb-10.3-10.3.18/storage/innobase/include/handler0alter.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/handler0alter.h	2020-01-26 18:37:29.000000000 +0000
@@ -22,6 +22,8 @@
 Smart ALTER TABLE
 *******************************************************/
 
+#include "rem0types.h"
+
 /*************************************************************//**
 Copies an InnoDB record to table->record[0]. */
 void
@@ -30,7 +32,7 @@
 	struct TABLE*		table,	/*!< in/out: MySQL table */
 	const rec_t*		rec,	/*!< in: record */
 	const dict_index_t*	index,	/*!< in: index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(
+	const offset_t*		offsets)/*!< in: rec_get_offsets(
 					rec, index, ...) */
 	MY_ATTRIBUTE((nonnull));
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/ibuf0ibuf.h mariadb-10.3-10.3.22/storage/innobase/include/ibuf0ibuf.h
--- mariadb-10.3-10.3.18/storage/innobase/include/ibuf0ibuf.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/ibuf0ibuf.h	2020-01-26 18:37:29.000000000 +0000
@@ -323,6 +323,14 @@
 	const page_size_t&	page_size,
 	que_thr_t*		thr);
 
+/**
+Delete any buffered entries for a page.
+This prevents an infinite loop on slow shutdown
+in the case where the change buffer bitmap claims that no buffered
+changes exist, while entries exist in the change buffer tree.
+@param page_id  page number for which there should be no unbuffered changes */
+ATTRIBUTE_COLD void ibuf_delete_recs(const page_id_t page_id);
+
 /** When an index page is read from a disk to the buffer pool, this function
 applies any buffered operations to the page and deletes the entries from the
 insert buffer. If the page is not read, but created in the buffer pool, this
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/lock0lock.h mariadb-10.3-10.3.22/storage/innobase/include/lock0lock.h
--- mariadb-10.3-10.3.18/storage/innobase/include/lock0lock.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/lock0lock.h	2020-01-26 18:37:29.000000000 +0000
@@ -300,7 +300,7 @@
 	const rec_t*		rec,	/*!< in: record which should be
 					modified */
 	dict_index_t*		index,	/*!< in: clustered index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	que_thr_t*		thr)	/*!< in: query thread */
 	MY_ATTRIBUTE((warn_unused_result));
 /*********************************************************************//**
@@ -338,7 +338,7 @@
 					be read or passed over by a
 					read cursor */
 	dict_index_t*		index,	/*!< in: secondary index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	lock_mode		mode,	/*!< in: mode of the lock which
 					the read cursor should set on
 					records: LOCK_S or LOCK_X; the
@@ -366,7 +366,7 @@
 					be read or passed over by a
 					read cursor */
 	dict_index_t*		index,	/*!< in: clustered index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	lock_mode		mode,	/*!< in: mode of the lock which
 					the read cursor should set on
 					records: LOCK_S or LOCK_X; the
@@ -415,7 +415,7 @@
 	const rec_t*	rec,	/*!< in: user record which should be read or
 				passed over by a read cursor */
 	dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	ReadView*	view);	/*!< in: consistent read view */
 /*********************************************************************//**
 Checks that a non-clustered index record is seen in a consistent read.
@@ -547,7 +547,7 @@
 	trx_id_t	trx_id,		/*!< in: trx id */
 	const rec_t*	rec,		/*!< in: user record */
 	dict_index_t*	index,		/*!< in: index */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec, index) */
 	trx_id_t	max_trx_id);	/*!< in: trx_sys.get_max_trx_id() */
 /*********************************************************************//**
 Prints info of locks for all transactions.
@@ -772,7 +772,7 @@
 	trx_id_t	trx_id,		/*!< in: trx id */
 	const rec_t*	rec,		/*!< in: user record */
 	dict_index_t*	index,		/*!< in: index */
-	const ulint*	offsets);	/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets);	/*!< in: rec_get_offsets(rec, index) */
 #ifdef UNIV_DEBUG
 /*******************************************************************//**
 Check if the transaction holds any locks on the sys tables
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/lock0priv.h mariadb-10.3-10.3.22/storage/innobase/include/lock0priv.h
--- mariadb-10.3-10.3.18/storage/innobase/include/lock0priv.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/lock0priv.h	2020-01-26 18:37:29.000000000 +0000
@@ -35,6 +35,7 @@
 #endif
 
 #include "hash0hash.h"
+#include "rem0types.h"
 #include "trx0trx.h"
 
 #ifndef UINT32_MAX
@@ -468,7 +469,7 @@
 /*=========================*/
 	const rec_t*		rec,	/*!< in: user record */
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 	MY_ATTRIBUTE((warn_unused_result));
 
 /*********************************************************************//**
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/lock0priv.ic mariadb-10.3-10.3.22/storage/innobase/include/lock0priv.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/lock0priv.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/lock0priv.ic	2020-01-26 18:37:29.000000000 +0000
@@ -59,7 +59,7 @@
 /*=========================*/
 	const rec_t*		rec,	/*!< in: user record */
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 {
 	ut_ad(dict_index_is_clust(index));
 	ut_ad(page_rec_is_user_rec(rec));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/log0log.h mariadb-10.3-10.3.22/storage/innobase/include/log0log.h
--- mariadb-10.3-10.3.18/storage/innobase/include/log0log.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/log0log.h	2020-01-26 18:37:29.000000000 +0000
@@ -195,15 +195,13 @@
 /** Make a checkpoint. Note that this function does not flush dirty
 blocks from the buffer pool: it only checks what is lsn of the oldest
 modification in the pool, and writes information about the lsn in
-log files. Use log_make_checkpoint_at() to flush also the pool.
+log files. Use log_make_checkpoint() to flush also the pool.
 @param[in]	sync		whether to wait for the write to complete
 @return true if success, false if a checkpoint write was already running */
 bool log_checkpoint(bool sync);
 
-/** Make a checkpoint at or after a specified LSN.
-@param[in]	lsn		the log sequence number, or LSN_MAX
-for the latest LSN */
-void log_make_checkpoint_at(lsn_t lsn);
+/** Make a checkpoint */
+void log_make_checkpoint();
 
 /****************************************************************//**
 Makes a checkpoint at the latest lsn and writes it to first page of each
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/log0recv.h mariadb-10.3-10.3.22/storage/innobase/include/log0recv.h
--- mariadb-10.3-10.3.18/storage/innobase/include/log0recv.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/log0recv.h	2020-01-26 18:37:29.000000000 +0000
@@ -119,14 +119,19 @@
 
 /** Parse log records from a buffer and optionally store them to a
 hash table to wait merging to file pages.
-@param[in]	checkpoint_lsn	the LSN of the latest checkpoint
-@param[in]	store		whether to store page operations
-@param[in]	apply		whether to apply the records
+@param[in]	checkpoint_lsn		the LSN of the latest checkpoint
+@param[in]	store			whether to store page operations
+@param[in]	available_memory	memory to read the redo logs
+@param[in]	apply			whether to apply the records
 @return whether MLOG_CHECKPOINT record was seen the first time,
 or corruption was noticed */
-bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply);
+bool recv_parse_log_recs(
+	lsn_t		checkpoint_lsn,
+	store_t*	store,
+	ulint		available_memory,
+	bool		apply);
 
-/** Moves the parsing buffer data left to the buffer start. */
+/** Moves the parsing buffer data left to the buffer start */
 void recv_sys_justify_left_parsing_buf();
 
 /** Report optimized DDL operation (without redo log),
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/mem0mem.h mariadb-10.3-10.3.22/storage/innobase/include/mem0mem.h
--- mariadb-10.3-10.3.18/storage/innobase/include/mem0mem.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/mem0mem.h	2020-01-26 18:37:29.000000000 +0000
@@ -237,7 +237,10 @@
 void*
 mem_heap_dup(mem_heap_t* heap, const void* data, size_t len)
 {
-	return(memcpy(mem_heap_alloc(heap, len), data, len));
+	ut_ad(data || !len);
+	return UNIV_LIKELY(data != NULL)
+		? memcpy(mem_heap_alloc(heap, len), data, len)
+		: NULL;
 }
 
 /** Duplicate a NUL-terminated string, allocated from a memory heap.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/mtr0log.h mariadb-10.3-10.3.22/storage/innobase/include/mtr0log.h
--- mariadb-10.3-10.3.18/storage/innobase/include/mtr0log.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/mtr0log.h	2020-01-26 18:37:29.000000000 +0000
@@ -109,14 +109,6 @@
 	const byte*	str,	/*!< in: string to write */
 	ulint		len);	/*!< in: string length */
 /********************************************************//**
-Catenates a compressed ulint to mlog. */
-UNIV_INLINE
-void
-mlog_catenate_ulint_compressed(
-/*===========================*/
-	mtr_t*		mtr,	/*!< in: mtr */
-	ulint		val);	/*!< in: value to write */
-/********************************************************//**
 Catenates a compressed 64-bit integer to mlog. */
 UNIV_INLINE
 void
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/mtr0log.ic mariadb-10.3-10.3.22/storage/innobase/include/mtr0log.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/mtr0log.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/mtr0log.ic	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -118,30 +118,6 @@
 }
 
 /********************************************************//**
-Catenates a compressed ulint to mlog. */
-UNIV_INLINE
-void
-mlog_catenate_ulint_compressed(
-/*===========================*/
-	mtr_t*	mtr,	/*!< in: mtr */
-	ulint	val)	/*!< in: value to write */
-{
-	byte*	log_ptr;
-
-	log_ptr = mlog_open(mtr, 10);
-
-	/* If no logging is requested, we may return now */
-	if (log_ptr == NULL) {
-
-		return;
-	}
-
-	log_ptr += mach_write_compressed(log_ptr, val);
-
-	mlog_close(mtr, log_ptr);
-}
-
-/********************************************************//**
 Catenates a compressed 64-bit integer to mlog. */
 UNIV_INLINE
 void
@@ -187,7 +163,6 @@
 	      || type == MLOG_FILE_CREATE2
 	      || type == MLOG_FILE_RENAME2
 	      || type == MLOG_INDEX_LOAD
-	      || type == MLOG_TRUNCATE
 	      || type == MLOG_FILE_WRITE_CRYPT_DATA
 	      || mtr->is_named_space(space_id));
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/mtr0mtr.h mariadb-10.3-10.3.22/storage/innobase/include/mtr0mtr.h
--- mariadb-10.3-10.3.18/storage/innobase/include/mtr0mtr.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/mtr0mtr.h	2020-01-26 18:37:29.000000000 +0000
@@ -2,7 +2,7 @@
 
 Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, 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
@@ -85,17 +85,12 @@
 /** Push an object to an mtr memo stack. */
 #define mtr_memo_push(m, o, t)	(m)->memo_push(o, t)
 
-/** Lock an rw-lock in s-mode. */
-#define mtr_s_lock(l, m)	(m)->s_lock((l), __FILE__, __LINE__)
-
-/** Lock an rw-lock in x-mode. */
-#define mtr_x_lock(l, m)	(m)->x_lock((l), __FILE__, __LINE__)
-
-/** Lock a tablespace in x-mode. */
+#define mtr_s_lock_space(s, m)	(m)->s_lock_space((s), __FILE__, __LINE__)
 #define mtr_x_lock_space(s, m)	(m)->x_lock_space((s), __FILE__, __LINE__)
 
-/** Lock an rw-lock in sx-mode. */
-#define mtr_sx_lock(l, m)	(m)->sx_lock((l), __FILE__, __LINE__)
+#define mtr_s_lock_index(i, m)	(m)->s_lock(&(i)->lock, __FILE__, __LINE__)
+#define mtr_x_lock_index(i, m)	(m)->x_lock(&(i)->lock, __FILE__, __LINE__)
+#define mtr_sx_lock_index(i, m)	(m)->sx_lock(&(i)->lock, __FILE__, __LINE__)
 
 #define mtr_memo_contains_flagged(m, p, l)				\
 				(m)->memo_contains_flagged((p), (l))
@@ -134,62 +129,7 @@
 
 /** Mini-transaction handle and buffer */
 struct mtr_t {
-
-	/** State variables of the mtr */
-	struct Impl {
-
-		/** memo stack for locks etc. */
-		mtr_buf_t	m_memo;
-
-		/** mini-transaction log */
-		mtr_buf_t	m_log;
-
-		/** true if mtr has made at least one buffer pool page dirty */
-		bool		m_made_dirty;
-
-		/** true if inside ibuf changes */
-		bool		m_inside_ibuf;
-
-		/** true if the mini-transaction modified buffer pool pages */
-		bool		m_modifications;
-
-		/** Count of how many page initial log records have been
-		written to the mtr log */
-		ib_uint32_t	m_n_log_recs;
-
-		/** specifies which operations should be logged; default
-		value MTR_LOG_ALL */
-		mtr_log_t	m_log_mode;
-#ifdef UNIV_DEBUG
-		/** Persistent user tablespace associated with the
-		mini-transaction, or 0 (TRX_SYS_SPACE) if none yet */
-		ulint		m_user_space_id;
-#endif /* UNIV_DEBUG */
-		/** User tablespace that is being modified by the
-		mini-transaction */
-		fil_space_t*	m_user_space;
-
-		/** State of the transaction */
-		mtr_state_t	m_state;
-
-		/** Flush Observer */
-		FlushObserver*	m_flush_observer;
-
-#ifdef UNIV_DEBUG
-		/** For checking corruption. */
-		ulint		m_magic_n;
-#endif /* UNIV_DEBUG */
-
-		/** Owning mini-transaction */
-		mtr_t*		m_mtr;
-	};
-
-	mtr_t()
-	{
-		m_impl.m_state = MTR_STATE_INIT;
-	}
-
-	~mtr_t() { }
+	mtr_t() : m_state(MTR_STATE_INIT) {}
 
 	/** Start a mini-transaction. */
 	void start();
@@ -211,14 +151,7 @@
 
 	/** Return current size of the buffer.
 	@return	savepoint */
-	ulint get_savepoint() const
-		MY_ATTRIBUTE((warn_unused_result))
-	{
-		ut_ad(is_active());
-		ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-
-		return(m_impl.m_memo.size());
-	}
+	ulint get_savepoint() const {ut_ad(is_active()); return m_memo.size();}
 
 	/** Release the (index tree) s-latch stored in an mtr memo after a
 	savepoint.
@@ -255,11 +188,11 @@
 	the same set of tablespaces as this one */
 	void set_spaces(const mtr_t& mtr)
 	{
-		ut_ad(!m_impl.m_user_space_id);
-		ut_ad(!m_impl.m_user_space);
+		ut_ad(!m_user_space_id);
+		ut_ad(!m_user_space);
 
-		ut_d(m_impl.m_user_space_id = mtr.m_impl.m_user_space_id);
-		m_impl.m_user_space = mtr.m_impl.m_user_space;
+		ut_d(m_user_space_id = mtr.m_user_space_id);
+		m_user_space = mtr.m_user_space;
 	}
 
 	/** Set the tablespace associated with the mini-transaction
@@ -268,16 +201,16 @@
 	@return	the tablespace */
 	fil_space_t* set_named_space_id(ulint space_id)
 	{
-		ut_ad(!m_impl.m_user_space_id);
-		ut_d(m_impl.m_user_space_id = space_id);
+		ut_ad(!m_user_space_id);
+		ut_d(m_user_space_id = space_id);
 		if (!space_id) {
 			return fil_system.sys_space;
 		} else {
-			ut_ad(m_impl.m_user_space_id == space_id);
-			ut_ad(!m_impl.m_user_space);
-			m_impl.m_user_space = fil_space_get(space_id);
-			ut_ad(m_impl.m_user_space);
-			return m_impl.m_user_space;
+			ut_ad(m_user_space_id == space_id);
+			ut_ad(!m_user_space);
+			m_user_space = fil_space_get(space_id);
+			ut_ad(m_user_space);
+			return m_user_space;
 		}
 	}
 
@@ -286,10 +219,10 @@
 	@param[in]	space	user or system tablespace */
 	void set_named_space(fil_space_t* space)
 	{
-		ut_ad(!m_impl.m_user_space_id);
-		ut_d(m_impl.m_user_space_id = space->id);
+		ut_ad(!m_user_space_id);
+		ut_d(m_user_space_id = space->id);
 		if (space->id) {
-			m_impl.m_user_space = space;
+			m_user_space = space;
 		}
 	}
 
@@ -313,29 +246,7 @@
 	inline ulint read_ulint(const byte* ptr, mlog_id_t type) const
 		MY_ATTRIBUTE((warn_unused_result));
 
-	/** Locks a rw-latch in S mode.
-	NOTE: use mtr_s_lock().
-	@param lock	rw-lock
-	@param file	file name from where called
-	@param line	line number in file */
-	inline void s_lock(rw_lock_t* lock, const char* file, unsigned line);
-
-	/** Locks a rw-latch in X mode.
-	NOTE: use mtr_x_lock().
-	@param lock	rw-lock
-	@param file	file name from where called
-	@param line	line number in file */
-	inline void x_lock(rw_lock_t* lock, const char*	file, unsigned line);
-
-	/** Locks a rw-latch in X mode.
-	NOTE: use mtr_sx_lock().
-	@param lock	rw-lock
-	@param file	file name from where called
-	@param line	line number in file */
-	inline void sx_lock(rw_lock_t* lock, const char* file, unsigned line);
-
 	/** Acquire a tablespace X-latch.
-	NOTE: use mtr_x_lock_space().
 	@param[in]	space_id	tablespace ID
 	@param[in]	file		file name from where called
 	@param[in]	line		line number in file
@@ -345,6 +256,60 @@
 		const char*	file,
 		unsigned	line);
 
+	/** Acquire a shared rw-latch.
+	@param[in]	lock	rw-latch
+	@param[in]	file	file name from where called
+	@param[in]	line	line number in file */
+	void s_lock(rw_lock_t* lock, const char* file, unsigned line)
+	{
+		rw_lock_s_lock_inline(lock, 0, file, line);
+		memo_push(lock, MTR_MEMO_S_LOCK);
+	}
+
+	/** Acquire an exclusive rw-latch.
+	@param[in]	lock	rw-latch
+	@param[in]	file	file name from where called
+	@param[in]	line	line number in file */
+	void x_lock(rw_lock_t* lock, const char* file, unsigned line)
+	{
+		rw_lock_x_lock_inline(lock, 0, file, line);
+		memo_push(lock, MTR_MEMO_X_LOCK);
+	}
+
+	/** Acquire an shared/exclusive rw-latch.
+	@param[in]	lock	rw-latch
+	@param[in]	file	file name from where called
+	@param[in]	line	line number in file */
+	void sx_lock(rw_lock_t* lock, const char* file, unsigned line)
+	{
+		rw_lock_sx_lock_inline(lock, 0, file, line);
+		memo_push(lock, MTR_MEMO_SX_LOCK);
+	}
+
+	/** Acquire a tablespace S-latch.
+	@param[in]	space	tablespace
+	@param[in]	file	file name from where called
+	@param[in]	line	line number in file */
+	void s_lock_space(fil_space_t* space, const char* file, unsigned line)
+	{
+		ut_ad(space->purpose == FIL_TYPE_TEMPORARY
+		      || space->purpose == FIL_TYPE_IMPORT
+		      || space->purpose == FIL_TYPE_TABLESPACE);
+		s_lock(&space->latch, file, line);
+	}
+
+	/** Acquire a tablespace X-latch.
+	@param[in]	space	tablespace
+	@param[in]	file	file name from where called
+	@param[in]	line	line number in file */
+	void x_lock_space(fil_space_t* space, const char* file, unsigned line)
+	{
+		ut_ad(space->purpose == FIL_TYPE_TEMPORARY
+		      || space->purpose == FIL_TYPE_IMPORT
+		      || space->purpose == FIL_TYPE_TABLESPACE);
+		x_lock(&space->latch, file, line);
+	}
+
 	/** Release an object in the memo stack.
 	@param object	object
 	@param type	object type: MTR_MEMO_S_LOCK, ...
@@ -356,18 +321,12 @@
 	void release_page(const void* ptr, mtr_memo_type_t type);
 
 	/** Note that the mini-transaction has modified data. */
-	void set_modified()
-	{
-		m_impl.m_modifications = true;
-	}
+	void set_modified() { m_modifications = true; }
 
 	/** Set the state to not-modified. This will not log the
 	changes.  This is only used during redo log apply, to avoid
 	logging the changes. */
-	void discard_modifications()
-	{
-		m_impl.m_modifications = false;
-	}
+	void discard_modifications() { m_modifications = false; }
 
 	/** Get the LSN of commit().
 	@return the commit LSN
@@ -379,45 +338,28 @@
 	}
 
 	/** Note that we are inside the change buffer code. */
-	void enter_ibuf()
-	{
-		m_impl.m_inside_ibuf = true;
-	}
+	void enter_ibuf() { m_inside_ibuf = true; }
 
 	/** Note that we have exited from the change buffer code. */
-	void exit_ibuf()
-	{
-		m_impl.m_inside_ibuf = false;
-	}
+	void exit_ibuf() { m_inside_ibuf = false; }
 
 	/** @return true if we are inside the change buffer code */
-	bool is_inside_ibuf() const
-	{
-		return(m_impl.m_inside_ibuf);
-	}
+	bool is_inside_ibuf() const { return m_inside_ibuf; }
 
 	/*
 	@return true if the mini-transaction is active */
-	bool is_active() const
-	{
-		return(m_impl.m_state == MTR_STATE_ACTIVE);
-	}
+	bool is_active() const { return m_state == MTR_STATE_ACTIVE; }
 
 	/** Get flush observer
 	@return flush observer */
-	FlushObserver* get_flush_observer() const
-	{
-		return(m_impl.m_flush_observer);
-	}
+	FlushObserver* get_flush_observer() const { return m_flush_observer; }
 
 	/** Set flush observer
 	@param[in]	observer	flush observer */
 	void set_flush_observer(FlushObserver*	observer)
 	{
-		ut_ad(observer == NULL
-		      || m_impl.m_log_mode == MTR_LOG_NO_REDO);
-
-		m_impl.m_flush_observer = observer;
+		ut_ad(observer == NULL || m_log_mode == MTR_LOG_NO_REDO);
+		m_flush_observer = observer;
 	}
 
 #ifdef UNIV_DEBUG
@@ -457,65 +399,31 @@
 	void print() const;
 
 	/** @return true if the mini-transaction has committed */
-	bool has_committed() const
-	{
-		return(m_impl.m_state == MTR_STATE_COMMITTED);
-	}
-
-	/** @return true if the mini-transaction is committing */
-	bool is_committing() const
-	{
-		return(m_impl.m_state == MTR_STATE_COMMITTING);
-	}
+	bool has_committed() const { return m_state == MTR_STATE_COMMITTED; }
 
 	/** @return true if mini-transaction contains modifications. */
-	bool has_modifications() const
-	{
-		return(m_impl.m_modifications);
-	}
+	bool has_modifications() const { return m_modifications; }
 
 	/** @return the memo stack */
-	const mtr_buf_t* get_memo() const
-	{
-		return(&m_impl.m_memo);
-	}
+	const mtr_buf_t* get_memo() const { return &m_memo; }
 
 	/** @return the memo stack */
-	mtr_buf_t* get_memo()
-	{
-		return(&m_impl.m_memo);
-	}
+	mtr_buf_t* get_memo() { return &m_memo; }
 #endif /* UNIV_DEBUG */
 
 	/** @return true if a record was added to the mini-transaction */
-	bool is_dirty() const
-	{
-		return(m_impl.m_made_dirty);
-	}
+	bool is_dirty() const { return m_made_dirty; }
 
 	/** Note that a record has been added to the log */
-	void added_rec()
-	{
-		++m_impl.m_n_log_recs;
-	}
+	void added_rec() { ++m_n_log_recs; }
 
 	/** Get the buffered redo log of this mini-transaction.
 	@return	redo log */
-	const mtr_buf_t* get_log() const
-	{
-		ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-
-		return(&m_impl.m_log);
-	}
+	const mtr_buf_t* get_log() const { return &m_log; }
 
 	/** Get the buffered redo log of this mini-transaction.
 	@return	redo log */
-	mtr_buf_t* get_log()
-	{
-		ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-
-		return(&m_impl.m_log);
-	}
+	mtr_buf_t* get_log() { return &m_log; }
 
 	/** Push an object to an mtr memo stack.
 	@param object	object
@@ -529,15 +437,56 @@
 		MY_ATTRIBUTE((warn_unused_result));
 
 private:
-	class Command;
+	/** Prepare to write the mini-transaction log to the redo log buffer.
+	@return number of bytes to write in finish_write() */
+	inline ulint prepare_write();
 
-	friend class Command;
+	/** Append the redo log records to the redo log buffer.
+	@param[in]	len	number of bytes to write
+	@return start_lsn */
+	inline lsn_t finish_write(ulint len);
 
-private:
-	Impl			m_impl;
+	/** Release the resources */
+	inline void release_resources();
+
+	/** memo stack for locks etc. */
+	mtr_buf_t	m_memo;
+
+	/** mini-transaction log */
+	mtr_buf_t	m_log;
+
+	/** true if mtr has made at least one buffer pool page dirty */
+	bool		m_made_dirty;
+
+	/** true if inside ibuf changes */
+	bool		m_inside_ibuf;
+
+	/** true if the mini-transaction modified buffer pool pages */
+	bool		m_modifications;
+
+	/** Count of how many page initial log records have been
+	written to the mtr log */
+	ib_uint32_t	m_n_log_recs;
+
+	/** specifies which operations should be logged; default
+	value MTR_LOG_ALL */
+	mtr_log_t	m_log_mode;
+#ifdef UNIV_DEBUG
+	/** Persistent user tablespace associated with the
+	mini-transaction, or 0 (TRX_SYS_SPACE) if none yet */
+	ulint		m_user_space_id;
+#endif /* UNIV_DEBUG */
+	/** User tablespace that is being modified by the mini-transaction */
+	fil_space_t*	m_user_space;
+
+	/** State of the transaction */
+	mtr_state_t	m_state;
+
+	/** Flush Observer */
+	FlushObserver*	m_flush_observer;
 
 	/** LSN at commit time */
-	volatile lsn_t		m_commit_lsn;
+	lsn_t		m_commit_lsn;
 };
 
 #include "mtr0mtr.ic"
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/mtr0mtr.ic mariadb-10.3-10.3.22/storage/innobase/include/mtr0mtr.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/mtr0mtr.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/mtr0mtr.ic	2020-01-26 18:37:29.000000000 +0000
@@ -49,7 +49,6 @@
 	ut_ad(object != NULL);
 	ut_ad(type >= MTR_MEMO_PAGE_S_FIX);
 	ut_ad(type <= MTR_MEMO_SX_LOCK);
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
 	ut_ad(ut_is_2pow(type));
 
 	/* If this mtr has x-fixed a clean page then we set
@@ -58,15 +57,13 @@
 	can insert the dirtied page to the flush list. */
 
 	if ((type == MTR_MEMO_PAGE_X_FIX || type == MTR_MEMO_PAGE_SX_FIX)
-	    && !m_impl.m_made_dirty) {
+	    && !m_made_dirty) {
 
-		m_impl.m_made_dirty = is_block_dirtied(
+		m_made_dirty = is_block_dirtied(
 			reinterpret_cast(object));
 	}
 
-	mtr_memo_slot_t*	slot;
-
-	slot = m_impl.m_memo.push(sizeof(*slot));
+	mtr_memo_slot_t* slot = m_memo.push(sizeof(*slot));
 
 	slot->type = type;
 	slot->object = object;
@@ -81,11 +78,9 @@
 	rw_lock_t*	lock)
 {
 	ut_ad(is_active());
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-
-	ut_ad(m_impl.m_memo.size() > savepoint);
+	ut_ad(m_memo.size() > savepoint);
 
-	mtr_memo_slot_t* slot = m_impl.m_memo.at(savepoint);
+	mtr_memo_slot_t* slot = m_memo.at(savepoint);
 
 	ut_ad(slot->object == lock);
 	ut_ad(slot->type == MTR_MEMO_S_LOCK);
@@ -104,8 +99,7 @@
 	buf_block_t*	block)
 {
 	ut_ad(is_active());
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-	ut_ad(m_impl.m_memo.size() > savepoint);
+	ut_ad(m_memo.size() > savepoint);
 
 	ut_ad(!memo_contains_flagged(
 			block,
@@ -113,9 +107,7 @@
 			| MTR_MEMO_PAGE_X_FIX
 			| MTR_MEMO_PAGE_SX_FIX));
 
-	mtr_memo_slot_t*	slot;
-
-	slot = m_impl.m_memo.at(savepoint);
+	mtr_memo_slot_t* slot = m_memo.at(savepoint);
 
 	ut_ad(slot->object == block);
 
@@ -124,8 +116,8 @@
 
 	rw_lock_sx_lock(&block->lock);
 
-	if (!m_impl.m_made_dirty) {
-		m_impl.m_made_dirty = is_block_dirtied(block);
+	if (!m_made_dirty) {
+		m_made_dirty = is_block_dirtied(block);
 	}
 
 	slot->type = MTR_MEMO_PAGE_SX_FIX;
@@ -140,8 +132,7 @@
 	buf_block_t*	block)
 {
 	ut_ad(is_active());
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-	ut_ad(m_impl.m_memo.size() > savepoint);
+	ut_ad(m_memo.size() > savepoint);
 
 	ut_ad(!memo_contains_flagged(
 			block,
@@ -149,9 +140,7 @@
 			| MTR_MEMO_PAGE_X_FIX
 			| MTR_MEMO_PAGE_SX_FIX));
 
-	mtr_memo_slot_t*	slot;
-
-	slot = m_impl.m_memo.at(savepoint);
+	mtr_memo_slot_t* slot = m_memo.at(savepoint);
 
 	ut_ad(slot->object == block);
 
@@ -160,8 +149,8 @@
 
 	rw_lock_x_lock(&block->lock);
 
-	if (!m_impl.m_made_dirty) {
-		m_impl.m_made_dirty = is_block_dirtied(block);
+	if (!m_made_dirty) {
+		m_made_dirty = is_block_dirtied(block);
 	}
 
 	slot->type = MTR_MEMO_PAGE_X_FIX;
@@ -176,11 +165,8 @@
 	buf_block_t*	block)
 {
 	ut_ad(is_active());
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
 
-	mtr_memo_slot_t*	slot;
-
-	slot = m_impl.m_memo.at(savepoint);
+	mtr_memo_slot_t* slot = m_memo.at(savepoint);
 
 	ut_a(slot->object == block);
 
@@ -198,10 +184,10 @@
 mtr_log_t
 mtr_t::get_log_mode() const
 {
-	ut_ad(m_impl.m_log_mode >= MTR_LOG_ALL);
-	ut_ad(m_impl.m_log_mode <= MTR_LOG_SHORT_INSERTS);
+	ut_ad(m_log_mode >= MTR_LOG_ALL);
+	ut_ad(m_log_mode <= MTR_LOG_SHORT_INSERTS);
 
-	return(m_impl.m_log_mode);
+	return m_log_mode;
 }
 
 /**
@@ -214,7 +200,7 @@
 	ut_ad(mode >= MTR_LOG_ALL);
 	ut_ad(mode <= MTR_LOG_SHORT_INSERTS);
 
-	const mtr_log_t	old_mode = m_impl.m_log_mode;
+	const mtr_log_t	old_mode = m_log_mode;
 
 	switch (old_mode) {
 	case MTR_LOG_NO_REDO:
@@ -233,9 +219,8 @@
 	case MTR_LOG_ALL:
 		/* MTR_LOG_NO_REDO can only be set before generating
 		any redo log records. */
-		ut_ad(mode != MTR_LOG_NO_REDO
-		      || m_impl.m_n_log_recs == 0);
-		m_impl.m_log_mode = mode;
+		ut_ad(mode != MTR_LOG_NO_REDO || m_n_log_recs == 0);
+		m_log_mode = mode;
 		return(old_mode);
 	}
 
@@ -244,39 +229,6 @@
 }
 
 /**
-Locks a lock in s-mode. */
-
-void
-mtr_t::s_lock(rw_lock_t* lock, const char* file, unsigned line)
-{
-	rw_lock_s_lock_inline(lock, 0, file, line);
-
-	memo_push(lock, MTR_MEMO_S_LOCK);
-}
-
-/**
-Locks a lock in x-mode. */
-
-void
-mtr_t::x_lock(rw_lock_t* lock, const char* file, unsigned line)
-{
-	rw_lock_x_lock_inline(lock, 0, file, line);
-
-	memo_push(lock, MTR_MEMO_X_LOCK);
-}
-
-/**
-Locks a lock in sx-mode. */
-
-void
-mtr_t::sx_lock(rw_lock_t* lock, const char* file, unsigned line)
-{
-	rw_lock_sx_lock_inline(lock, 0, file, line);
-
-	memo_push(lock, MTR_MEMO_SX_LOCK);
-}
-
-/**
 Reads 1 - 4 bytes from a file page buffered in the buffer pool.
 @return	value read */
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/mtr0types.h mariadb-10.3-10.3.22/storage/innobase/include/mtr0types.h
--- mariadb-10.3-10.3.18/storage/innobase/include/mtr0types.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/mtr0types.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -36,18 +36,18 @@
 /** Logging modes for a mini-transaction */
 enum mtr_log_t {
 	/** Default mode: log all operations modifying disk-based data */
-	MTR_LOG_ALL = 21,
+	MTR_LOG_ALL = 0,
 
 	/** Log no operations and dirty pages are not added to the flush list.
 	Set when applying log in crash recovery or when a modification of a
 	ROW_FORMAT=COMPRESSED page is attempted. */
-	MTR_LOG_NONE = 22,
+	MTR_LOG_NONE,
 
 	/** Don't generate REDO log but add dirty pages to flush list */
-	MTR_LOG_NO_REDO = 23,
+	MTR_LOG_NO_REDO,
 
 	/** Inserts are logged in a shorter form */
-	MTR_LOG_SHORT_INSERTS = 24
+	MTR_LOG_SHORT_INSERTS
 };
 
 /** @name Log item types
@@ -271,15 +271,10 @@
 };
 #endif /* !UNIV_CHECKSUM */
 
-#ifdef UNIV_DEBUG
-# define MTR_MAGIC_N		54551
-#endif /* UNIV_DEBUG */
-
 enum mtr_state_t {
 	MTR_STATE_INIT = 0,
-	MTR_STATE_ACTIVE = 12231,
-	MTR_STATE_COMMITTING = 56456,
-	MTR_STATE_COMMITTED = 34676
+	MTR_STATE_ACTIVE,
+	MTR_STATE_COMMITTED
 };
 
 #endif /* mtr0types_h */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0cur.h mariadb-10.3-10.3.22/storage/innobase/include/page0cur.h
--- mariadb-10.3-10.3.18/storage/innobase/include/page0cur.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0cur.h	2020-01-26 18:37:29.000000000 +0000
@@ -29,6 +29,7 @@
 
 #include "buf0types.h"
 #include "page0page.h"
+#include "rem0types.h"
 #include "rem0rec.h"
 #include "data0data.h"
 #include "mtr0mtr.h"
@@ -151,7 +152,7 @@
 	page_cur_t*	cursor,	/*!< in/out: a page cursor */
 	const dtuple_t*	tuple,	/*!< in: pointer to a data tuple */
 	dict_index_t*	index,	/*!< in: record descriptor */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
@@ -175,7 +176,7 @@
 	page_cur_t*	cursor,	/*!< in/out: a page cursor */
 	const rec_t*	rec,	/*!< in: record to insert */
 	dict_index_t*	index,	/*!< in: record descriptor */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mtr_t*		mtr);	/*!< in: mini-transaction handle, or NULL */
 /***********************************************************//**
 Inserts a record next to page cursor on an uncompressed page.
@@ -189,7 +190,7 @@
 				which the new record is inserted */
 	dict_index_t*	index,	/*!< in: record descriptor */
 	const rec_t*	rec,	/*!< in: pointer to a physical record */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
 	MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
 
@@ -211,7 +212,7 @@
 	page_cur_t*	cursor,	/*!< in/out: page cursor */
 	dict_index_t*	index,	/*!< in: record descriptor */
 	const rec_t*	rec,	/*!< in: pointer to a physical record */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
 	MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
 /*************************************************************//**
@@ -237,7 +238,7 @@
 /*================*/
 	page_cur_t*		cursor,	/*!< in/out: a page cursor */
 	const dict_index_t*	index,	/*!< in: record descriptor */
-	const ulint*		offsets,/*!< in: rec_get_offsets(
+	const offset_t*		offsets,/*!< in: rec_get_offsets(
 					cursor->rec, index) */
 	mtr_t*			mtr);	/*!< in: mini-transaction handle */
 
@@ -385,14 +386,14 @@
 	page_cur_t*		pcur,	/*!< in/out: page cursor on record
 					to delete */
 	page_zip_des_t*		page_zip,/*!< in: compressed page descriptor */
-	const ulint*		offsets);/*!< in: offsets for record */
+	const offset_t*		offsets);/*!< in: offsets for record */
 
 /** Index page cursor */
 
 struct page_cur_t{
 	const dict_index_t*	index;
 	rec_t*		rec;	/*!< pointer to a record on page */
-	ulint*		offsets;
+	offset_t*	offsets;
 	buf_block_t*	block;	/*!< pointer to the block containing rec */
 };
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0cur.ic mariadb-10.3-10.3.22/storage/innobase/include/page0cur.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/page0cur.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0cur.ic	2020-01-26 18:37:29.000000000 +0000
@@ -259,7 +259,7 @@
 	page_cur_t*	cursor,	/*!< in/out: a page cursor */
 	const dtuple_t*	tuple,	/*!< in: pointer to a data tuple */
 	dict_index_t*	index,	/*!< in: record descriptor */
-	ulint**		offsets,/*!< out: offsets on *rec */
+	offset_t**	offsets,/*!< out: offsets on *rec */
 	mem_heap_t**	heap,	/*!< in/out: pointer to memory heap, or NULL */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
@@ -312,7 +312,7 @@
 	page_cur_t*	cursor,	/*!< in/out: a page cursor */
 	const rec_t*	rec,	/*!< in: record to insert */
 	dict_index_t*	index,	/*!< in: record descriptor */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
 {
 	if (buf_block_get_page_zip(cursor->block)) {
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0page.h mariadb-10.3-10.3.22/storage/innobase/include/page0page.h
--- mariadb-10.3-10.3.18/storage/innobase/include/page0page.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0page.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,6 @@
 /*****************************************************************************
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2013, 2020, 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
@@ -32,6 +32,7 @@
 #include "buf0buf.h"
 #include "data0data.h"
 #include "dict0dict.h"
+#include "rem0types.h"
 #include "rem0rec.h"
 #endif /* !UNIV_INNOCHECKSUM*/
 #include "fsp0fsp.h"
@@ -857,6 +858,22 @@
 	MY_ATTRIBUTE((warn_unused_result));
 
 /************************************************************//**
+true if distance between the records (measured in number of times we have to
+move to the next record) is at most the specified value
+@param[in]	left_rec	lefter record
+@param[in]	right_rec	righter record
+@param[in]	val		specified value to compare
+@return true if the distance is smaller than the value */
+UNIV_INLINE
+bool
+page_rec_distance_is_at_most(
+/*=========================*/
+	const rec_t*	left_rec,
+	const rec_t*	right_rec,
+	ulint		val)
+	MY_ATTRIBUTE((warn_unused_result));
+
+/************************************************************//**
 true if the record is the second last user record on a page.
 @return true if the second last user record */
 UNIV_INLINE
@@ -876,17 +893,6 @@
 /*====================*/
 	rec_t*	rec);	/*!< in: the physical record */
 
-/***********************************************************************//**
-Write a 32-bit field in a data dictionary record. */
-UNIV_INLINE
-void
-page_rec_write_field(
-/*=================*/
-	rec_t*	rec,	/*!< in/out: record to update */
-	ulint	i,	/*!< in: index of the field to update */
-	ulint	val,	/*!< in: value to write */
-	mtr_t*	mtr)	/*!< in/out: mini-transaction */
-	MY_ATTRIBUTE((nonnull));
 /************************************************************//**
 Returns the maximum combined size of records which can be inserted on top
 of record heap.
@@ -974,7 +980,7 @@
 	rec_t*			rec,	/*!< in: pointer to the (origin of)
 					record */
 	const dict_index_t*	index,	/*!< in: index of rec */
-	const ulint*		offsets);/*!< in: array returned by
+	const offset_t*		offsets);/*!< in: array returned by
 					 rec_get_offsets() */
 
 /** Read the PAGE_DIRECTION field from a byte.
@@ -1234,7 +1240,7 @@
 page_rec_print(
 /*===========*/
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets);/*!< in: record descriptor */
+	const offset_t*	offsets);/*!< in: record descriptor */
 # ifdef UNIV_BTR_PRINT
 /***************************************************************//**
 This is used to print the contents of the directory for
@@ -1281,7 +1287,7 @@
 page_rec_validate(
 /*==============*/
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets);/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets);/*!< in: array returned by rec_get_offsets() */
 #ifdef UNIV_DEBUG
 /***************************************************************//**
 Checks that the first directory slot points to the infimum record and
@@ -1310,15 +1316,12 @@
 page_simple_validate_new(
 /*=====================*/
 	const page_t*	page);	/*!< in: index page in ROW_FORMAT!=REDUNDANT */
-/***************************************************************//**
-This function checks the consistency of an index page.
-@return TRUE if ok */
-ibool
-page_validate(
-/*==========*/
-	const page_t*	page,	/*!< in: index page */
-	dict_index_t*	index);	/*!< in: data dictionary index containing
-				the page record type definition */
+/** Check the consistency of an index page.
+@param[in]	page	index page
+@param[in]	index	B-tree or R-tree index
+@return	whether the page is valid */
+bool page_validate(const page_t* page, const dict_index_t* index)
+	MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Looks in the page record list for a record with the given heap number.
 @return record, NULL if not found */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0page.ic mariadb-10.3-10.3.22/storage/innobase/include/page0page.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/page0page.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0page.ic	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2019, MariaDB Corporation.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2016, 2020, 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
@@ -359,6 +359,26 @@
 }
 
 /************************************************************//**
+true if distance between the records (measured in number of times we have to
+move to the next record) is at most the specified value */
+UNIV_INLINE
+bool
+page_rec_distance_is_at_most(
+/*=========================*/
+	const rec_t*	left_rec,
+	const rec_t*	right_rec,
+	ulint		val)
+{
+	for (ulint i = 0; i <= val; i++) {
+		if (left_rec == right_rec) {
+			return (true);
+		}
+		left_rec = page_rec_get_next_const(left_rec);
+	}
+	return (false);
+}
+
+/************************************************************//**
 true if the record is the second last user record on a page.
 @return true if the second last user record */
 UNIV_INLINE
@@ -659,6 +679,11 @@
 		return(NULL);
 	}
 
+	ut_ad(page_rec_is_infimum(rec)
+	      || (!page_is_leaf(page) && !page_has_prev(page))
+	      || !(rec_get_info_bits(page + offs, comp)
+		   & REC_INFO_MIN_REC_FLAG));
+
 	return(page + offs);
 }
 
@@ -915,27 +940,6 @@
 		       - 2 * PAGE_DIR_SLOT_SIZE));
 }
 
-/***********************************************************************//**
-Write a 32-bit field in a data dictionary record. */
-UNIV_INLINE
-void
-page_rec_write_field(
-/*=================*/
-	rec_t*	rec,	/*!< in/out: record to update */
-	ulint	i,	/*!< in: index of the field to update */
-	ulint	val,	/*!< in: value to write */
-	mtr_t*	mtr)	/*!< in/out: mini-transaction */
-{
-	byte*	data;
-	ulint	len;
-
-	data = rec_get_nth_field_old(rec, i, &len);
-
-	ut_ad(len == 4);
-
-	mlog_write_ulint(data, val, MLOG_4BYTES, mtr);
-}
-
 /************************************************************//**
 Each user record on a page, and also the deleted user records in the heap
 takes its size plus the fraction of the dir cell size /
@@ -1021,7 +1025,7 @@
 	rec_t*			rec,		/*!< in: pointer to the
 						(origin of) record */
 	const dict_index_t*	index,		/*!< in: index of rec */
-	const ulint*		offsets)	/*!< in: array returned by
+	const offset_t*		offsets)	/*!< in: array returned by
 						rec_get_offsets() */
 {
 	rec_t*		free;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0types.h mariadb-10.3-10.3.22/storage/innobase/include/page0types.h
--- mariadb-10.3-10.3.18/storage/innobase/include/page0types.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0types.h	2020-01-26 18:37:29.000000000 +0000
@@ -28,6 +28,7 @@
 
 #include "dict0types.h"
 #include "mtr0types.h"
+#include "rem0types.h"
 
 #include 
 
@@ -184,7 +185,7 @@
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
 	byte*		rec,	/*!< in: deleted record */
 	dict_index_t*	index,	/*!< in: index of rec */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec) */
 	const byte*	free)	/*!< in: previous start of the free list */
 	MY_ATTRIBUTE((nonnull(1,2,3,4)));
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0zip.h mariadb-10.3-10.3.22/storage/innobase/include/page0zip.h
--- mariadb-10.3-10.3.18/storage/innobase/include/page0zip.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0zip.h	2020-01-26 18:37:29.000000000 +0000
@@ -47,6 +47,7 @@
 #endif /* !UNIV_INNOCHECKSUM */
 
 #include "buf0types.h"
+#include "rem0types.h"
 
 #ifndef UNIV_INNOCHECKSUM
 #include "dict0types.h"
@@ -287,7 +288,7 @@
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
 	const byte*	rec,	/*!< in: record being written */
 	dict_index_t*	index,	/*!< in: the index the record belongs to */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	ulint		create)	/*!< in: nonzero=insert, zero=update */
 	MY_ATTRIBUTE((nonnull));
 
@@ -312,7 +313,7 @@
 	const byte*	rec,	/*!< in/out: record whose data is being
 				written */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	ulint		n,	/*!< in: column index */
 	mtr_t*		mtr);	/*!< in: mini-transaction handle,
 				or NULL if no logging is needed */
@@ -351,7 +352,7 @@
 page_zip_write_trx_id_and_roll_ptr(
 	page_zip_des_t*	page_zip,
 	byte*		rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	ulint		trx_id_col,
 	trx_id_t	trx_id,
 	roll_ptr_t	roll_ptr,
@@ -415,7 +416,7 @@
 	page_zip_des_t*		page_zip,	/*!< in/out: compressed page */
 	byte*			rec,		/*!< in: deleted record */
 	const dict_index_t*	index,		/*!< in: index of rec */
-	const ulint*		offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*		offsets,	/*!< in: rec_get_offsets(rec) */
 	const byte*		free)		/*!< in: previous start of
 						the free list */
 	MY_ATTRIBUTE((nonnull(1,2,3,4)));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/page0zip.ic mariadb-10.3-10.3.22/storage/innobase/include/page0zip.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/page0zip.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/page0zip.ic	2020-01-26 18:37:29.000000000 +0000
@@ -164,6 +164,9 @@
 	ulint			n_fields,
 	const page_size_t&	page_size)
 {
+	/* FIXME: row size check is this function seems to be the most correct.
+	Put it in a separate function and use in more places of InnoDB */
+
 	ut_ad(rec_size
 	      > ulint(comp ? REC_N_NEW_EXTRA_BYTES : REC_N_OLD_EXTRA_BYTES));
 	ut_ad(comp || !page_size.is_compressed());
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/pars0grm.h mariadb-10.3-10.3.22/storage/innobase/include/pars0grm.h
--- mariadb-10.3-10.3.18/storage/innobase/include/pars0grm.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/pars0grm.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,8 +1,9 @@
-/* A Bison parser, made by GNU Bison 3.0.4.  */
+/* A Bison parser, made by GNU Bison 3.4.2.  */
 
 /* Bison interface for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+   Inc.
 
    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
@@ -30,6 +31,9 @@
    This special exception was added by the Free Software Foundation in
    version 2.2 of Bison.  */
 
+/* Undocumented macros, especially those whose name start with YY_,
+   are private implementation details.  Do not rely on them.  */
+
 #ifndef YY_YY_PARS0GRM_TAB_H_INCLUDED
 # define YY_YY_PARS0GRM_TAB_H_INCLUDED
 /* Debug traces.  */
@@ -58,91 +62,71 @@
     PARS_NE_TOKEN = 268,
     PARS_PROCEDURE_TOKEN = 269,
     PARS_IN_TOKEN = 270,
-    PARS_OUT_TOKEN = 271,
-    PARS_BINARY_TOKEN = 272,
-    PARS_BLOB_TOKEN = 273,
-    PARS_INT_TOKEN = 274,
-    PARS_FLOAT_TOKEN = 275,
-    PARS_CHAR_TOKEN = 276,
-    PARS_IS_TOKEN = 277,
-    PARS_BEGIN_TOKEN = 278,
-    PARS_END_TOKEN = 279,
-    PARS_IF_TOKEN = 280,
-    PARS_THEN_TOKEN = 281,
-    PARS_ELSE_TOKEN = 282,
-    PARS_ELSIF_TOKEN = 283,
-    PARS_LOOP_TOKEN = 284,
-    PARS_WHILE_TOKEN = 285,
-    PARS_RETURN_TOKEN = 286,
-    PARS_SELECT_TOKEN = 287,
-    PARS_SUM_TOKEN = 288,
-    PARS_COUNT_TOKEN = 289,
-    PARS_DISTINCT_TOKEN = 290,
-    PARS_FROM_TOKEN = 291,
-    PARS_WHERE_TOKEN = 292,
-    PARS_FOR_TOKEN = 293,
-    PARS_DDOT_TOKEN = 294,
-    PARS_READ_TOKEN = 295,
-    PARS_ORDER_TOKEN = 296,
-    PARS_BY_TOKEN = 297,
-    PARS_ASC_TOKEN = 298,
-    PARS_DESC_TOKEN = 299,
-    PARS_INSERT_TOKEN = 300,
-    PARS_INTO_TOKEN = 301,
-    PARS_VALUES_TOKEN = 302,
-    PARS_UPDATE_TOKEN = 303,
-    PARS_SET_TOKEN = 304,
-    PARS_DELETE_TOKEN = 305,
-    PARS_CURRENT_TOKEN = 306,
-    PARS_OF_TOKEN = 307,
-    PARS_CREATE_TOKEN = 308,
-    PARS_TABLE_TOKEN = 309,
-    PARS_INDEX_TOKEN = 310,
-    PARS_UNIQUE_TOKEN = 311,
-    PARS_CLUSTERED_TOKEN = 312,
-    PARS_ON_TOKEN = 313,
-    PARS_ASSIGN_TOKEN = 314,
-    PARS_DECLARE_TOKEN = 315,
-    PARS_CURSOR_TOKEN = 316,
-    PARS_SQL_TOKEN = 317,
-    PARS_OPEN_TOKEN = 318,
-    PARS_FETCH_TOKEN = 319,
-    PARS_CLOSE_TOKEN = 320,
-    PARS_NOTFOUND_TOKEN = 321,
-    PARS_TO_CHAR_TOKEN = 322,
-    PARS_TO_NUMBER_TOKEN = 323,
-    PARS_TO_BINARY_TOKEN = 324,
-    PARS_BINARY_TO_NUMBER_TOKEN = 325,
-    PARS_SUBSTR_TOKEN = 326,
-    PARS_REPLSTR_TOKEN = 327,
-    PARS_CONCAT_TOKEN = 328,
-    PARS_INSTR_TOKEN = 329,
-    PARS_LENGTH_TOKEN = 330,
-    PARS_SYSDATE_TOKEN = 331,
-    PARS_PRINTF_TOKEN = 332,
-    PARS_ASSERT_TOKEN = 333,
-    PARS_RND_TOKEN = 334,
-    PARS_RND_STR_TOKEN = 335,
-    PARS_ROW_PRINTF_TOKEN = 336,
-    PARS_COMMIT_TOKEN = 337,
-    PARS_ROLLBACK_TOKEN = 338,
-    PARS_WORK_TOKEN = 339,
-    PARS_UNSIGNED_TOKEN = 340,
-    PARS_EXIT_TOKEN = 341,
-    PARS_FUNCTION_TOKEN = 342,
-    PARS_LOCK_TOKEN = 343,
-    PARS_SHARE_TOKEN = 344,
-    PARS_MODE_TOKEN = 345,
-    PARS_LIKE_TOKEN = 346,
-    PARS_LIKE_TOKEN_EXACT = 347,
-    PARS_LIKE_TOKEN_PREFIX = 348,
-    PARS_LIKE_TOKEN_SUFFIX = 349,
-    PARS_LIKE_TOKEN_SUBSTR = 350,
-    PARS_TABLE_NAME_TOKEN = 351,
-    PARS_COMPACT_TOKEN = 352,
-    PARS_BLOCK_SIZE_TOKEN = 353,
-    PARS_BIGINT_TOKEN = 354,
-    NEG = 355
+    PARS_INT_TOKEN = 271,
+    PARS_CHAR_TOKEN = 272,
+    PARS_IS_TOKEN = 273,
+    PARS_BEGIN_TOKEN = 274,
+    PARS_END_TOKEN = 275,
+    PARS_IF_TOKEN = 276,
+    PARS_THEN_TOKEN = 277,
+    PARS_ELSE_TOKEN = 278,
+    PARS_ELSIF_TOKEN = 279,
+    PARS_LOOP_TOKEN = 280,
+    PARS_WHILE_TOKEN = 281,
+    PARS_RETURN_TOKEN = 282,
+    PARS_SELECT_TOKEN = 283,
+    PARS_COUNT_TOKEN = 284,
+    PARS_FROM_TOKEN = 285,
+    PARS_WHERE_TOKEN = 286,
+    PARS_FOR_TOKEN = 287,
+    PARS_DDOT_TOKEN = 288,
+    PARS_ORDER_TOKEN = 289,
+    PARS_BY_TOKEN = 290,
+    PARS_ASC_TOKEN = 291,
+    PARS_DESC_TOKEN = 292,
+    PARS_INSERT_TOKEN = 293,
+    PARS_INTO_TOKEN = 294,
+    PARS_VALUES_TOKEN = 295,
+    PARS_UPDATE_TOKEN = 296,
+    PARS_SET_TOKEN = 297,
+    PARS_DELETE_TOKEN = 298,
+    PARS_CURRENT_TOKEN = 299,
+    PARS_OF_TOKEN = 300,
+    PARS_CREATE_TOKEN = 301,
+    PARS_TABLE_TOKEN = 302,
+    PARS_INDEX_TOKEN = 303,
+    PARS_UNIQUE_TOKEN = 304,
+    PARS_CLUSTERED_TOKEN = 305,
+    PARS_ON_TOKEN = 306,
+    PARS_ASSIGN_TOKEN = 307,
+    PARS_DECLARE_TOKEN = 308,
+    PARS_CURSOR_TOKEN = 309,
+    PARS_SQL_TOKEN = 310,
+    PARS_OPEN_TOKEN = 311,
+    PARS_FETCH_TOKEN = 312,
+    PARS_CLOSE_TOKEN = 313,
+    PARS_NOTFOUND_TOKEN = 314,
+    PARS_TO_BINARY_TOKEN = 315,
+    PARS_SUBSTR_TOKEN = 316,
+    PARS_CONCAT_TOKEN = 317,
+    PARS_INSTR_TOKEN = 318,
+    PARS_LENGTH_TOKEN = 319,
+    PARS_COMMIT_TOKEN = 320,
+    PARS_ROLLBACK_TOKEN = 321,
+    PARS_WORK_TOKEN = 322,
+    PARS_EXIT_TOKEN = 323,
+    PARS_FUNCTION_TOKEN = 324,
+    PARS_LOCK_TOKEN = 325,
+    PARS_SHARE_TOKEN = 326,
+    PARS_MODE_TOKEN = 327,
+    PARS_LIKE_TOKEN = 328,
+    PARS_LIKE_TOKEN_EXACT = 329,
+    PARS_LIKE_TOKEN_PREFIX = 330,
+    PARS_LIKE_TOKEN_SUFFIX = 331,
+    PARS_LIKE_TOKEN_SUBSTR = 332,
+    PARS_TABLE_NAME_TOKEN = 333,
+    PARS_BIGINT_TOKEN = 334,
+    NEG = 335
   };
 #endif
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/pars0pars.h mariadb-10.3-10.3.22/storage/innobase/include/pars0pars.h
--- mariadb-10.3-10.3.18/storage/innobase/include/pars0pars.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/pars0pars.h	2020-01-26 18:37:29.000000000 +0000
@@ -48,29 +48,15 @@
 NOT re-entrant */
 extern sym_tab_t*	pars_sym_tab_global;
 
-extern pars_res_word_t	pars_to_char_token;
-extern pars_res_word_t	pars_to_number_token;
 extern pars_res_word_t	pars_to_binary_token;
-extern pars_res_word_t	pars_binary_to_number_token;
 extern pars_res_word_t	pars_substr_token;
-extern pars_res_word_t	pars_replstr_token;
 extern pars_res_word_t	pars_concat_token;
 extern pars_res_word_t	pars_length_token;
 extern pars_res_word_t	pars_instr_token;
-extern pars_res_word_t	pars_sysdate_token;
-extern pars_res_word_t	pars_printf_token;
-extern pars_res_word_t	pars_assert_token;
-extern pars_res_word_t	pars_rnd_token;
-extern pars_res_word_t	pars_rnd_str_token;
 extern pars_res_word_t	pars_count_token;
-extern pars_res_word_t	pars_sum_token;
-extern pars_res_word_t	pars_distinct_token;
-extern pars_res_word_t	pars_binary_token;
-extern pars_res_word_t	pars_blob_token;
 extern pars_res_word_t	pars_int_token;
 extern pars_res_word_t	pars_bigint_token;
 extern pars_res_word_t	pars_char_token;
-extern pars_res_word_t	pars_float_token;
 extern pars_res_word_t	pars_update_token;
 extern pars_res_word_t	pars_asc_token;
 extern pars_res_word_t	pars_desc_token;
@@ -236,17 +222,6 @@
 	que_node_t*	values_list,	/*!< in: value expression list or NULL */
 	sel_node_t*	select);	/*!< in: select condition or NULL */
 /*********************************************************************//**
-Parses a procedure parameter declaration.
-@return own: symbol table node of type SYM_VAR */
-sym_node_t*
-pars_parameter_declaration(
-/*=======================*/
-	sym_node_t*	node,	/*!< in: symbol table node allocated for the
-				id of the parameter */
-	ulint		param_type,
-				/*!< in: PARS_INPUT or PARS_OUTPUT */
-	pars_res_word_t* type);	/*!< in: pointer to a type token */
-/*********************************************************************//**
 Parses an elsif element.
 @return elsif node */
 elsif_node_t*
@@ -358,8 +333,6 @@
 	pars_res_word_t*	type,		/*!< in: data type */
 	sym_node_t*		len,		/*!< in: length of column, or
 						NULL */
-	void*			is_unsigned,	/*!< in: if not NULL, column
-						is of type UNSIGNED. */
 	void*			is_not_null);	/*!< in: if not NULL, column
 						is of type NOT NULL. */
 /*********************************************************************//**
@@ -370,9 +343,7 @@
 /*==============*/
 	sym_node_t*	table_sym,	/*!< in: table name node in the symbol
 					table */
-	sym_node_t*	column_defs,	/*!< in: list of column names */
-	sym_node_t*	compact,	/* in: non-NULL if COMPACT table. */
-	sym_node_t*	block_size);	/* in: block size (can be NULL) */
+	sym_node_t*	column_defs);	/*!< in: list of column names */
 /*********************************************************************//**
 Parses an index creation operation.
 @return index create subgraph */
@@ -394,7 +365,6 @@
 /*======================*/
 	sym_node_t*	sym_node,	/*!< in: procedure id node in the symbol
 					table */
-	sym_node_t*	param_list,	/*!< in: parameter declaration list */
 	que_node_t*	stat_list);	/*!< in: statement list */
 
 /*************************************************************//**
@@ -672,7 +642,6 @@
 	que_common_t	common;		/*!< type: QUE_NODE_PROC */
 	sym_node_t*	proc_id;	/*!< procedure name symbol in the symbol
 					table of this same procedure */
-	sym_node_t*	param_list;	/*!< input and output parameters */
 	que_node_t*	stat_list;	/*!< statement list */
 	sym_tab_t*	sym_tab;	/*!< symbol table of this procedure */
 };
@@ -747,7 +716,7 @@
 #define	PARS_FUNC_LOGICAL	2	/*!< AND, OR, NOT */
 #define PARS_FUNC_CMP		3	/*!< comparison operators */
 #define	PARS_FUNC_PREDEFINED	4	/*!< TO_NUMBER, SUBSTR, ... */
-#define	PARS_FUNC_AGGREGATE	5	/*!< COUNT, DISTINCT, SUM */
+#define	PARS_FUNC_AGGREGATE	5	/*!< COUNT */
 #define	PARS_FUNC_OTHER		6	/*!< these are not real functions,
 					e.g., := */
 /* @} */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/que0que.h mariadb-10.3-10.3.22/storage/innobase/include/que0que.h
--- mariadb-10.3-10.3.18/storage/innobase/include/que0que.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/que0que.h	2020-01-26 18:37:29.000000000 +0000
@@ -378,6 +378,9 @@
 					related delete/updates */
 	row_prebuilt_t*	prebuilt;	/*!< prebuilt structure processed by
 					the query thread */
+
+	/** a slot of srv_sys.sys_threads, for DEBUG_SYNC in purge thread */
+	ut_d(srv_slot_t* thread_slot;)
 };
 
 #define QUE_THR_MAGIC_N		8476583
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/rem0cmp.h mariadb-10.3-10.3.22/storage/innobase/include/rem0cmp.h
--- mariadb-10.3-10.3.18/storage/innobase/include/rem0cmp.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/rem0cmp.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2020, 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
@@ -80,7 +80,7 @@
 
 /** Compare a GIS data tuple to a physical record.
 @param[in] dtuple data tuple
-@param[in] rec B-tree record
+@param[in] rec R-tree record
 @param[in] offsets rec_get_offsets(rec)
 @param[in] mode compare mode
 @retval negative if dtuple is less than rec */
@@ -89,7 +89,7 @@
 /*====================*/
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	page_cur_mode_t	mode)
 	MY_ATTRIBUTE((nonnull));
 
@@ -105,7 +105,7 @@
 cmp_dtuple_rec_with_gis_internal(
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets);
+	const offset_t*	offsets);
 
 /** Compare a data tuple to a physical record.
 @param[in] dtuple data tuple
@@ -121,7 +121,7 @@
 cmp_dtuple_rec_with_match_low(
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	ulint		n_cmp,
 	ulint*		matched_fields)
 	MY_ATTRIBUTE((nonnull));
@@ -145,7 +145,7 @@
 	const dtuple_t*		dtuple,
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	ulint*			matched_fields,
 	ulint*			matched_bytes)
 	MY_ATTRIBUTE((warn_unused_result));
@@ -162,7 +162,7 @@
 cmp_dtuple_rec(
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets);
+	const offset_t*	offsets);
 /**************************************************************//**
 Checks if a dtuple is a prefix of a record. The last field in dtuple
 is allowed to be a prefix of the corresponding field in the record.
@@ -172,7 +172,7 @@
 /*========================*/
 	const dtuple_t*	dtuple,	/*!< in: data tuple */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets);/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets);/*!< in: array returned by rec_get_offsets() */
 /** Compare two physical records that contain the same number of columns,
 none of which are stored externally.
 @retval positive if rec1 (including non-ordering columns) is greater than rec2
@@ -183,58 +183,40 @@
 /*===============*/
 	const rec_t*		rec1,	/*!< in: physical record */
 	const rec_t*		rec2,	/*!< in: physical record */
-	const ulint*		offsets1,/*!< in: rec_get_offsets(rec1, ...) */
-	const ulint*		offsets2,/*!< in: rec_get_offsets(rec2, ...) */
+	const offset_t*		offsets1,/*!< in: rec_get_offsets(rec1, ...) */
+	const offset_t*		offsets2,/*!< in: rec_get_offsets(rec2, ...) */
 	const dict_index_t*	index,	/*!< in: data dictionary index */
 	struct TABLE*		table)	/*!< in: MySQL table, for reporting
 					duplicate key value if applicable,
 					or NULL */
 	MY_ATTRIBUTE((nonnull(1,2,3,4), warn_unused_result));
-/** Compare two B-tree records.
-@param[in] rec1 B-tree record
-@param[in] rec2 B-tree record
-@param[in] offsets1 rec_get_offsets(rec1, index)
-@param[in] offsets2 rec_get_offsets(rec2, index)
-@param[in] index B-tree index
-@param[in] nulls_unequal true if this is for index cardinality
-statistics estimation, and innodb_stats_method=nulls_unequal
-or innodb_stats_method=nulls_ignored
-@param[out] matched_fields number of completely matched fields
-within the first field not completely matched
-@return the comparison result
-@retval 0 if rec1 is equal to rec2
-@retval negative if rec1 is less than rec2
-@retval positive if rec2 is greater than rec2 */
-int
-cmp_rec_rec_with_match(
-	const rec_t*		rec1,
-	const rec_t*		rec2,
-	const ulint*		offsets1,
-	const ulint*		offsets2,
-	const dict_index_t*	index,
-	bool			nulls_unequal,
-	ulint*			matched_fields);
 
-/** Compare two B-tree records.
+/** Compare two B-tree or R-tree records.
 Only the common first fields are compared, and externally stored field
 are treated as equal.
-@param[in]	rec1		B-tree record
-@param[in]	rec2		B-tree record
+@param[in]	rec1		record (possibly not on an index page)
+@param[in]	rec2		B-tree or R-tree record in an index page
 @param[in]	offsets1	rec_get_offsets(rec1, index)
 @param[in]	offsets2	rec_get_offsets(rec2, index)
+@param[in]	nulls_unequal	true if this is for index cardinality
+				statistics estimation with
+				innodb_stats_method=nulls_unequal
+				or innodb_stats_method=nulls_ignored
 @param[out]	matched_fields	number of completely matched fields
 				within the first field not completely matched
-@return positive, 0, negative if rec1 is greater, equal, less, than rec2,
-respectively */
-UNIV_INLINE
+@retval 0 if rec1 is equal to rec2
+@retval negative if rec1 is less than rec2
+@retval positive if rec1 is greater than rec2 */
 int
 cmp_rec_rec(
 	const rec_t*		rec1,
 	const rec_t*		rec2,
-	const ulint*		offsets1,
-	const ulint*		offsets2,
+	const offset_t*		offsets1,
+	const offset_t*		offsets2,
 	const dict_index_t*	index,
-	ulint*			matched_fields = NULL);
+	bool			nulls_unequal = false,
+	ulint*			matched_fields = NULL)
+	MY_ATTRIBUTE((nonnull(1,2,3,4,5)));
 
 /** Compare two data fields.
 @param[in] dfield1 data field
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/rem0cmp.ic mariadb-10.3-10.3.22/storage/innobase/include/rem0cmp.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/rem0cmp.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/rem0cmp.ic	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2020, 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
@@ -52,40 +53,6 @@
 			     dfield_get_len(dfield2)));
 }
 
-/** Compare two B-tree records.
-Only the common first fields are compared, and externally stored field
-are treated as equal.
-@param[in]	rec1		B-tree record
-@param[in]	rec2		B-tree record
-@param[in]	offsets1	rec_get_offsets(rec1, index)
-@param[in]	offsets2	rec_get_offsets(rec2, index)
-@param[out]	matched_fields	number of completely matched fields
-				within the first field not completely matched
-@return positive, 0, negative if rec1 is greater, equal, less, than rec2,
-respectively */
-UNIV_INLINE
-int
-cmp_rec_rec(
-	const rec_t*		rec1,
-	const rec_t*		rec2,
-	const ulint*		offsets1,
-	const ulint*		offsets2,
-	const dict_index_t*	index,
-	ulint*			matched_fields)
-{
-	ulint	match_f;
-	int	ret;
-
-	ret = cmp_rec_rec_with_match(
-		rec1, rec2, offsets1, offsets2, index, false, &match_f);
-
-	if (matched_fields != NULL) {
-		*matched_fields = match_f;
-	}
-
-	return(ret);
-}
-
 /** Compare two data fields.
 @param[in] dfield1 data field
 @param[in] dfield2 data field
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/rem0rec.h mariadb-10.3-10.3.22/storage/innobase/include/rem0rec.h
--- mariadb-10.3-10.3.18/storage/innobase/include/rem0rec.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/rem0rec.h	2020-01-26 18:37:29.000000000 +0000
@@ -90,45 +90,86 @@
 /* Length of a B-tree node pointer, in bytes */
 #define REC_NODE_PTR_SIZE	4
 
+#ifndef UNIV_INNOCHECKSUM
 /** SQL null flag in a 1-byte offset of ROW_FORMAT=REDUNDANT records */
-#define REC_1BYTE_SQL_NULL_MASK	0x80UL
+static const offset_t REC_1BYTE_SQL_NULL_MASK= 0x80;
 /** SQL null flag in a 2-byte offset of ROW_FORMAT=REDUNDANT records */
-#define REC_2BYTE_SQL_NULL_MASK	0x8000UL
+static const offset_t REC_2BYTE_SQL_NULL_MASK= 0x8000;
 
 /** In a 2-byte offset of ROW_FORMAT=REDUNDANT records, the second most
 significant bit denotes that the tail of a field is stored off-page. */
-#define REC_2BYTE_EXTERN_MASK	0x4000UL
+static const offset_t REC_2BYTE_EXTERN_MASK= 0x4000;
+
+static const size_t RECORD_OFFSET= 2;
+static const size_t INDEX_OFFSET=
+    RECORD_OFFSET + sizeof(rec_t *) / sizeof(offset_t);
+#endif /* UNIV_INNOCHECKSUM */
 
-#ifdef UNIV_DEBUG
-/* Length of the rec_get_offsets() header */
-# define REC_OFFS_HEADER_SIZE	4
-#else /* UNIV_DEBUG */
 /* Length of the rec_get_offsets() header */
-# define REC_OFFS_HEADER_SIZE	2
+static const size_t REC_OFFS_HEADER_SIZE=
+#ifdef UNIV_DEBUG
+#ifndef UNIV_INNOCHECKSUM
+    sizeof(rec_t *) / sizeof(offset_t) +
+    sizeof(dict_index_t *) / sizeof(offset_t) +
+#endif /* UNIV_INNOCHECKSUM */
 #endif /* UNIV_DEBUG */
+    2;
 
 /* Number of elements that should be initially allocated for the
 offsets[] array, first passed to rec_get_offsets() */
-#define REC_OFFS_NORMAL_SIZE	OFFS_IN_REC_NORMAL_SIZE
-#define REC_OFFS_SMALL_SIZE	10
+static const size_t REC_OFFS_NORMAL_SIZE= 300;
+static const size_t REC_OFFS_SMALL_SIZE= 18;
+static const size_t REC_OFFS_SEC_INDEX_SIZE=
+    /* PK max key parts */ 16 + /* sec idx max key parts */ 16 +
+    /* child page number for non-leaf pages */ 1;
 
 /** Get the base address of offsets.  The extra_size is stored at
 this position, and following positions hold the end offsets of
 the fields. */
 #define rec_offs_base(offsets) (offsets + REC_OFFS_HEADER_SIZE)
 
+#ifndef UNIV_INNOCHECKSUM
+/* Offset consists of two parts: 2 upper bits is type and all other bits is
+value */
+
+/** Only 4 different values is possible! */
+enum field_type_t
+{
+  /** normal field */
+  STORED_IN_RECORD= 0 << 14,
+  /** this field is stored off-page */
+  STORED_OFFPAGE= 1 << 14,
+  /** just an SQL NULL */
+  SQL_NULL= 2 << 14,
+  /** instantly added field */
+  DEFAULT= 3 << 14,
+};
+
+/** without 2 upper bits */
+static const offset_t DATA_MASK= 0x3fff;
+/** 2 upper bits */
+static const offset_t TYPE_MASK= ~DATA_MASK;
+inline field_type_t get_type(offset_t n)
+{
+  return static_cast(n & TYPE_MASK);
+}
+inline void set_type(offset_t &n, field_type_t type)
+{
+  n= (n & DATA_MASK) | static_cast(type);
+}
+inline offset_t get_value(offset_t n) { return n & DATA_MASK; }
+inline offset_t combine(offset_t value, field_type_t type)
+{
+  return get_value(value) | static_cast(type);
+}
+
 /** Compact flag ORed to the extra size returned by rec_get_offsets() */
-const ulint REC_OFFS_COMPACT = ~(ulint(~0) >> 1);
-/** SQL NULL flag in offsets returned by rec_get_offsets() */
-const ulint REC_OFFS_SQL_NULL = REC_OFFS_COMPACT;
+const offset_t REC_OFFS_COMPACT= ~(offset_t(~0) >> 1);
 /** External flag in offsets returned by rec_get_offsets() */
-const ulint REC_OFFS_EXTERNAL = REC_OFFS_COMPACT >> 1;
+const offset_t REC_OFFS_EXTERNAL= REC_OFFS_COMPACT >> 1;
 /** Default value flag in offsets returned by rec_get_offsets() */
-const ulint REC_OFFS_DEFAULT = REC_OFFS_COMPACT >> 2;
-/** Mask for offsets returned by rec_get_offsets() */
-const ulint REC_OFFS_MASK = REC_OFFS_DEFAULT - 1;
-
-#ifndef UNIV_INNOCHECKSUM
+const offset_t REC_OFFS_DEFAULT= REC_OFFS_COMPACT >> 2;
+const offset_t REC_OFFS_MASK= REC_OFFS_DEFAULT - 1;
 /******************************************************//**
 The following function is used to get the pointer of the next chained record
 on the same page.
@@ -463,7 +504,7 @@
 value.
 @return offset of the start of the field, SQL null flag ORed */
 UNIV_INLINE
-ulint
+uint8_t
 rec_1_get_field_end_info(
 /*=====================*/
 	const rec_t*	rec,	/*!< in: record */
@@ -477,7 +518,7 @@
 @return offset of the start of the field, SQL null flag and extern
 storage flag ORed */
 UNIV_INLINE
-ulint
+uint16_t
 rec_2_get_field_end_info(
 /*=====================*/
 	const rec_t*	rec,	/*!< in: record */
@@ -518,11 +559,11 @@
 				(ULINT_UNDEFINED to compute all offsets)
 @param[in,out]	heap		memory heap
 @return the new offsets */
-ulint*
+offset_t*
 rec_get_offsets_func(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets,
+	offset_t*		offsets,
 	bool			leaf,
 	ulint			n_fields,
 #ifdef UNIV_DEBUG
@@ -557,7 +598,7 @@
 	const dict_index_t*	index,	/*!< in: record descriptor */
 	ulint			node_ptr,/*!< in: nonzero=node pointer,
 					0=leaf node */
-	ulint*			offsets)/*!< in/out: array consisting of
+	offset_t*		offsets)/*!< in/out: array consisting of
 					offsets[0] allocated elements */
 	MY_ATTRIBUTE((nonnull));
 #ifdef UNIV_DEBUG
@@ -570,7 +611,7 @@
 rec_offs_validate(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets)
+	const offset_t*		offsets)
 	MY_ATTRIBUTE((nonnull(3), warn_unused_result));
 /** Update debug data in offsets, in order to tame rec_offs_validate().
 @param[in]	rec	record
@@ -582,7 +623,7 @@
 	const rec_t*		rec,
 	const dict_index_t*	index,
 	bool			leaf,
-	ulint*			offsets)
+	offset_t*		offsets)
 	MY_ATTRIBUTE((nonnull));
 #else
 # define rec_offs_make_valid(rec, index, leaf, offsets)
@@ -619,17 +660,16 @@
 data field in a record.
 @return offset from the origin of rec */
 UNIV_INLINE
-ulint
+offset_t
 rec_get_nth_field_offs(
 /*===================*/
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n,	/*!< in: index of the field */
 	ulint*		len)	/*!< out: length of the field; UNIV_SQL_NULL
 				if SQL null */
 	MY_ATTRIBUTE((nonnull));
 #define rec_get_nth_field(rec, offsets, n, len) \
 ((rec) + rec_get_nth_field_offs(offsets, n, len))
-
 /******************************************************//**
 Determine if the offsets are for a record containing null BLOB pointers.
 @return first field containing a null BLOB pointer, or NULL if none found */
@@ -638,7 +678,7 @@
 rec_offs_any_null_extern(
 /*=====================*/
 	const rec_t*	rec,		/*!< in: record */
-	const ulint*	offsets)	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets)	/*!< in: rec_get_offsets(rec) */
 	MY_ATTRIBUTE((warn_unused_result));
 
 /** Mark the nth field as externally stored.
@@ -646,7 +686,7 @@
 @param[in]	n		nth field */
 void
 rec_offs_make_nth_extern(
-        ulint*		offsets,
+        offset_t*	offsets,
         const ulint     n);
 
 /** Determine the number of allocated elements for an array of offsets.
@@ -654,7 +694,7 @@
 @return number of elements */
 inline
 ulint
-rec_offs_get_n_alloc(const ulint* offsets)
+rec_offs_get_n_alloc(const offset_t* offsets)
 {
 	ulint	n_alloc;
 	ut_ad(offsets);
@@ -669,7 +709,7 @@
 @return number of fields */
 inline
 ulint
-rec_offs_n_fields(const ulint* offsets)
+rec_offs_n_fields(const offset_t* offsets)
 {
 	ulint	n_fields;
 	ut_ad(offsets);
@@ -685,19 +725,12 @@
 @param[in]	offsets	rec_get_offsets()
 @param[in]	n	nth field
 @param[in]	flag	flag to extract
-@return	the flag of the record field */
-inline
-ulint
-rec_offs_nth_flag(const ulint* offsets, ulint n, ulint flag)
+@return	type of the record field */
+inline field_type_t rec_offs_nth_type(const offset_t *offsets, ulint n)
 {
-	ut_ad(rec_offs_validate(NULL, NULL, offsets));
-	ut_ad(n < rec_offs_n_fields(offsets));
-	/* The DEFAULT, NULL, EXTERNAL flags are mutually exclusive. */
-	ut_ad(ut_is_2pow(rec_offs_base(offsets)[1 + n]
-			 & (REC_OFFS_DEFAULT
-			    | REC_OFFS_SQL_NULL
-			    | REC_OFFS_EXTERNAL)));
-	return rec_offs_base(offsets)[1 + n] & flag;
+  ut_ad(rec_offs_validate(NULL, NULL, offsets));
+  ut_ad(n < rec_offs_n_fields(offsets));
+  return get_type(rec_offs_base(offsets)[1 + n]);
 }
 
 /** Determine if a record field is missing
@@ -705,11 +738,9 @@
 @param[in]	offsets	rec_get_offsets()
 @param[in]	n	nth field
 @return	nonzero if default bit is set */
-inline
-ulint
-rec_offs_nth_default(const ulint* offsets, ulint n)
+inline ulint rec_offs_nth_default(const offset_t *offsets, ulint n)
 {
-	return rec_offs_nth_flag(offsets, n, REC_OFFS_DEFAULT);
+  return rec_offs_nth_type(offsets, n) == DEFAULT;
 }
 
 /** Determine if a record field is SQL NULL
@@ -717,11 +748,9 @@
 @param[in]	offsets	rec_get_offsets()
 @param[in]	n	nth field
 @return	nonzero if SQL NULL set */
-inline
-ulint
-rec_offs_nth_sql_null(const ulint* offsets, ulint n)
+inline ulint rec_offs_nth_sql_null(const offset_t *offsets, ulint n)
 {
-	return rec_offs_nth_flag(offsets, n, REC_OFFS_SQL_NULL);
+  return rec_offs_nth_type(offsets, n) == SQL_NULL;
 }
 
 /** Determine if a record field is stored off-page.
@@ -729,54 +758,46 @@
 @param[in]	n	nth field
 Returns nonzero if the extern bit is set in nth field of rec.
 @return nonzero if externally stored */
-inline
-ulint
-rec_offs_nth_extern(const ulint* offsets, ulint n)
+inline ulint rec_offs_nth_extern(const offset_t *offsets, ulint n)
 {
-	return rec_offs_nth_flag(offsets, n, REC_OFFS_EXTERNAL);
+  return rec_offs_nth_type(offsets, n) == STORED_OFFPAGE;
 }
 
 /** Get a global flag of a record.
 @param[in]	offsets	rec_get_offsets()
 @param[in]	flag	flag to extract
 @return	the flag of the record field */
-inline
-ulint
-rec_offs_any_flag(const ulint* offsets, ulint flag)
+inline ulint rec_offs_any_flag(const offset_t *offsets, ulint flag)
 {
-	ut_ad(rec_offs_validate(NULL, NULL, offsets));
-	return *rec_offs_base(offsets) & flag;
+  ut_ad(rec_offs_validate(NULL, NULL, offsets));
+  return *rec_offs_base(offsets) & flag;
 }
 
 /** Determine if the offsets are for a record containing off-page columns.
 @param[in]	offsets	rec_get_offsets()
 @return nonzero if any off-page columns exist */
-inline bool rec_offs_any_extern(const ulint* offsets)
+inline bool rec_offs_any_extern(const offset_t *offsets)
 {
-	return rec_offs_any_flag(offsets, REC_OFFS_EXTERNAL);
+  return rec_offs_any_flag(offsets, REC_OFFS_EXTERNAL);
 }
 
 /** Determine if the offsets are for a record that is missing fields.
 @param[in]	offsets	rec_get_offsets()
 @return nonzero if any fields need to be replaced with
 		dict_index_t::instant_field_value() */
-inline
-ulint
-rec_offs_any_default(const ulint* offsets)
+inline ulint rec_offs_any_default(const offset_t *offsets)
 {
-	return rec_offs_any_flag(offsets, REC_OFFS_DEFAULT);
+  return rec_offs_any_flag(offsets, REC_OFFS_DEFAULT);
 }
 
 /** Determine if the offsets are for other than ROW_FORMAT=REDUNDANT.
 @param[in]	offsets	rec_get_offsets()
 @return	nonzero	if ROW_FORMAT is COMPACT,DYNAMIC or COMPRESSED
 @retval	0	if ROW_FORMAT=REDUNDANT */
-inline
-ulint
-rec_offs_comp(const ulint* offsets)
+inline ulint rec_offs_comp(const offset_t *offsets)
 {
-	ut_ad(rec_offs_validate(NULL, NULL, offsets));
-	return(*rec_offs_base(offsets) & REC_OFFS_COMPACT);
+  ut_ad(rec_offs_validate(NULL, NULL, offsets));
+  return (*rec_offs_base(offsets) & REC_OFFS_COMPACT);
 }
 
 /** Determine if the record is the metadata pseudo-record
@@ -806,7 +827,7 @@
 rec_get_nth_cfield(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	ulint			n,
 	ulint*			len)
 {
@@ -824,7 +845,7 @@
 ulint
 rec_offs_nth_size(
 /*==============*/
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n)	/*!< in: nth field */
 	MY_ATTRIBUTE((warn_unused_result));
 
@@ -835,7 +856,7 @@
 ulint
 rec_offs_n_extern(
 /*==============*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 /***********************************************************//**
 This is used to modify the value of an already existing field in a record.
@@ -848,7 +869,7 @@
 rec_set_nth_field(
 /*==============*/
 	rec_t*		rec,	/*!< in: record */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n,	/*!< in: index number of the field */
 	const void*	data,	/*!< in: pointer to the data if not SQL null */
 	ulint		len)	/*!< in: length of the data or UNIV_SQL_NULL.
@@ -876,7 +897,7 @@
 void
 rec_offs_set_n_alloc(
 /*=================*/
-	ulint*	offsets,	/*!< out: array for rec_get_offsets(),
+	offset_t*offsets,	/*!< out: array for rec_get_offsets(),
 				must be allocated */
 	ulint	n_alloc)	/*!< in: number of elements */
 	MY_ATTRIBUTE((nonnull));
@@ -892,7 +913,7 @@
 ulint
 rec_offs_data_size(
 /*===============*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 /**********************************************************//**
 Returns the total size of record minus data size of record.
@@ -903,7 +924,7 @@
 ulint
 rec_offs_extra_size(
 /*================*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 /**********************************************************//**
 Returns the total size of a physical record.
@@ -912,7 +933,7 @@
 ulint
 rec_offs_size(
 /*==========*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 #ifdef UNIV_DEBUG
 /**********************************************************//**
@@ -923,7 +944,7 @@
 rec_get_start(
 /*==========*/
 	const rec_t*	rec,	/*!< in: pointer to record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 /**********************************************************//**
 Returns a pointer to the end of the record.
@@ -933,7 +954,7 @@
 rec_get_end(
 /*========*/
 	const rec_t*	rec,	/*!< in: pointer to record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((warn_unused_result));
 #else /* UNIV_DEBUG */
 # define rec_get_start(rec, offsets) ((rec) - rec_offs_extra_size(offsets))
@@ -950,7 +971,7 @@
 rec_copy(
 	void*		buf,
 	const rec_t*	rec,
-	const ulint*	offsets);
+	const offset_t*	offsets);
 
 /** Determine the size of a data tuple prefix in a temporary file.
 @param[in]	index		clustered or secondary index
@@ -979,11 +1000,11 @@
 rec_init_offsets_temp(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets,
+	offset_t*		offsets,
 	ulint			n_core,
 	const dict_col_t::def_t*def_val,
 	rec_comp_status_t	status = REC_STATUS_ORDINARY)
-	MY_ATTRIBUTE((nonnull));
+	MY_ATTRIBUTE((nonnull(1,2,3)));
 /** Determine the offset to each field in temporary file.
 @param[in]	rec	temporary file record
 @param[in]	index	index of that the record belongs to
@@ -993,7 +1014,7 @@
 rec_init_offsets_temp(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets)
+	offset_t*		offsets)
 	MY_ATTRIBUTE((nonnull));
 
 /** Convert a data tuple prefix to the temporary file format.
@@ -1115,7 +1136,7 @@
 rec_validate(
 /*=========*/
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Prints an old-style physical record. */
@@ -1132,7 +1153,7 @@
 /*==========*/
 	FILE*		file,	/*!< in: file where to print */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Prints a physical record. */
@@ -1141,7 +1162,7 @@
 /*==========*/
 	FILE*		file,	/*!< in: file where to print */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 	MY_ATTRIBUTE((nonnull));
 /***************************************************************//**
 Prints a physical record. */
@@ -1163,7 +1184,7 @@
 	std::ostream&	o,
 	const rec_t*	rec,
 	ulint		info,
-	const ulint*	offsets);
+	const offset_t*	offsets);
 
 /** Wrapper for pretty-printing a record */
 struct rec_index_print
@@ -1190,14 +1211,14 @@
 struct rec_offsets_print
 {
 	/** Constructor */
-	rec_offsets_print(const rec_t* rec, const ulint* offsets) :
+	rec_offsets_print(const rec_t* rec, const offset_t* offsets) :
 		m_rec(rec), m_offsets(offsets)
 	{}
 
 	/** Record */
 	const rec_t*		m_rec;
 	/** Offsets to each field */
-	const ulint*		m_offsets;
+	const offset_t*		m_offsets;
 };
 
 /** Display a record.
@@ -1214,7 +1235,7 @@
 	/** Construct a pretty-printed record.
 	@param rec	record with header
 	@param offsets	rec_get_offsets(rec, ...) */
-	rec_printer(const rec_t* rec, const ulint* offsets)
+	rec_printer(const rec_t* rec, const offset_t* offsets)
 		:
 		std::ostringstream ()
 	{
@@ -1227,7 +1248,7 @@
 	@param rec record, possibly lacking header
 	@param info rec_get_info_bits(rec)
 	@param offsets rec_get_offsets(rec, ...) */
-	rec_printer(const rec_t* rec, ulint info, const ulint* offsets)
+	rec_printer(const rec_t* rec, ulint info, const offset_t* offsets)
 		:
 		std::ostringstream ()
 	{
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/rem0rec.ic mariadb-10.3-10.3.22/storage/innobase/include/rem0rec.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/rem0rec.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/rem0rec.ic	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2020, 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
@@ -816,7 +816,7 @@
 value.
 @return offset of the start of the field, SQL null flag ORed */
 UNIV_INLINE
-ulint
+uint8_t
 rec_1_get_field_end_info(
 /*=====================*/
 	const rec_t*	rec,	/*!< in: record */
@@ -835,7 +835,7 @@
 @return offset of the start of the field, SQL null flag and extern
 storage flag ORed */
 UNIV_INLINE
-ulint
+uint16_t
 rec_2_get_field_end_info(
 /*=====================*/
 	const rec_t*	rec,	/*!< in: record */
@@ -868,13 +868,13 @@
 void
 rec_offs_set_n_alloc(
 /*=================*/
-	ulint*	offsets,	/*!< out: array for rec_get_offsets(),
+	offset_t*offsets,	/*!< out: array for rec_get_offsets(),
 				must be allocated */
 	ulint	n_alloc)	/*!< in: number of elements */
 {
 	ut_ad(n_alloc > REC_OFFS_HEADER_SIZE);
 	UNIV_MEM_ALLOC(offsets, n_alloc * sizeof *offsets);
-	offsets[0] = n_alloc;
+	offsets[0] = static_cast(n_alloc);
 }
 
 /************************************************************//**
@@ -882,36 +882,27 @@
 data field in a record.
 @return offset from the origin of rec */
 UNIV_INLINE
-ulint
+offset_t
 rec_get_nth_field_offs(
 /*===================*/
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n,	/*!< in: index of the field */
 	ulint*		len)	/*!< out: length of the field; UNIV_SQL_NULL
 				if SQL null; UNIV_SQL_DEFAULT is default value */
 {
-	ulint	offs;
-	ulint	length;
 	ut_ad(n < rec_offs_n_fields(offsets));
 
-	if (n == 0) {
-		offs = 0;
-	} else {
-		offs = rec_offs_base(offsets)[n] & REC_OFFS_MASK;
-	}
-
-	length = rec_offs_base(offsets)[1 + n];
+	offset_t offs = n == 0 ? 0 : get_value(rec_offs_base(offsets)[n]);
+	offset_t next_offs = rec_offs_base(offsets)[1 + n];
 
-	if (length & REC_OFFS_SQL_NULL) {
-		length = UNIV_SQL_NULL;
-	} else if (length & REC_OFFS_DEFAULT) {
-		length = UNIV_SQL_DEFAULT;
+	if (get_type(next_offs) == SQL_NULL) {
+		*len = UNIV_SQL_NULL;
+	} else if (get_type(next_offs) == DEFAULT) {
+		*len = UNIV_SQL_DEFAULT;
 	} else {
-		length &= REC_OFFS_MASK;
-		length -= offs;
+		*len = get_value(next_offs) - offs;
 	}
 
-	*len = length;
 	return(offs);
 }
 
@@ -923,7 +914,7 @@
 rec_offs_any_null_extern(
 /*=====================*/
 	const rec_t*	rec,		/*!< in: record */
-	const ulint*	offsets)	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets)	/*!< in: rec_get_offsets(rec) */
 {
 	ulint	i;
 	ut_ad(rec_offs_validate(rec, NULL, offsets));
@@ -958,16 +949,16 @@
 ulint
 rec_offs_nth_size(
 /*==============*/
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n)	/*!< in: nth field */
 {
 	ut_ad(rec_offs_validate(NULL, NULL, offsets));
 	ut_ad(n < rec_offs_n_fields(offsets));
 	if (!n) {
-		return(rec_offs_base(offsets)[1 + n] & REC_OFFS_MASK);
+		return get_value(rec_offs_base(offsets)[1 + n]);
 	}
-	return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n])
-	       & REC_OFFS_MASK);
+	return get_value((rec_offs_base(offsets)[1 + n]))
+	       - get_value(rec_offs_base(offsets)[n]);
 }
 
 /******************************************************//**
@@ -977,7 +968,7 @@
 ulint
 rec_offs_n_extern(
 /*==============*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint	n = 0;
 
@@ -1175,7 +1166,7 @@
 rec_set_nth_field(
 /*==============*/
 	rec_t*		rec,	/*!< in: record */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n,	/*!< in: index number of the field */
 	const void*	data,	/*!< in: pointer to the data
 				if not SQL null */
@@ -1231,16 +1222,16 @@
 void
 rec_offs_set_n_fields(
 /*==================*/
-	ulint*	offsets,	/*!< in/out: array returned by
+	offset_t*	offsets,	/*!< in/out: array returned by
 				rec_get_offsets() */
-	ulint	n_fields)	/*!< in: number of fields */
+	ulint		n_fields)	/*!< in: number of fields */
 {
 	ut_ad(offsets);
 	ut_ad(n_fields > 0);
 	ut_ad(n_fields <= REC_MAX_N_FIELDS);
 	ut_ad(n_fields + REC_OFFS_HEADER_SIZE
 	      <= rec_offs_get_n_alloc(offsets));
-	offsets[1] = n_fields;
+	offsets[1] = static_cast(n_fields);
 }
 
 /**********************************************************//**
@@ -1253,13 +1244,12 @@
 ulint
 rec_offs_data_size(
 /*===============*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint	size;
 
 	ut_ad(rec_offs_validate(NULL, NULL, offsets));
-	size = rec_offs_base(offsets)[rec_offs_n_fields(offsets)]
-		& REC_OFFS_MASK;
+	size = get_value(rec_offs_base(offsets)[rec_offs_n_fields(offsets)]);
 	ut_ad(size < srv_page_size);
 	return(size);
 }
@@ -1273,7 +1263,7 @@
 ulint
 rec_offs_extra_size(
 /*================*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint	size;
 	ut_ad(rec_offs_validate(NULL, NULL, offsets));
@@ -1289,7 +1279,7 @@
 ulint
 rec_offs_size(
 /*==========*/
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	return(rec_offs_data_size(offsets) + rec_offs_extra_size(offsets));
 }
@@ -1303,7 +1293,7 @@
 rec_get_end(
 /*========*/
 	const rec_t*	rec,	/*!< in: pointer to record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ut_ad(rec_offs_validate(rec, NULL, offsets));
 	return(const_cast(rec + rec_offs_data_size(offsets)));
@@ -1317,7 +1307,7 @@
 rec_get_start(
 /*==========*/
 	const rec_t*	rec,	/*!< in: pointer to record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ut_ad(rec_offs_validate(rec, NULL, offsets));
 	return(const_cast(rec - rec_offs_extra_size(offsets)));
@@ -1334,7 +1324,7 @@
 rec_copy(
 	void*		buf,
 	const rec_t*	rec,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	ulint	extra_len;
 	ulint	data_len;
@@ -1420,6 +1410,7 @@
 
 	data_size = dtuple_get_data_size(dtuple, 0);
 
+	ut_ad(n_ext == dtuple_get_n_ext(dtuple));
 	extra_size = rec_get_converted_extra_size(
 		data_size, dtuple_get_n_fields(dtuple), n_ext);
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/rem0types.h mariadb-10.3-10.3.22/storage/innobase/include/rem0types.h
--- mariadb-10.3-10.3.18/storage/innobase/include/rem0types.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/rem0types.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -29,6 +30,9 @@
 /* We define the physical record simply as an array of bytes */
 typedef byte	rec_t;
 
+/** This type represents a field offset in a rec_t* */
+typedef unsigned short int offset_t;
+
 /* Maximum values for various fields (for non-blob tuples) */
 #define REC_MAX_N_FIELDS	(1024 - 1)
 #define REC_MAX_HEAP_NO		(2 * 8192 - 1)
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0ftsort.h mariadb-10.3-10.3.22/storage/innobase/include/row0ftsort.h
--- mariadb-10.3-10.3.18/storage/innobase/include/row0ftsort.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0ftsort.h	2020-01-26 18:37:29.000000000 +0000
@@ -30,6 +30,7 @@
 #include "data0data.h"
 #include "fts0fts.h"
 #include "fts0priv.h"
+#include "rem0types.h"
 #include "row0merge.h"
 #include "btr0bulk.h"
 
@@ -250,7 +251,7 @@
 	int*		sel_tree,	/*n_uniq */
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
-	que_thr_t*	thr,	/*!< in: query thread or NULL */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	que_thr_t*	thr)	/*!< in: query thread or NULL */
 	MY_ATTRIBUTE((warn_unused_result));
 
 /***************************************************************//**
@@ -120,10 +117,7 @@
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	trx_id_t	trx_id,	/*!< in: PAGE_MAX_TRX_ID during
 				row_log_table_apply(), or 0 */
-	que_thr_t*	thr,	/*!< in: query thread */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	que_thr_t*	thr)	/*!< in: query thread */
 	MY_ATTRIBUTE((warn_unused_result));
 
 /***************************************************************//**
@@ -138,10 +132,7 @@
 	dict_index_t*	index,	/*!< in: clustered index */
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	que_thr_t*	thr,	/*!< in: query thread */
-	ulint		n_ext,	/*!< in: number of externally stored columns */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	ulint		n_ext)	/*!< in: number of externally stored columns */
 	MY_ATTRIBUTE((warn_unused_result));
 /***************************************************************//**
 Inserts an entry into a secondary index. Tries first optimistic,
@@ -155,9 +146,8 @@
 	dict_index_t*	index,	/*!< in: secondary index */
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	que_thr_t*	thr,	/*!< in: query thread */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	bool		check_foreign = true) /*!< in: true if check
+				foreign table is needed, false otherwise */
 	MY_ATTRIBUTE((warn_unused_result));
 /***********************************************************//**
 Inserts a row to a table. This is a high-level function used in
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0log.h mariadb-10.3-10.3.22/storage/innobase/include/row0log.h
--- mariadb-10.3-10.3.18/storage/innobase/include/row0log.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0log.h	2020-01-26 18:37:29.000000000 +0000
@@ -136,7 +136,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index) */
 	const byte*	sys)	/*!< in: DB_TRX_ID,DB_ROLL_PTR that should
 				be logged, or NULL to use those in rec */
 	ATTRIBUTE_COLD __attribute__((nonnull(1,2,3)));
@@ -151,7 +151,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index) */
 	const dtuple_t*	old_pk);/*!< in: row_log_table_get_pk()
 				before the update */
 
@@ -167,7 +167,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index),
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index),
 				or NULL */
 	byte*		sys,	/*!< out: DB_TRX_ID,DB_ROLL_PTR for
 				row_log_table_delete(), or NULL */
@@ -184,7 +184,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets);/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets);/*!< in: rec_get_offsets(rec,index) */
 /******************************************************//**
 Notes that a BLOB is being freed during online ALTER TABLE. */
 void
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0merge.h mariadb-10.3-10.3.22/storage/innobase/include/row0merge.h
--- mariadb-10.3-10.3.18/storage/innobase/include/row0merge.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0merge.h	2020-01-26 18:37:29.000000000 +0000
@@ -489,7 +489,7 @@
 	const mrec_t**		mrec,	/*!< out: pointer to merge record,
 					or NULL on end of list
 					(non-NULL on I/O error) */
-	ulint*			offsets,/*!< out: offsets of mrec */
+	offset_t*		offsets,/*!< out: offsets of mrec */
 	row_merge_block_t*	crypt_block, /*!< in: crypt buf or NULL */
 	ulint			space)	   /*!< in: space id */
 	MY_ATTRIBUTE((warn_unused_result));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0row.h mariadb-10.3-10.3.22/storage/innobase/include/row0row.h
--- mariadb-10.3-10.3.18/storage/innobase/include/row0row.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0row.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2016, 2017, MariaDB Corporation.
+Copyright (c) 2016, 2020, 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
@@ -44,7 +44,7 @@
 row_get_trx_id_offset(
 /*==================*/
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: record offsets */
+	const offset_t*		offsets)/*!< in: record offsets */
 	MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Reads the trx id field from a clustered index record.
@@ -55,7 +55,7 @@
 /*===============*/
 	const rec_t*		rec,	/*!< in: record */
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 	MY_ATTRIBUTE((nonnull, warn_unused_result));
 /*********************************************************************//**
 Reads the roll pointer field from a clustered index record.
@@ -66,7 +66,7 @@
 /*=================*/
 	const rec_t*		rec,	/*!< in: record */
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 	MY_ATTRIBUTE((nonnull, warn_unused_result));
 
 /* Flags for row build type. */
@@ -138,7 +138,7 @@
 					this record must be at least
 					s-latched and the latch held
 					as long as the row dtuple is used! */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec,index)
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec,index)
 					or NULL, in which case this function
 					will invoke rec_get_offsets() */
 	const dict_table_t*	col_table,
@@ -189,7 +189,7 @@
 	ulint			type,
 	const dict_index_t*	index,
 	const rec_t*		rec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	const dict_table_t*	col_table,
 	const dtuple_t*		defaults,
 	const dict_add_v_col_t*	add_v,
@@ -206,9 +206,7 @@
 /*=======================*/
 	const rec_t*		rec,	/*!< in: record in the index */
 	const dict_index_t*	index,	/*!< in: index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
-	ulint*			n_ext,	/*!< out: number of externally
-					stored columns */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	mem_heap_t*		heap)	/*!< in: memory heap from which
 					the memory needed is allocated */
 	MY_ATTRIBUTE((warn_unused_result));
@@ -221,9 +219,7 @@
 /*===================*/
 	const rec_t*		rec,	/*!< in: record in the index */
 	const dict_index_t*	index,	/*!< in: index */
-	const ulint*		offsets,/*!< in/out: rec_get_offsets(rec) */
-	ulint*			n_ext,	/*!< out: number of externally
-					stored columns */
+	const offset_t*		offsets,/*!< in/out: rec_get_offsets(rec) */
 	mem_heap_t*		heap)	/*!< in: memory heap from which
 					the memory needed is allocated */
 	MY_ATTRIBUTE((warn_unused_result));
@@ -266,7 +262,7 @@
 					held as long as the row
 					reference is used! */
 	const dict_index_t*	index,	/*!< in: secondary index */
-	ulint*			offsets)/*!< in: rec_get_offsets(rec, index)
+	offset_t*		offsets)/*!< in: rec_get_offsets(rec, index)
 					or NULL */
 	MY_ATTRIBUTE((nonnull(1,2,3)));
 /*******************************************************************//**
@@ -284,7 +280,7 @@
 	const rec_t*	rec,	/*!< in: secondary index record;
 				must be preserved while ref is used, as we do
 				not copy field values to heap */
-	const ulint*	offsets);/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets);/*!< in: array returned by rec_get_offsets() */
 /***************************************************************//**
 Searches the clustered index record for a row, if we have the row
 reference.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0row.ic mariadb-10.3-10.3.22/storage/innobase/include/row0row.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/row0row.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0row.ic	2020-01-26 18:37:29.000000000 +0000
@@ -37,7 +37,7 @@
 row_get_trx_id_offset(
 /*==================*/
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: record offsets */
+	const offset_t*		offsets)/*!< in: record offsets */
 {
 	ulint	pos;
 	ulint	offset;
@@ -64,7 +64,7 @@
 /*===============*/
 	const rec_t*		rec,	/*!< in: record */
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 {
 	ulint	offset;
 
@@ -89,7 +89,7 @@
 /*=================*/
 	const rec_t*		rec,	/*!< in: record */
 	const dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 {
 	ulint	offset;
 
@@ -148,7 +148,7 @@
 	const rec_t*	rec,	/*!< in: secondary index record;
 				must be preserved while ref is used, as we do
 				not copy field values to heap */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	dfield_t*	dfield;
 	const byte*	field;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0upd.h mariadb-10.3-10.3.22/storage/innobase/include/row0upd.h
--- mariadb-10.3-10.3.18/storage/innobase/include/row0upd.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0upd.h	2020-01-26 18:37:29.000000000 +0000
@@ -28,6 +28,7 @@
 #define row0upd_h
 
 #include "data0data.h"
+#include "rem0types.h"
 #include "row0types.h"
 #include "btr0types.h"
 #include "trx0types.h"
@@ -123,7 +124,7 @@
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page whose
 				uncompressed part will be updated, or NULL */
 	dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const trx_t*	trx,	/*!< in: transaction */
 	roll_ptr_t	roll_ptr);/*!< in: DB_ROLL_PTR to the undo log */
 /*********************************************************************//**
@@ -165,7 +166,7 @@
 row_upd_changes_field_size_or_external(
 /*===================================*/
 	dict_index_t*	index,	/*!< in: index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const upd_t*	update);/*!< in: update vector */
 /***********************************************************//**
 Returns true if row update contains disowned external fields.
@@ -186,7 +187,7 @@
 /*=================*/
 	rec_t*		rec,	/*!< in/out: record where replaced */
 	dict_index_t*	index,	/*!< in: the index the record belongs to */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	const upd_t*	update,	/*!< in: update vector */
 	page_zip_des_t*	page_zip);/*!< in: compressed page with enough space
 				available, or NULL */
@@ -201,7 +202,7 @@
 /*====================================*/
 	const rec_t*	rec,	/*!< in: secondary index record */
 	dict_index_t*	index,	/*!< in: index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const dtuple_t*	entry,	/*!< in: entry to insert */
 	mem_heap_t*	heap)	/*!< in: memory heap from which allocated */
 	MY_ATTRIBUTE((warn_unused_result, nonnull));
@@ -227,7 +228,7 @@
 	dict_index_t*	index,
 	const dtuple_t*	entry,
 	const rec_t*	rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	bool		no_sys,
 	trx_t*		trx,
 	mem_heap_t*	heap,
@@ -399,7 +400,7 @@
 /*===============================*/
 	rec_t*		rec,	/*!< in/out: record */
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page, or NULL */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		pos,	/*!< in: TRX_ID position in rec */
 	trx_id_t	trx_id,	/*!< in: transaction id */
 	roll_ptr_t	roll_ptr);/*!< in: roll ptr of the undo log record */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0upd.ic mariadb-10.3-10.3.22/storage/innobase/include/row0upd.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/row0upd.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0upd.ic	2020-01-26 18:37:29.000000000 +0000
@@ -163,7 +163,7 @@
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page whose
 				uncompressed part will be updated, or NULL */
 	dict_index_t*	index,	/*!< in: clustered index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const trx_t*	trx,	/*!< in: transaction */
 	roll_ptr_t	roll_ptr)/*!< in: DB_ROLL_PTR to the undo log */
 {
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/row0vers.h mariadb-10.3-10.3.22/storage/innobase/include/row0vers.h
--- mariadb-10.3-10.3.18/storage/innobase/include/row0vers.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/row0vers.h	2020-01-26 18:37:29.000000000 +0000
@@ -52,7 +52,7 @@
 	trx_t*		caller_trx,
 	const rec_t*	rec,
 	dict_index_t*	index,
-	const ulint*	offsets);
+	const offset_t*	offsets);
 
 /** Finds out if a version of the record, where the version >= the current
 purge view, should have ientry as its secondary index entry. We check
@@ -98,7 +98,7 @@
 	mtr_t*		mtr,	/*!< in: mtr holding the latch on rec; it will
 				also hold the latch on purge_view */
 	dict_index_t*	index,	/*!< in: the clustered index */
-	ulint**		offsets,/*!< in/out: offsets returned by
+	offset_t**	offsets,/*!< in/out: offsets returned by
 				rec_get_offsets(rec, index) */
 	ReadView*	view,	/*!< in: the consistent read view */
 	mem_heap_t**	offset_heap,/*!< in/out: memory heap from which
@@ -126,7 +126,7 @@
 				of this records */
 	mtr_t*		mtr,	/*!< in: mtr holding the latch on rec */
 	dict_index_t*	index,	/*!< in: the clustered index */
-	ulint**		offsets,/*!< in/out: offsets returned by
+	offset_t**	offsets,/*!< in/out: offsets returned by
 				rec_get_offsets(rec, index) */
 	mem_heap_t**	offset_heap,/*!< in/out: memory heap from which
 				the offsets are allocated */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/srv0srv.h mariadb-10.3-10.3.22/storage/innobase/include/srv0srv.h
--- mariadb-10.3-10.3.18/storage/innobase/include/srv0srv.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/srv0srv.h	2020-01-26 18:37:29.000000000 +0000
@@ -592,6 +592,8 @@
 /** Buffer pool dump status frequence in percentages */
 extern ulong srv_buf_dump_status_frequency;
 
+#define srv_max_purge_threads 32
+
 # ifdef UNIV_PFS_THREAD
 /* Keys to register InnoDB threads with performance schema */
 extern mysql_pfs_key_t	buf_dump_thread_key;
@@ -633,11 +635,11 @@
 
 #ifdef HAVE_PSI_STAGE_INTERFACE
 /** Performance schema stage event for monitoring ALTER TABLE progress
-everything after flush log_make_checkpoint_at(). */
+everything after flush log_make_checkpoint(). */
 extern PSI_stage_info	srv_stage_alter_table_end;
 
 /** Performance schema stage event for monitoring ALTER TABLE progress
-log_make_checkpoint_at(). */
+log_make_checkpoint(). */
 extern PSI_stage_info	srv_stage_alter_table_flush;
 
 /** Performance schema stage event for monitoring ALTER TABLE progress
@@ -1105,8 +1107,23 @@
 						to do */
 	que_thr_t*	thr;			/*!< suspended query thread
 						(only used for user threads) */
+#ifdef UNIV_DEBUG
+	struct debug_sync_t {
+		UT_LIST_NODE_T(debug_sync_t) debug_sync_list;
+	};
+	UT_LIST_BASE_NODE_T(debug_sync_t) debug_sync;
+	rw_lock_t debug_sync_lock;
+#endif
 };
 
+#ifdef UNIV_DEBUG
+typedef void srv_slot_callback_t(srv_slot_t*, const void*);
+
+void srv_for_each_thread(srv_thread_type type,
+			 srv_slot_callback_t callback,
+			 const void *arg);
+#endif
+
 #ifdef WITH_WSREP
 UNIV_INTERN
 void
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/trx0purge.h mariadb-10.3-10.3.22/storage/innobase/include/trx0purge.h
--- mariadb-10.3-10.3.18/storage/innobase/include/trx0purge.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/trx0purge.h	2020-01-26 18:37:29.000000000 +0000
@@ -61,7 +61,12 @@
 /*======*/
 	ulint	n_purge_threads,	/*!< in: number of purge tasks to
 					submit to task queue. */
-	bool	truncate);		/*!< in: truncate history if true */
+	bool	truncate		/*!< in: truncate history if true */
+#ifdef UNIV_DEBUG
+	, srv_slot_t *slot		/*!< in/out: purge coordinator
+					thread slot */
+#endif
+);
 
 /** Rollback segements from a given transaction with trx-no
 scheduled for purge. */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/trx0rec.h mariadb-10.3-10.3.22/storage/innobase/include/trx0rec.h
--- mariadb-10.3-10.3.18/storage/innobase/include/trx0rec.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/trx0rec.h	2020-01-26 18:37:29.000000000 +0000
@@ -191,7 +191,7 @@
 	const rec_t*	rec,		/*!< in: case of an update or delete
 					marking, the record in the clustered
 					index; NULL if insert */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec) */
 	roll_ptr_t*	roll_ptr)	/*!< out: DB_ROLL_PTR to the
 					undo log record */
 	MY_ATTRIBUTE((nonnull(1,2,8), warn_unused_result));
@@ -224,7 +224,7 @@
 				index_rec page and purge_view */
 	const rec_t*	rec,	/*!< in: version of a clustered index record */
 	dict_index_t*	index,	/*!< in: clustered index */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mem_heap_t*	heap,	/*!< in: memory heap from which the memory
 				needed is allocated */
 	rec_t**		old_vers,/*!< out, own: previous version, or NULL if
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/trx0trx.h mariadb-10.3-10.3.22/storage/innobase/include/trx0trx.h
--- mariadb-10.3-10.3.18/storage/innobase/include/trx0trx.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/trx0trx.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, 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
@@ -342,13 +342,6 @@
 trx_is_interrupted(
 /*===============*/
 	const trx_t*	trx);	/*!< in: transaction */
-/**********************************************************************//**
-Determines if the currently running transaction is in strict mode.
-@return TRUE if strict */
-ibool
-trx_is_strict(
-/*==========*/
-	trx_t*	trx);	/*!< in: transaction */
 
 /*******************************************************************//**
 Calculates the "weight" of a transaction. The weight of one transaction
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/univ.i mariadb-10.3-10.3.22/storage/innobase/include/univ.i
--- mariadb-10.3-10.3.18/storage/innobase/include/univ.i	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/univ.i	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
 Copyright (c) 2008, Google Inc.
 
 Portions of this file contain modifications contributed and copyrighted by
@@ -92,7 +92,6 @@
 #include 
 
 #ifndef _WIN32
-# include  /* mmap() for os0proc.cc */
 # include 
 # include "my_config.h"
 #endif
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/ut0mem.h mariadb-10.3-10.3.22/storage/innobase/include/ut0mem.h
--- mariadb-10.3-10.3.18/storage/innobase/include/ut0mem.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/ut0mem.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -83,29 +84,6 @@
 int
 ut_strcmp(const char* str1, const char* str2);
 
-/**********************************************************************//**
-Copies up to size - 1 characters from the NUL-terminated string src to
-dst, NUL-terminating the result. Returns strlen(src), so truncation
-occurred if the return value >= size.
-@return strlen(src) */
-ulint
-ut_strlcpy(
-/*=======*/
-	char*		dst,	/*!< in: destination buffer */
-	const char*	src,	/*!< in: source buffer */
-	ulint		size);	/*!< in: size of destination buffer */
-
-/**********************************************************************//**
-Like ut_strlcpy, but if src doesn't fit in dst completely, copies the last
-(size - 1) bytes of src, not the first.
-@return strlen(src) */
-ulint
-ut_strlcpy_rev(
-/*===========*/
-	char*		dst,	/*!< in: destination buffer */
-	const char*	src,	/*!< in: source buffer */
-	ulint		size);	/*!< in: size of destination buffer */
-
 /********************************************************************
 Concatenate 3 strings.*/
 char*
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/ut0new.h mariadb-10.3-10.3.22/storage/innobase/include/ut0new.h
--- mariadb-10.3-10.3.18/storage/innobase/include/ut0new.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/ut0new.h	2020-01-26 18:37:29.000000000 +0000
@@ -129,9 +129,6 @@
 #include  /* strlen(), strrchr(), strncmp() */
 
 #include "my_global.h" /* needed for headers from mysql/psi/ */
-#if !defined(DBUG_OFF) && defined(HAVE_MADVISE)
-#include 
-#endif
 
 /* JAN: TODO: missing 5.7 header */
 #ifdef HAVE_MYSQL_MEMORY_H
@@ -252,7 +249,7 @@
 
 #if defined(DBUG_OFF) && defined(HAVE_MADVISE) && defined(MADV_DONTDUMP)
 	if (dontdump && madvise(ptr, bytes, MADV_DONTDUMP)) {
-		ib::warn() << "Failed to set memory to DONTDUMP: "
+		ib::warn() << "Failed to set memory to " DONTDUMP_STR ": "
 			   << strerror(errno)
 			   << " ptr " << ptr
 			   << " size " << bytes;
@@ -270,7 +267,7 @@
 static inline void ut_dodump(void* ptr, size_t m_size)
 {
 	if (ptr && madvise(ptr, m_size, MADV_DODUMP)) {
-		ib::warn() << "Failed to set memory to DODUMP: "
+		ib::warn() << "Failed to set memory to " DODUMP_STR ": "
 			   << strerror(errno)
 			   << " ptr " << ptr
 			   << " size " << m_size;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/ut0rnd.h mariadb-10.3-10.3.22/storage/innobase/include/ut0rnd.h
--- mariadb-10.3-10.3.18/storage/innobase/include/ut0rnd.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/ut0rnd.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -27,37 +28,49 @@
 #define ut0rnd_h
 
 #include "ut0byte.h"
+#include 
 
 #ifndef UNIV_INNOCHECKSUM
-/** The 'character code' for end of field or string (used
-in folding records */
-#define UT_END_OF_FIELD		257
-
-/********************************************************//**
-This is used to set the random number seed. */
-UNIV_INLINE
-void
-ut_rnd_set_seed(
-/*============*/
-	ulint	 seed);		 /*!< in: seed */
-/********************************************************//**
-The following function generates a series of 'random' ulint integers.
-@return the next 'random' number */
-UNIV_INLINE
-ulint
-ut_rnd_gen_next_ulint(
-/*==================*/
-	ulint	rnd);	/*!< in: the previous random number value */
-/*********************************************************//**
-The following function generates 'random' ulint integers which
-enumerate the value space (let there be N of them) of ulint integers
-in a pseudo-random fashion. Note that the same integer is repeated
-always after N calls to the generator.
-@return the 'random' number */
-UNIV_INLINE
-ulint
-ut_rnd_gen_ulint(void);
-/*==================*/
+/** Seed value of ut_rnd_gen() */
+extern int32 ut_rnd_current;
+
+/** @return a pseudo-random 32-bit number */
+inline uint32_t ut_rnd_gen()
+{
+  /* This is a Galois linear-feedback shift register.
+  https://en.wikipedia.org/wiki/Linear-feedback_shift_register#Galois_LFSRs
+  The generating primitive Galois Field polynomial is the Castagnoli
+  polynomial that was made popular by CRC-32C:
+  x^32+x^28+x^27+x^26+x^25+x^23+x^22+x^20+
+  x^19+x^18+x^14+x^13+x^11+x^10+x^9+x^8+x^6+1 */
+  const uint32_t crc32c= 0x1edc6f41;
+
+  uint32_t rnd= my_atomic_load32_explicit(&ut_rnd_current,
+                                          MY_MEMORY_ORDER_RELAXED);
+
+  if (UNIV_UNLIKELY(rnd == 0))
+  {
+    rnd= static_cast(my_interval_timer());
+    if (!rnd) rnd= 1;
+  }
+  else
+  {
+    bool lsb= rnd & 1;
+    rnd>>= 1;
+    if (lsb)
+      rnd^= crc32c;
+  }
+
+  my_atomic_store32_explicit(&ut_rnd_current, rnd, MY_MEMORY_ORDER_RELAXED);
+  return rnd;
+}
+
+/** @return a random number between 0 and n-1, inclusive */
+inline ulint ut_rnd_interval(ulint n)
+{
+  return n > 1 ? static_cast(ut_rnd_gen() % n) : 0;
+}
+
 /*******************************************************//**
 The following function generates a hash value for a ulint integer
 to a hash table of size table_size, which should be a prime or some
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/ut0rnd.ic mariadb-10.3-10.3.22/storage/innobase/include/ut0rnd.ic
--- mariadb-10.3-10.3.18/storage/innobase/include/ut0rnd.ic	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/ut0rnd.ic	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -29,74 +29,6 @@
 
 #ifndef UNIV_INNOCHECKSUM
 
-#define UT_RND1			151117737
-#define UT_RND2			119785373
-#define UT_RND3			 85689495
-#define UT_RND4			 76595339
-#define UT_SUM_RND2		 98781234
-#define UT_SUM_RND3		126792457
-#define UT_SUM_RND4		 63498502
-#define UT_XOR_RND1		187678878
-#define UT_XOR_RND2		143537923
-
-/** Seed value of ut_rnd_gen_ulint() */
-extern	ulint	 ut_rnd_ulint_counter;
-
-/********************************************************//**
-This is used to set the random number seed. */
-UNIV_INLINE
-void
-ut_rnd_set_seed(
-/*============*/
-	ulint	 seed)		 /*!< in: seed */
-{
-	ut_rnd_ulint_counter = seed;
-}
-
-/********************************************************//**
-The following function generates a series of 'random' ulint integers.
-@return the next 'random' number */
-UNIV_INLINE
-ulint
-ut_rnd_gen_next_ulint(
-/*==================*/
-	ulint	rnd)	/*!< in: the previous random number value */
-{
-	ulint	n_bits;
-
-	n_bits = 8 * sizeof(ulint);
-
-	rnd = UT_RND2 * rnd + UT_SUM_RND3;
-	rnd = UT_XOR_RND1 ^ rnd;
-	rnd = (rnd << 20) + (rnd >> (n_bits - 20));
-	rnd = UT_RND3 * rnd + UT_SUM_RND4;
-	rnd = UT_XOR_RND2 ^ rnd;
-	rnd = (rnd << 20) + (rnd >> (n_bits - 20));
-	rnd = UT_RND1 * rnd + UT_SUM_RND2;
-
-	return(rnd);
-}
-
-/********************************************************//**
-The following function generates 'random' ulint integers which
-enumerate the value space of ulint integers in a pseudo random
-fashion. Note that the same integer is repeated always after
-2 to power 32 calls to the generator (if ulint is 32-bit).
-@return the 'random' number */
-UNIV_INLINE
-ulint
-ut_rnd_gen_ulint(void)
-/*==================*/
-{
-	ulint	rnd;
-
-	ut_rnd_ulint_counter = UT_RND1 * ut_rnd_ulint_counter + UT_RND2;
-
-	rnd = ut_rnd_gen_next_ulint(ut_rnd_ulint_counter);
-
-	return(rnd);
-}
-
 /*******************************************************//**
 The following function generates a hash value for a ulint integer
 to a hash table of size table_size, which should be a prime
diff -Nru mariadb-10.3-10.3.18/storage/innobase/include/ut0wqueue.h mariadb-10.3-10.3.22/storage/innobase/include/ut0wqueue.h
--- mariadb-10.3-10.3.18/storage/innobase/include/ut0wqueue.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/include/ut0wqueue.h	2020-01-26 18:37:29.000000000 +0000
@@ -38,7 +38,18 @@
 
 // Forward declaration
 struct ib_list_t;
-struct ib_wqueue_t;
+
+/** Work queue */
+struct ib_wqueue_t
+{
+	/** Mutex protecting everything */
+	ib_mutex_t	mutex;
+	/** Work item list */
+	ib_list_t*	items;
+	/** event we use to signal additions to list;
+	os_event_set() and os_event_reset() are protected by the mutex */
+	os_event_t	event;
+};
 
 /****************************************************************//**
 Create a new work queue.
@@ -54,15 +65,14 @@
 /*===========*/
 	ib_wqueue_t*	wq);		/*!< in: work queue */
 
-/****************************************************************//**
-Add a work item to the queue. */
+/** Add a work item to the queue.
+@param[in,out]	wq		work queue
+@param[in]	item		work item
+@param[in,out]	heap		memory heap to use for allocating list node
+@param[in]	wq_locked	work queue mutex locked */
 void
-ib_wqueue_add(
-/*==========*/
-	ib_wqueue_t*	wq,		/*!< in: work queue */
-	void*		item,		/*!< in: work item */
-	mem_heap_t*	heap);		/*!< in: memory heap to use for
-					allocating the list node */
+ib_wqueue_add(ib_wqueue_t* wq, void* item, mem_heap_t* heap,
+	      bool wq_locked = false);
 
 /** Check if queue is empty.
 @param wq wait queue
@@ -101,5 +111,4 @@
 /*==========*/
 	ib_wqueue_t*	wq);		/*trx : NULL)
+  {}
 
   void operator()(const trx_t* trx) const
   {
     ut_ad(mutex_own(&trx_sys.mutex));
-    if (trx == purge_sys.query->trx)
+    if (UNIV_UNLIKELY(trx == purge_trx))
       return;
     lock_trx_print_wait_and_mvcc_state(file, trx, now);
 
@@ -4699,6 +4702,7 @@
 
   FILE* const file;
   const time_t now;
+  const trx_t* const purge_trx;
 };
 
 /*********************************************************************//**
@@ -4815,7 +4819,7 @@
 	const buf_block_t*	block,	/*!< in: buffer block containing rec */
 	const rec_t*		rec,	/*!< in: record to look at */
 	const dict_index_t*	index,	/*!< in: index, or NULL if not known */
-	const ulint*		offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets)/*!< in: rec_get_offsets(rec, index) */
 {
 	const lock_t*	lock;
 	ulint		heap_no;
@@ -4982,8 +4986,8 @@
 	ulint		nth_bit		= 0;
 	ulint		i;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(!lock_mutex_own());
@@ -5352,8 +5356,8 @@
 #ifdef UNIV_DEBUG
 	{
 		mem_heap_t*	heap		= NULL;
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-		const ulint*	offsets;
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+		const offset_t*	offsets;
 		rec_offs_init(offsets_);
 
 		offsets = rec_get_offsets(next_rec, index, offsets_, true,
@@ -5512,7 +5516,7 @@
 	const buf_block_t*	block,
 	const rec_t*		rec,
 	dict_index_t*		index,
-	const ulint*		offsets)
+	const offset_t*		offsets)
 {
 	trx_t*		trx;
 
@@ -5583,7 +5587,7 @@
 	const rec_t*		rec,	/*!< in: record which should be
 					modified */
 	dict_index_t*		index,	/*!< in: clustered index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	que_thr_t*		thr)	/*!< in: query thread */
 {
 	dberr_t	err;
@@ -5675,8 +5679,8 @@
 #ifdef UNIV_DEBUG
 	{
 		mem_heap_t*	heap		= NULL;
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-		const ulint*	offsets;
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+		const offset_t*	offsets;
 		rec_offs_init(offsets_);
 
 		offsets = rec_get_offsets(rec, index, offsets_, true,
@@ -5720,7 +5724,7 @@
 					be read or passed over by a
 					read cursor */
 	dict_index_t*		index,	/*!< in: secondary index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	lock_mode		mode,	/*!< in: mode of the lock which
 					the read cursor should set on
 					records: LOCK_S or LOCK_X; the
@@ -5790,7 +5794,7 @@
 					be read or passed over by a
 					read cursor */
 	dict_index_t*		index,	/*!< in: clustered index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	lock_mode		mode,	/*!< in: mode of the lock which
 					the read cursor should set on
 					records: LOCK_S or LOCK_X; the
@@ -5868,8 +5872,8 @@
 	que_thr_t*		thr)	/*!< in: query thread */
 {
 	mem_heap_t*	tmp_heap	= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	dberr_t		err;
 	rec_offs_init(offsets_);
 
@@ -6182,6 +6186,8 @@
 		}
 
 		lock_table_dequeue(lock);
+		/* Remove the lock from table lock vector too. */
+		lock_trx_table_locks_remove(lock);
 	}
 
 	/* Reset the wait flag and the back pointer to lock in trx. */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/log/log0log.cc mariadb-10.3-10.3.22/storage/innobase/log/log0log.cc
--- mariadb-10.3-10.3.18/storage/innobase/log/log0log.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/log/log0log.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1344,7 +1344,7 @@
 /** Make a checkpoint. Note that this function does not flush dirty
 blocks from the buffer pool: it only checks what is lsn of the oldest
 modification in the pool, and writes information about the lsn in
-log files. Use log_make_checkpoint_at() to flush also the pool.
+log files. Use log_make_checkpoint() to flush also the pool.
 @param[in]	sync		whether to wait for the write to complete
 @return true if success, false if a checkpoint write was already running */
 bool log_checkpoint(bool sync)
@@ -1460,14 +1460,12 @@
 	return(true);
 }
 
-/** Make a checkpoint at or after a specified LSN.
-@param[in]	lsn		the log sequence number, or LSN_MAX
-for the latest LSN */
-void log_make_checkpoint_at(lsn_t lsn)
+/** Make a checkpoint */
+void log_make_checkpoint()
 {
 	/* Preflush pages synchronously */
 
-	while (!log_preflush_pool_modified_pages(lsn)) {
+	while (!log_preflush_pool_modified_pages(LSN_MAX)) {
 		/* Flush as much as we can */
 	}
 
@@ -1800,7 +1798,7 @@
 	if (!srv_read_only_mode) {
 		service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL,
 			"ensuring dirty buffer pool are written to log");
-		log_make_checkpoint_at(LSN_MAX);
+		log_make_checkpoint();
 
 		log_mutex_enter();
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/log/log0recv.cc mariadb-10.3-10.3.22/storage/innobase/log/log0recv.cc
--- mariadb-10.3-10.3.18/storage/innobase/log/log0recv.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/log/log0recv.cc	2020-01-26 18:37:29.000000000 +0000
@@ -27,7 +27,6 @@
 
 #include "univ.i"
 
-#include 
 #include 
 #include 
 #include 
@@ -764,7 +763,6 @@
 	recv_previous_parsed_rec_type = MLOG_SINGLE_REC_FLAG;
 	recv_previous_parsed_rec_offset	= 0;
 	recv_previous_parsed_rec_is_multi = 0;
-	recv_n_pool_free_frames	= 256;
 	recv_max_page_lsn = 0;
 }
 
@@ -844,18 +842,14 @@
 		recv_sys->flush_end = os_event_create(0);
 	}
 
-	ulint size = buf_pool_get_curr_size();
-	/* Set appropriate value of recv_n_pool_free_frames. */
-	if (size >= 10 << 20) {
-		/* Buffer pool of size greater than 10 MB. */
-		recv_n_pool_free_frames = 512;
-	}
+	recv_n_pool_free_frames =
+		buf_pool_get_n_pages() / 3;
 
 	recv_sys->buf = static_cast(
 		ut_malloc_dontdump(RECV_PARSING_BUF_SIZE));
 	recv_sys->buf_size = RECV_PARSING_BUF_SIZE;
 
-	recv_sys->addr_hash = hash_create(size / 512);
+	recv_sys->addr_hash = hash_create(buf_pool_get_curr_size() / 512);
 	recv_sys->progress_time = time(NULL);
 	recv_max_page_lsn = 0;
 
@@ -2182,18 +2176,20 @@
 	mutex_enter(&recv_sys->mutex);
 
 	if (!recv_sys->apply_log_recs) {
-		mutex_exit(&recv_sys->mutex);
-		return;
-	}
-
-	recv_addr_t* recv_addr = recv_get_fil_addr_struct(
-			page_id.space(), page_id.page_no());
-
-	ut_ad(recv_addr->state != RECV_WILL_NOT_READ);
-
-	if (recv_addr->state != RECV_BEING_PROCESSED
-	    && recv_addr->state != RECV_PROCESSED) {
-		recv_sys->n_addrs--;
+	} else if (recv_addr_t* recv_addr = recv_get_fil_addr_struct(
+			   page_id.space(), page_id.page_no())) {
+		switch (recv_addr->state) {
+		case RECV_WILL_NOT_READ:
+			ut_ad(!"wrong state");
+			break;
+		case RECV_BEING_PROCESSED:
+		case RECV_PROCESSED:
+			break;
+		default:
+			recv_addr->state = RECV_PROCESSED;
+			ut_ad(recv_sys->n_addrs);
+			recv_sys->n_addrs--;
+		}
 	}
 
 	mutex_exit(&recv_sys->mutex);
@@ -2718,14 +2714,40 @@
 	}
 }
 
+/** Check whether read redo log memory exceeds the available memory
+of buffer pool. Store last_stored_lsn if it is not in last phase
+@param[in]	store		whether to store page operations
+@param[in]	available_mem	Available memory in buffer pool to
+				read redo logs. */
+static bool recv_sys_heap_check(store_t* store, ulint available_mem)
+{
+  if (*store != STORE_NO
+      && mem_heap_get_size(recv_sys->heap) >= available_mem)
+  {
+    if (*store == STORE_YES)
+      recv_sys->last_stored_lsn= recv_sys->recovered_lsn;
+
+    *store= STORE_NO;
+    DBUG_PRINT("ib_log",("Ran out of memory and last "
+			 "stored lsn " LSN_PF " last stored offset "
+			 ULINTPF "\n",recv_sys->recovered_lsn,
+			 recv_sys->recovered_offset));
+    return true;
+  }
+
+  return false;
+}
+
 /** Parse log records from a buffer and optionally store them to a
 hash table to wait merging to file pages.
-@param[in]	checkpoint_lsn	the LSN of the latest checkpoint
-@param[in]	store		whether to store page operations
-@param[in]	apply		whether to apply the records
+@param[in]	checkpoint_lsn		the LSN of the latest checkpoint
+@param[in]	store			whether to store page operations
+@param[in]	available_mem		memory to read the redo logs
+@param[in]	apply			whether to apply the records
 @return whether MLOG_CHECKPOINT record was seen the first time,
 or corruption was noticed */
-bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t store, bool apply)
+bool recv_parse_log_recs(lsn_t checkpoint_lsn, store_t* store,
+			 ulint available_mem, bool apply)
 {
 	byte*		ptr;
 	byte*		end_ptr;
@@ -2737,6 +2759,7 @@
 	ulint		space;
 	ulint		page_no;
 	byte*		body;
+	const bool	last_phase = (*store == STORE_IF_EXISTS);
 
 	ut_ad(log_mutex_own());
 	ut_ad(mutex_own(&recv_sys->mutex));
@@ -2751,6 +2774,12 @@
 		return(false);
 	}
 
+	/* Check for memory overflow and ignore the parsing of remaining
+	redo log records if InnoDB ran out of memory */
+	if (recv_sys_heap_check(store, available_mem) && last_phase) {
+		return false;
+	}
+
 	switch (*ptr) {
 	case MLOG_CHECKPOINT:
 #ifdef UNIV_LOG_LSN_DEBUG
@@ -2851,7 +2880,7 @@
 			break;
 #endif /* UNIV_LOG_LSN_DEBUG */
 		default:
-			switch (store) {
+			switch (*store) {
 			case STORE_NO:
 				break;
 			case STORE_IF_EXISTS:
@@ -3035,7 +3064,7 @@
 				recv_parse_or_apply_log_rec_body(). */
 				break;
 			default:
-				switch (store) {
+				switch (*store) {
 				case STORE_NO:
 					break;
 				case STORE_IF_EXISTS:
@@ -3078,7 +3107,6 @@
 	if (!recv_sys->parse_start_lsn) {
 		/* Cannot start parsing yet because no start point for
 		it found */
-
 		return(false);
 	}
 
@@ -3099,7 +3127,6 @@
 	}
 
 	if (more_len == 0) {
-
 		return(false);
 	}
 
@@ -3134,8 +3161,9 @@
 /** Moves the parsing buffer data left to the buffer start. */
 void recv_sys_justify_left_parsing_buf()
 {
-	ut_memmove(recv_sys->buf, recv_sys->buf + recv_sys->recovered_offset,
-		   recv_sys->len - recv_sys->recovered_offset);
+	memmove(recv_sys->buf,
+		recv_sys->buf + recv_sys->recovered_offset,
+		recv_sys->len - recv_sys->recovered_offset);
 
 	recv_sys->len -= recv_sys->recovered_offset;
 
@@ -3145,26 +3173,30 @@
 /** Scan redo log from a buffer and stores new log data to the parsing buffer.
 Parse and hash the log records if new data found.
 Apply log records automatically when the hash table becomes full.
+@param[in]	available_mem		we let the hash table of recs to
+					grow to this size, at the maximum
+@param[in,out]	store_to_hash		whether the records should be
+					stored to the hash table; this is
+					reset if just debug checking is
+					needed, or when the available_mem
+					runs out
+@param[in]	log_block		log segment
+@param[in]	checkpoint_lsn		latest checkpoint LSN
+@param[in]	start_lsn		buffer start LSN
+@param[in]	end_lsn			buffer end LSN
+@param[in,out]	contiguous_lsn		it is known that all groups contain
+					contiguous log data upto this lsn
+@param[out]	group_scanned_lsn	scanning succeeded upto this lsn
 @return true if not able to scan any more in this log group */
-static
-bool
-recv_scan_log_recs(
-/*===============*/
-	ulint		available_memory,/*!< in: we let the hash table of recs
-					to grow to this size, at the maximum */
-	store_t*	store_to_hash,	/*!< in,out: whether the records should be
-					stored to the hash table; this is reset
-					if just debug checking is needed, or
-					when the available_memory runs out */
-	const byte*	log_block,	/*!< in: log segment */
-	lsn_t		checkpoint_lsn,	/*!< in: latest checkpoint LSN */
-	lsn_t		start_lsn,	/*!< in: buffer start LSN */
-	lsn_t		end_lsn,	/*!< in: buffer end LSN */
-	lsn_t*		contiguous_lsn,	/*!< in/out: it is known that all log
-					groups contain contiguous log data up
-					to this lsn */
-	lsn_t*		group_scanned_lsn)/*!< out: scanning succeeded up to
-					this lsn */
+static bool recv_scan_log_recs(
+	ulint		available_mem,
+	store_t*	store_to_hash,
+	const byte*	log_block,
+	lsn_t		checkpoint_lsn,
+	lsn_t		start_lsn,
+	lsn_t		end_lsn,
+	lsn_t*		contiguous_lsn,
+	lsn_t*		group_scanned_lsn)
 {
 	lsn_t		scanned_lsn	= start_lsn;
 	bool		finished	= false;
@@ -3172,14 +3204,13 @@
 	bool		more_data	= false;
 	bool		apply		= recv_sys->mlog_checkpoint_lsn != 0;
 	ulint		recv_parsing_buf_size = RECV_PARSING_BUF_SIZE;
-
+	const bool	last_phase = (*store_to_hash == STORE_IF_EXISTS);
 	ut_ad(start_lsn % OS_FILE_LOG_BLOCK_SIZE == 0);
 	ut_ad(end_lsn % OS_FILE_LOG_BLOCK_SIZE == 0);
 	ut_ad(end_lsn >= start_lsn + OS_FILE_LOG_BLOCK_SIZE);
 
 	const byte* const	log_end = log_block
 		+ ulint(end_lsn - start_lsn);
-
 	do {
 		ut_ad(!finished);
 
@@ -3290,6 +3321,13 @@
 				= log_block_get_checkpoint_no(log_block);
 		}
 
+		/* During last phase of scanning, there can be redo logs
+		left in recv_sys->buf to parse & store it in recv_sys->heap */
+		if (last_phase
+		    && recv_sys->recovered_lsn < recv_sys->scanned_lsn) {
+			more_data = true;
+		}
+
 		if (data_len < OS_FILE_LOG_BLOCK_SIZE) {
 			/* Log data for this group ends here */
 			finished = true;
@@ -3307,7 +3345,8 @@
 		/* Try to parse more log records */
 
 		if (recv_parse_log_recs(checkpoint_lsn,
-					*store_to_hash, apply)) {
+					store_to_hash, available_mem,
+					apply)) {
 			ut_ad(recv_sys->found_corrupt_log
 			      || recv_sys->found_corrupt_fs
 			      || recv_sys->mlog_checkpoint_lsn
@@ -3316,22 +3355,18 @@
 			goto func_exit;
 		}
 
-		if (*store_to_hash != STORE_NO
-		    && mem_heap_get_size(recv_sys->heap) > available_memory) {
-
-			DBUG_PRINT("ib_log", ("Ran out of memory and last "
-					      "stored lsn " LSN_PF,
-					      recv_sys->recovered_lsn));
-
-			recv_sys->last_stored_lsn = recv_sys->recovered_lsn;
-			*store_to_hash = STORE_NO;
-		}
+		recv_sys_heap_check(store_to_hash, available_mem);
 
 		if (recv_sys->recovered_offset > recv_parsing_buf_size / 4) {
 			/* Move parsing buffer data to the buffer start */
-
 			recv_sys_justify_left_parsing_buf();
 		}
+
+		/* Need to re-parse the redo log which're stored
+		in recv_sys->buf */
+		if (last_phase && *store_to_hash == STORE_NO) {
+			finished = false;
+		}
 	}
 
 func_exit:
@@ -3393,6 +3428,8 @@
 			redo log records before we have
 			finished the redo log scan. */
 			recv_apply_hashed_log_recs(false);
+			/* Rescan the redo logs from last stored lsn */
+			end_lsn = recv_sys->recovered_lsn;
 		}
 
 		start_lsn = ut_uint64_align_down(end_lsn,
@@ -3969,44 +4006,26 @@
 @param[in]	page_no		page number
 @return	page frame
 @retval NULL if no page was found */
-
 const byte*
 recv_dblwr_t::find_page(ulint space_id, ulint page_no)
 {
-	typedef std::vector >
-		matches_t;
-
-	matches_t	matches;
-	const byte*	result = 0;
-
-	for (list::iterator i = pages.begin(); i != pages.end(); ++i) {
-		if (page_get_space_id(*i) == space_id
-		    && page_get_page_no(*i) == page_no) {
-			matches.push_back(*i);
-		}
-	}
-
-	if (matches.size() == 1) {
-		result = matches[0];
-	} else if (matches.size() > 1) {
+  const byte *result= NULL;
+  lsn_t max_lsn= 0;
 
-		lsn_t max_lsn	= 0;
-		lsn_t page_lsn	= 0;
-
-		for (matches_t::iterator i = matches.begin();
-		     i != matches.end();
-		     ++i) {
-
-			page_lsn = mach_read_from_8(*i + FIL_PAGE_LSN);
-
-			if (page_lsn > max_lsn) {
-				max_lsn = page_lsn;
-				result = *i;
-			}
-		}
-	}
+  for (list::const_iterator i = pages.begin(); i != pages.end(); ++i)
+  {
+    const byte *page= *i;
+    if (page_get_page_no(page) != page_no ||
+        page_get_space_id(page) != space_id)
+      continue;
+    const lsn_t lsn= mach_read_from_8(page + FIL_PAGE_LSN);
+    if (lsn <= max_lsn)
+      continue;
+    max_lsn= lsn;
+    result= page;
+  }
 
-	return(result);
+  return result;
 }
 
 #ifndef DBUG_OFF
diff -Nru mariadb-10.3-10.3.18/storage/innobase/mem/mem0mem.cc mariadb-10.3-10.3.22/storage/innobase/mem/mem0mem.cc
--- mariadb-10.3-10.3.18/storage/innobase/mem/mem0mem.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/mem/mem0mem.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2014, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -228,6 +228,17 @@
 
 	ut_ad(size == heap->total_size);
 }
+
+/** Copy the tail of a string.
+@param[in,out]	dst	destination buffer
+@param[in]	src	string whose tail to copy
+@param[in]	size	size of dst buffer, in bytes, including NUL terminator
+@return strlen(src) */
+static void ut_strlcpy_rev(char* dst, const char* src, ulint size)
+{
+	size_t src_size = strlen(src), n = std::min(src_size, size - 1);
+	memcpy(dst, src + src_size - n, n + 1);
+}
 #endif /* UNIV_DEBUG */
 
 /***************************************************************//**
diff -Nru mariadb-10.3-10.3.18/storage/innobase/mtr/mtr0mtr.cc mariadb-10.3-10.3.22/storage/innobase/mtr/mtr0mtr.cc
--- mariadb-10.3-10.3.18/storage/innobase/mtr/mtr0mtr.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/mtr/mtr0mtr.cc	2020-01-26 18:37:29.000000000 +0000
@@ -30,9 +30,7 @@
 #include "buf0flu.h"
 #include "page0types.h"
 #include "mtr0log.h"
-#include "log0log.h"
 #include "row0trunc.h"
-
 #include "log0recv.h"
 
 /** Iterate over a memo block in reverse. */
@@ -204,154 +202,97 @@
 
 /** Release latches and decrement the buffer fix count.
 @param slot	memo slot */
-static
-void
-memo_slot_release(mtr_memo_slot_t* slot)
-{
-	switch (slot->type) {
-	case MTR_MEMO_BUF_FIX:
-	case MTR_MEMO_PAGE_S_FIX:
-	case MTR_MEMO_PAGE_SX_FIX:
-	case MTR_MEMO_PAGE_X_FIX: {
-
-		buf_block_t*	block;
-
-		block = reinterpret_cast(slot->object);
-
-		buf_block_unfix(block);
-		buf_page_release_latch(block, slot->type);
-		break;
-	}
-
-	case MTR_MEMO_S_LOCK:
-		rw_lock_s_unlock(reinterpret_cast(slot->object));
-		break;
-
-	case MTR_MEMO_SX_LOCK:
-		rw_lock_sx_unlock(reinterpret_cast(slot->object));
-		break;
-
-	case MTR_MEMO_X_LOCK:
-		rw_lock_x_unlock(reinterpret_cast(slot->object));
-		break;
-
-#ifdef UNIV_DEBUG
-	default:
-		ut_ad(slot->type == MTR_MEMO_MODIFY);
-#endif /* UNIV_DEBUG */
-	}
-
-	slot->object = NULL;
-}
-
-/** Unfix a page, do not release the latches on the page.
-@param slot	memo slot */
-static
-void
-memo_block_unfix(mtr_memo_slot_t* slot)
-{
-	switch (slot->type) {
-	case MTR_MEMO_BUF_FIX:
-	case MTR_MEMO_PAGE_S_FIX:
-	case MTR_MEMO_PAGE_X_FIX:
-	case MTR_MEMO_PAGE_SX_FIX: {
-		buf_block_unfix(reinterpret_cast(slot->object));
-		break;
-	}
-
-	case MTR_MEMO_S_LOCK:
-	case MTR_MEMO_X_LOCK:
-	case MTR_MEMO_SX_LOCK:
-		break;
-#ifdef UNIV_DEBUG
-	default:
-#endif /* UNIV_DEBUG */
-		break;
-	}
-}
-/** Release latches represented by a slot.
-@param slot	memo slot */
-static
-void
-memo_latch_release(mtr_memo_slot_t* slot)
+static void memo_slot_release(mtr_memo_slot_t *slot)
 {
-	switch (slot->type) {
-	case MTR_MEMO_BUF_FIX:
-	case MTR_MEMO_PAGE_S_FIX:
-	case MTR_MEMO_PAGE_SX_FIX:
-	case MTR_MEMO_PAGE_X_FIX: {
-		buf_block_t*	block;
-
-		block = reinterpret_cast(slot->object);
-
-		memo_block_unfix(slot);
-
-		buf_page_release_latch(block, slot->type);
-
-		slot->object = NULL;
-		break;
-	}
-
-	case MTR_MEMO_S_LOCK:
-		rw_lock_s_unlock(reinterpret_cast(slot->object));
-		slot->object = NULL;
-		break;
-
-	case MTR_MEMO_X_LOCK:
-		rw_lock_x_unlock(reinterpret_cast(slot->object));
-		slot->object = NULL;
-		break;
-
-	case MTR_MEMO_SX_LOCK:
-		rw_lock_sx_unlock(reinterpret_cast(slot->object));
-		slot->object = NULL;
-		break;
-
+  switch (slot->type) {
 #ifdef UNIV_DEBUG
-	default:
-		ut_ad(slot->type == MTR_MEMO_MODIFY);
-
-		slot->object = NULL;
+  default:
+    ut_ad(!"invalid type");
+    break;
+  case MTR_MEMO_MODIFY:
+    break;
 #endif /* UNIV_DEBUG */
-	}
+  case MTR_MEMO_S_LOCK:
+    rw_lock_s_unlock(reinterpret_cast(slot->object));
+    break;
+  case MTR_MEMO_SX_LOCK:
+    rw_lock_sx_unlock(reinterpret_cast(slot->object));
+    break;
+  case MTR_MEMO_X_LOCK:
+    rw_lock_x_unlock(reinterpret_cast(slot->object));
+    break;
+  case MTR_MEMO_BUF_FIX:
+  case MTR_MEMO_PAGE_S_FIX:
+  case MTR_MEMO_PAGE_SX_FIX:
+  case MTR_MEMO_PAGE_X_FIX:
+    buf_block_t *block= reinterpret_cast(slot->object);
+    buf_block_unfix(block);
+    buf_page_release_latch(block, slot->type);
+    break;
+  }
+  slot->object= NULL;
 }
 
 /** Release the latches acquired by the mini-transaction. */
 struct ReleaseLatches {
-
-	/** @return true always. */
-	bool operator()(mtr_memo_slot_t* slot) const
-	{
-		if (slot->object != NULL) {
-			memo_latch_release(slot);
-		}
-
-		return(true);
-	}
+  /** @return true always. */
+  bool operator()(mtr_memo_slot_t *slot) const
+  {
+    if (!slot->object)
+      return true;
+    switch (slot->type) {
+#ifdef UNIV_DEBUG
+    default:
+      ut_ad(!"invalid type");
+      break;
+    case MTR_MEMO_MODIFY:
+      break;
+#endif /* UNIV_DEBUG */
+    case MTR_MEMO_S_LOCK:
+      rw_lock_s_unlock(reinterpret_cast(slot->object));
+      break;
+    case MTR_MEMO_X_LOCK:
+      rw_lock_x_unlock(reinterpret_cast(slot->object));
+      break;
+    case MTR_MEMO_SX_LOCK:
+      rw_lock_sx_unlock(reinterpret_cast(slot->object));
+      break;
+    case MTR_MEMO_BUF_FIX:
+    case MTR_MEMO_PAGE_S_FIX:
+    case MTR_MEMO_PAGE_SX_FIX:
+    case MTR_MEMO_PAGE_X_FIX:
+      buf_block_t *block= reinterpret_cast(slot->object);
+      buf_block_unfix(block);
+      buf_page_release_latch(block, slot->type);
+      break;
+    }
+    slot->object= NULL;
+    return true;
+  }
 };
 
 /** Release the latches and blocks acquired by the mini-transaction. */
 struct ReleaseAll {
-	/** @return true always. */
-	bool operator()(mtr_memo_slot_t* slot) const
-	{
-		if (slot->object != NULL) {
-			memo_slot_release(slot);
-		}
-
-		return(true);
-	}
+  /** @return true always. */
+  bool operator()(mtr_memo_slot_t *slot) const
+  {
+    if (slot->object)
+      memo_slot_release(slot);
+    return true;
+  }
 };
 
+#ifdef UNIV_DEBUG
 /** Check that all slots have been handled. */
 struct DebugCheck {
 	/** @return true always. */
 	bool operator()(const mtr_memo_slot_t* slot) const
 	{
-		ut_a(slot->object == NULL);
+		ut_ad(!slot->object);
 		return(true);
 	}
 };
+#endif
 
 /** Release a resource acquired by the mini-transaction. */
 struct ReleaseBlocks {
@@ -404,59 +345,6 @@
 	FlushObserver*	m_flush_observer;
 };
 
-class mtr_t::Command {
-public:
-	/** Constructor.
-	Takes ownership of the mtr->m_impl, is responsible for deleting it.
-	@param[in,out]	mtr	mini-transaction */
-	explicit Command(mtr_t* mtr) : m_impl(&mtr->m_impl), m_locks_released()
-	{}
-
-	/** Destructor */
-	~Command()
-	{
-		ut_ad(m_impl == 0);
-	}
-
-	/** Write the redo log record, add dirty pages to the flush list and
-	release the resources. */
-	void execute();
-
-	/** Release the blocks used in this mini-transaction. */
-	void release_blocks();
-
-	/** Release the latches acquired by the mini-transaction. */
-	void release_latches();
-
-	/** Release both the latches and blocks used in the mini-transaction. */
-	void release_all();
-
-	/** Release the resources */
-	void release_resources();
-
-	/** Append the redo log records to the redo log buffer.
-	@param[in]	len	number of bytes to write */
-	void finish_write(ulint len);
-
-private:
-	/** Prepare to write the mini-transaction log to the redo log buffer.
-	@return number of bytes to write in finish_write() */
-	ulint prepare_write();
-
-	/** The mini-transaction state. */
-	mtr_t::Impl*		m_impl;
-
-	/** Set to 1 after the user thread releases the latches. The log
-	writer thread must wait for this to be set to 1. */
-	volatile ulint		m_locks_released;
-
-	/** Start lsn of the possible log entry for this mtr */
-	lsn_t			m_start_lsn;
-
-	/** End lsn of the possible log entry for this mtr */
-	lsn_t			m_end_lsn;
-};
-
 /** Write the block contents to the REDO log */
 struct mtr_write_log_t {
 	/** Append a block to the redo log buffer.
@@ -490,76 +378,75 @@
 /** Start a mini-transaction. */
 void mtr_t::start()
 {
-	UNIV_MEM_INVALID(this, sizeof(*this));
-
-	UNIV_MEM_INVALID(&m_impl, sizeof(m_impl));
-
-	m_commit_lsn = 0;
+  UNIV_MEM_INVALID(this, sizeof *this);
 
-	new(&m_impl.m_log) mtr_buf_t();
-	new(&m_impl.m_memo) mtr_buf_t();
+  new(&m_memo) mtr_buf_t();
+  new(&m_log) mtr_buf_t();
 
-	m_impl.m_mtr = this;
-	m_impl.m_log_mode = MTR_LOG_ALL;
-	m_impl.m_inside_ibuf = false;
-	m_impl.m_modifications = false;
-	m_impl.m_made_dirty = false;
-	m_impl.m_n_log_recs = 0;
-	m_impl.m_state = MTR_STATE_ACTIVE;
-	ut_d(m_impl.m_user_space_id = TRX_SYS_SPACE);
-	m_impl.m_user_space = NULL;
-	m_impl.m_flush_observer = NULL;
-
-	ut_d(m_impl.m_magic_n = MTR_MAGIC_N);
+  m_made_dirty= false;
+  m_inside_ibuf= false;
+  m_modifications= false;
+  m_n_log_recs= 0;
+  m_log_mode= MTR_LOG_ALL;
+  ut_d(m_user_space_id= TRX_SYS_SPACE);
+  m_user_space= NULL;
+  m_state= MTR_STATE_ACTIVE;
+  m_flush_observer= NULL;
+  m_commit_lsn= 0;
 }
 
 /** Release the resources */
-void
-mtr_t::Command::release_resources()
+inline void mtr_t::release_resources()
 {
-	ut_ad(m_impl->m_magic_n == MTR_MAGIC_N);
-
-	/* Currently only used in commit */
-	ut_ad(m_impl->m_state == MTR_STATE_COMMITTING);
-
-	ut_d(m_impl->m_memo.for_each_block_in_reverse(CIterate()));
-
-	/* Reset the mtr buffers */
-	m_impl->m_log.erase();
-
-	m_impl->m_memo.erase();
-
-	m_impl->m_state = MTR_STATE_COMMITTED;
-
-	m_impl = 0;
+  ut_d(m_memo.for_each_block_in_reverse(CIterate()));
+  m_log.erase();
+  m_memo.erase();
+  m_state= MTR_STATE_COMMITTED;
 }
 
 /** Commit a mini-transaction. */
 void
 mtr_t::commit()
 {
-	ut_ad(is_active());
-	ut_ad(!is_inside_ibuf());
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-	m_impl.m_state = MTR_STATE_COMMITTING;
+  ut_ad(is_active());
+  ut_ad(!is_inside_ibuf());
 
-	/* This is a dirty read, for debugging. */
-	ut_ad(!m_impl.m_modifications || !recv_no_log_write);
+  /* This is a dirty read, for debugging. */
+  ut_ad(!m_modifications || !recv_no_log_write);
+  ut_ad(!m_modifications || m_log_mode != MTR_LOG_NONE);
+
+  if (m_modifications
+      && (m_n_log_recs || m_log_mode == MTR_LOG_NO_REDO))
+  {
+    ut_ad(!srv_read_only_mode || m_log_mode == MTR_LOG_NO_REDO);
+
+    lsn_t start_lsn;
+
+    if (const ulint len= prepare_write())
+      start_lsn= finish_write(len);
+    else
+      start_lsn= m_commit_lsn;
+
+    if (m_made_dirty)
+      log_flush_order_mutex_enter();
+
+    /* It is now safe to release the log mutex because the
+    flush_order mutex will ensure that we are the first one
+    to insert into the flush list. */
+    log_mutex_exit();
+
+    m_memo.for_each_block_in_reverse(CIterate
+                                     (ReleaseBlocks(start_lsn, m_commit_lsn,
+                                                    m_flush_observer)));
+    if (m_made_dirty)
+      log_flush_order_mutex_exit();
+
+    m_memo.for_each_block_in_reverse(CIterate());
+  }
+  else
+    m_memo.for_each_block_in_reverse(CIterate());
 
-	Command	cmd(this);
-
-	if (m_impl.m_modifications
-	    && (m_impl.m_n_log_recs > 0
-		|| m_impl.m_log_mode == MTR_LOG_NO_REDO)) {
-
-		ut_ad(!srv_read_only_mode
-		      || m_impl.m_log_mode == MTR_LOG_NO_REDO);
-
-		cmd.execute();
-	} else {
-		cmd.release_all();
-		cmd.release_resources();
-	}
+  release_resources();
 }
 
 /** Commit a mini-transaction that did not modify any pages,
@@ -578,35 +465,31 @@
 	ut_ad(log_mutex_own());
 	ut_ad(is_active());
 	ut_ad(!is_inside_ibuf());
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
 	ut_ad(get_log_mode() == MTR_LOG_ALL);
-	ut_ad(!m_impl.m_made_dirty);
-	ut_ad(m_impl.m_memo.size() == 0);
+	ut_ad(!m_made_dirty);
+	ut_ad(m_memo.size() == 0);
 	ut_ad(!srv_read_only_mode);
-	ut_d(m_impl.m_state = MTR_STATE_COMMITTING);
-	ut_ad(write_mlog_checkpoint || m_impl.m_n_log_recs > 1);
+	ut_ad(write_mlog_checkpoint || m_n_log_recs > 1);
 
-	switch (m_impl.m_n_log_recs) {
+	switch (m_n_log_recs) {
 	case 0:
 		break;
 	case 1:
-		*m_impl.m_log.front()->begin() |= MLOG_SINGLE_REC_FLAG;
+		*m_log.front()->begin() |= MLOG_SINGLE_REC_FLAG;
 		break;
 	default:
-		mlog_catenate_ulint(
-			&m_impl.m_log, MLOG_MULTI_REC_END, MLOG_1BYTE);
+		mlog_catenate_ulint(&m_log, MLOG_MULTI_REC_END, MLOG_1BYTE);
 	}
 
 	if (write_mlog_checkpoint) {
-		byte*	ptr = m_impl.m_log.push(SIZE_OF_MLOG_CHECKPOINT);
+		byte*	ptr = m_log.push(SIZE_OF_MLOG_CHECKPOINT);
 		compile_time_assert(SIZE_OF_MLOG_CHECKPOINT == 1 + 8);
 		*ptr = MLOG_CHECKPOINT;
 		mach_write_to_8(ptr + 1, checkpoint_lsn);
 	}
 
-	Command	cmd(this);
-	cmd.finish_write(m_impl.m_log.size());
-	cmd.release_resources();
+	finish_write(m_log.size());
+	release_resources();
 
 	if (write_mlog_checkpoint) {
 		DBUG_PRINT("ib_log",
@@ -623,8 +506,7 @@
 bool
 mtr_t::is_named_space(ulint space) const
 {
-	ut_ad(!m_impl.m_user_space
-	      || m_impl.m_user_space->id != TRX_SYS_SPACE);
+	ut_ad(!m_user_space || m_user_space->id != TRX_SYS_SPACE);
 
 	switch (get_log_mode()) {
 	case MTR_LOG_NONE:
@@ -632,7 +514,7 @@
 		return(true);
 	case MTR_LOG_ALL:
 	case MTR_LOG_SHORT_INSERTS:
-		return(m_impl.m_user_space_id == space
+		return(m_user_space_id == space
 		       || is_predefined_tablespace(space));
 	}
 
@@ -645,21 +527,19 @@
 @return whether the mini-transaction is associated with the space */
 bool mtr_t::is_named_space(const fil_space_t* space) const
 {
-	ut_ad(!m_impl.m_user_space
-	      || m_impl.m_user_space->id != TRX_SYS_SPACE);
+  ut_ad(!m_user_space || m_user_space->id != TRX_SYS_SPACE);
 
-	switch (get_log_mode()) {
-	case MTR_LOG_NONE:
-	case MTR_LOG_NO_REDO:
-		return true;
-	case MTR_LOG_ALL:
-	case MTR_LOG_SHORT_INSERTS:
-		return(m_impl.m_user_space == space
-		       || is_predefined_tablespace(space->id));
-	}
+  switch (get_log_mode()) {
+  case MTR_LOG_NONE:
+  case MTR_LOG_NO_REDO:
+    return true;
+  case MTR_LOG_ALL:
+  case MTR_LOG_SHORT_INSERTS:
+    return m_user_space == space || is_predefined_tablespace(space->id);
+  }
 
-	ut_error;
-	return false;
+  ut_error;
+  return false;
 }
 #endif /* UNIV_DEBUG */
 
@@ -674,12 +554,11 @@
 {
 	fil_space_t*	space;
 
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
 	ut_ad(is_active());
 
 	if (space_id == TRX_SYS_SPACE) {
 		space = fil_system.sys_space;
-	} else if ((space = m_impl.m_user_space) && space_id == space->id) {
+	} else if ((space = m_user_space) && space_id == space->id) {
 	} else {
 		space = fil_space_get(space_id);
 		ut_ad(get_log_mode() != MTR_LOG_NO_REDO
@@ -691,10 +570,7 @@
 
 	ut_ad(space);
 	ut_ad(space->id == space_id);
-	x_lock(&space->latch, file, line);
-	ut_ad(space->purpose == FIL_TYPE_TEMPORARY
-	      || space->purpose == FIL_TYPE_IMPORT
-	      || space->purpose == FIL_TYPE_TABLESPACE);
+	x_lock_space(space, file, line);
 	return(space);
 }
 
@@ -703,16 +579,15 @@
 bool
 mtr_t::memo_release(const void* object, ulint type)
 {
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
 	ut_ad(is_active());
 
 	/* We cannot release a page that has been written to in the
 	middle of a mini-transaction. */
-	ut_ad(!m_impl.m_modifications || type != MTR_MEMO_PAGE_X_FIX);
+	ut_ad(!m_modifications || type != MTR_MEMO_PAGE_X_FIX);
 
 	Iterate iteration(Find(object, type));
 
-	if (!m_impl.m_memo.for_each_block_in_reverse(iteration)) {
+	if (!m_memo.for_each_block_in_reverse(iteration)) {
 		memo_slot_release(iteration.functor.m_slot);
 		return(true);
 	}
@@ -726,16 +601,15 @@
 void
 mtr_t::release_page(const void* ptr, mtr_memo_type_t type)
 {
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
 	ut_ad(is_active());
 
 	/* We cannot release a page that has been written to in the
 	middle of a mini-transaction. */
-	ut_ad(!m_impl.m_modifications || type != MTR_MEMO_PAGE_X_FIX);
+	ut_ad(!m_modifications || type != MTR_MEMO_PAGE_X_FIX);
 
 	Iterate iteration(FindPage(ptr, type));
 
-	if (!m_impl.m_memo.for_each_block_in_reverse(iteration)) {
+	if (!m_memo.for_each_block_in_reverse(iteration)) {
 		memo_slot_release(iteration.functor.get_slot());
 		return;
 	}
@@ -746,27 +620,20 @@
 
 /** Prepare to write the mini-transaction log to the redo log buffer.
 @return number of bytes to write in finish_write() */
-ulint
-mtr_t::Command::prepare_write()
+inline ulint mtr_t::prepare_write()
 {
 	ut_ad(!recv_no_log_write);
 
-	switch (m_impl->m_log_mode) {
-	case MTR_LOG_SHORT_INSERTS:
-		ut_ad(0);
-		/* fall through */
-	case MTR_LOG_NO_REDO:
-	case MTR_LOG_NONE:
-		ut_ad(m_impl->m_log.size() == 0);
+	if (UNIV_UNLIKELY(m_log_mode != MTR_LOG_ALL)) {
+		ut_ad(m_log_mode == MTR_LOG_NO_REDO);
+		ut_ad(m_log.size() == 0);
 		log_mutex_enter();
-		m_end_lsn = m_start_lsn = log_sys.lsn;
-		return(0);
-	case MTR_LOG_ALL:
-		break;
+		m_commit_lsn = log_sys.lsn;
+		return 0;
 	}
 
-	ulint	len	= m_impl->m_log.size();
-	ulint	n_recs	= m_impl->m_n_log_recs;
+	ulint	len	= m_log.size();
+	ulint	n_recs	= m_n_log_recs;
 	ut_ad(len > 0);
 	ut_ad(n_recs > 0);
 
@@ -774,9 +641,9 @@
 		log_buffer_extend(ulong((len + 1) * 2));
 	}
 
-	ut_ad(m_impl->m_n_log_recs == n_recs);
+	ut_ad(m_n_log_recs == n_recs);
 
-	fil_space_t*	space = m_impl->m_user_space;
+	fil_space_t*	space = m_user_space;
 
 	if (space != NULL && is_predefined_tablespace(space->id)) {
 		/* Omit MLOG_FILE_NAME for predefined tablespaces. */
@@ -785,35 +652,32 @@
 
 	log_mutex_enter();
 
-	if (fil_names_write_if_was_clean(space, m_impl->m_mtr)) {
+	if (fil_names_write_if_was_clean(space, this)) {
 		/* This mini-transaction was the first one to modify
 		this tablespace since the latest checkpoint, so
 		some MLOG_FILE_NAME records were appended to m_log. */
-		ut_ad(m_impl->m_n_log_recs > n_recs);
-		mlog_catenate_ulint(
-			&m_impl->m_log, MLOG_MULTI_REC_END, MLOG_1BYTE);
-		len = m_impl->m_log.size();
+		ut_ad(m_n_log_recs > n_recs);
+		mlog_catenate_ulint(&m_log, MLOG_MULTI_REC_END, MLOG_1BYTE);
+		len = m_log.size();
 	} else {
 		/* This was not the first time of dirtying a
 		tablespace since the latest checkpoint. */
 
-		ut_ad(n_recs == m_impl->m_n_log_recs);
+		ut_ad(n_recs == m_n_log_recs);
 
 		if (n_recs <= 1) {
 			ut_ad(n_recs == 1);
 
 			/* Flag the single log record as the
 			only record in this mini-transaction. */
-			*m_impl->m_log.front()->begin()
-				|= MLOG_SINGLE_REC_FLAG;
+			*m_log.front()->begin() |= MLOG_SINGLE_REC_FLAG;
 		} else {
 			/* Because this mini-transaction comprises
 			multiple log records, append MLOG_MULTI_REC_END
 			at the end. */
 
-			mlog_catenate_ulint(
-				&m_impl->m_log, MLOG_MULTI_REC_END,
-				MLOG_1BYTE);
+			mlog_catenate_ulint(&m_log, MLOG_MULTI_REC_END,
+					    MLOG_1BYTE);
 			len++;
 		}
 	}
@@ -825,98 +689,37 @@
 }
 
 /** Append the redo log records to the redo log buffer
-@param[in] len	number of bytes to write */
-void
-mtr_t::Command::finish_write(
-	ulint	len)
+@param[in] len	number of bytes to write
+@return start_lsn */
+inline lsn_t mtr_t::finish_write(ulint len)
 {
-	ut_ad(m_impl->m_log_mode == MTR_LOG_ALL);
+	ut_ad(m_log_mode == MTR_LOG_ALL);
 	ut_ad(log_mutex_own());
-	ut_ad(m_impl->m_log.size() == len);
+	ut_ad(m_log.size() == len);
 	ut_ad(len > 0);
 
-	if (m_impl->m_log.is_small()) {
-		const mtr_buf_t::block_t*	front = m_impl->m_log.front();
+	lsn_t start_lsn;
+
+	if (m_log.is_small()) {
+		const mtr_buf_t::block_t* front = m_log.front();
 		ut_ad(len <= front->used());
 
-		m_end_lsn = log_reserve_and_write_fast(
-			front->begin(), len, &m_start_lsn);
+		m_commit_lsn = log_reserve_and_write_fast(front->begin(), len,
+							  &start_lsn);
 
-		if (m_end_lsn > 0) {
-			return;
+		if (m_commit_lsn) {
+			return start_lsn;
 		}
 	}
 
 	/* Open the database log for log_write_low */
-	m_start_lsn = log_reserve_and_open(len);
+	start_lsn = log_reserve_and_open(len);
 
 	mtr_write_log_t	write_log;
-	m_impl->m_log.for_each_block(write_log);
+	m_log.for_each_block(write_log);
 
-	m_end_lsn = log_close();
-}
-
-/** Release the latches and blocks acquired by this mini-transaction */
-void
-mtr_t::Command::release_all()
-{
-	m_impl->m_memo.for_each_block_in_reverse(CIterate());
-
-	/* Note that we have released the latches. */
-	m_locks_released = 1;
-}
-
-/** Release the latches acquired by this mini-transaction */
-void
-mtr_t::Command::release_latches()
-{
-	m_impl->m_memo.for_each_block_in_reverse(CIterate());
-
-	/* Note that we have released the latches. */
-	m_locks_released = 1;
-}
-
-/** Release the blocks used in this mini-transaction */
-void
-mtr_t::Command::release_blocks()
-{
-	m_impl->m_memo.for_each_block_in_reverse(
-		CIterate(
-			ReleaseBlocks(m_start_lsn, m_end_lsn,
-				      m_impl->m_flush_observer)));
-}
-
-/** Write the redo log record, add dirty pages to the flush list and release
-the resources. */
-void
-mtr_t::Command::execute()
-{
-	ut_ad(m_impl->m_log_mode != MTR_LOG_NONE);
-
-	if (const ulint len = prepare_write()) {
-		finish_write(len);
-	}
-
-	if (m_impl->m_made_dirty) {
-		log_flush_order_mutex_enter();
-	}
-
-	/* It is now safe to release the log mutex because the
-	flush_order mutex will ensure that we are the first one
-	to insert into the flush list. */
-	log_mutex_exit();
-
-	m_impl->m_mtr->m_commit_lsn = m_end_lsn;
-
-	release_blocks();
-
-	if (m_impl->m_made_dirty) {
-		log_flush_order_mutex_exit();
-	}
-
-	release_latches();
-
-	release_resources();
+	m_commit_lsn = log_close();
+	return start_lsn;
 }
 
 #ifdef UNIV_DEBUG
@@ -1015,10 +818,9 @@
 bool
 mtr_t::memo_contains_flagged(const void* ptr, ulint flags) const
 {
-	ut_ad(m_impl.m_magic_n == MTR_MAGIC_N);
-	ut_ad(is_committing() || is_active());
+	ut_ad(is_active());
 
-	return !m_impl.m_memo.for_each_block_in_reverse(
+	return !m_memo.for_each_block_in_reverse(
 		CIterate(FlaggedCheck(ptr, flags)));
 }
 
@@ -1034,7 +836,7 @@
 	ulint		flags) const
 {
 	Iterate iteration(FindPage(ptr, flags));
-	return m_impl.m_memo.for_each_block_in_reverse(iteration)
+	return m_memo.for_each_block_in_reverse(iteration)
 		? NULL : iteration.functor.get_block();
 }
 
@@ -1057,7 +859,7 @@
 mtr_t::print() const
 {
 	ib::info() << "Mini-transaction handle: memo size "
-		<< m_impl.m_memo.size() << " bytes log size "
+		<< m_memo.size() << " bytes log size "
 		<< get_log()->size() << " bytes";
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/os/os0file.cc mariadb-10.3-10.3.22/storage/innobase/os/os0file.cc
--- mariadb-10.3-10.3.18/storage/innobase/os/os0file.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/os/os0file.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,8 +1,8 @@
 /***********************************************************************
 
-Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1995, 2019, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2009, Percona Inc.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, MariaDB Corporation.
 
 Portions of this file contain modifications contributed and copyrighted
 by Percona Inc.. Those modifications are
@@ -413,7 +413,7 @@
 	/** Accessor for the AIO context
 	@param[in]	segment	Segment for which to get the context
 	@return the AIO context for the segment */
-	io_context* io_ctx(ulint segment)
+	io_context_t io_ctx(ulint segment)
 		MY_ATTRIBUTE((warn_unused_result))
 	{
 		ut_ad(segment < get_n_segments());
@@ -421,11 +421,11 @@
 		return(m_aio_ctx[segment]);
 	}
 
-	/** Creates an io_context for native linux AIO.
+	/** Creates an io_context_t for native linux AIO.
 	@param[in]	max_events	number of events
 	@param[out]	io_ctx		io_ctx to initialize.
 	@return true on success. */
-	static bool linux_create_io_ctx(unsigned max_events, io_context_t* io_ctx)
+	static bool linux_create_io_ctx(unsigned max_events, io_context_t& io_ctx)
 		MY_ATTRIBUTE((warn_unused_result));
 
 	/** Checks if the system supports native linux aio. On some kernel
@@ -622,7 +622,7 @@
 
 	/** completion queue for IO. There is one such queue per
 	segment. Each thread will work on one ctx exclusively. */
-	io_context_t*		m_aio_ctx;
+	std::vector		m_aio_ctx;
 
 	/** The array to collect completed IOs. There is one such
 	event for each possible pending IO. The size of the array
@@ -1470,6 +1470,12 @@
 		return(NULL);
 	}
 
+	if (last_slash - path < 0) {
+		/* Sanity check, it prevents gcc from trying to handle this case which
+		 * results in warnings for some optimized builds */
+		return (NULL);
+	}
+
 	/* Non-trivial directory component */
 
 	return(mem_strdupl(path, ulint(last_slash - path)));
@@ -1788,10 +1794,14 @@
 
 	iocb->data = slot;
 
+	ut_a(reinterpret_cast(iocb->u.c.buf) % OS_FILE_LOG_BLOCK_SIZE
+	     == 0);
+
 	/* Resubmit an I/O request */
 	int	ret = io_submit(m_array->io_ctx(m_segment), 1, &iocb);
+	ut_a(ret != -EINVAL);
 
-	if (ret < -1)  {
+	if (ret < 0)  {
 		errno = -ret;
 	}
 
@@ -1892,8 +1902,8 @@
 	ut_ad(m_array != NULL);
 	ut_ad(m_segment < m_array->get_n_segments());
 
-	/* Which io_context we are going to use. */
-	io_context*	io_ctx = m_array->io_ctx(m_segment);
+	/* Which io_context_t we are going to use. */
+	io_context_t	io_ctx = m_array->io_ctx(m_segment);
 
 	/* Starting point of the m_segment we will be working on. */
 	ulint	start_pos = m_segment * m_n_slots;
@@ -1920,6 +1930,8 @@
 		int	ret;
 
 		ret = io_getevents(io_ctx, 1, m_n_slots, events, &timeout);
+		ut_a(ret != -EINVAL);
+		ut_ad(ret != -EFAULT);
 
 		for (int i = 0; i < ret; ++i) {
 
@@ -2146,14 +2158,18 @@
 
 	/* Find out what we are going to work with.
 	The iocb struct is directly in the slot.
-	The io_context is one per segment. */
+	The io_context_t is one per segment. */
 
 	ulint		io_ctx_index;
 	struct iocb*	iocb = &slot->control;
 
 	io_ctx_index = (slot->pos * m_n_segments) / m_slots.size();
 
-	int	ret = io_submit(m_aio_ctx[io_ctx_index], 1, &iocb);
+	ut_a(reinterpret_cast(iocb->u.c.buf) % OS_FILE_LOG_BLOCK_SIZE
+	     == 0);
+
+	int	ret = io_submit(io_ctx(io_ctx_index), 1, &iocb);
+	ut_a(ret != -EINVAL);
 
 	/* io_submit() returns number of successfully queued requests
 	or -errno. */
@@ -2165,25 +2181,26 @@
 	return(ret == 1);
 }
 
-/** Creates an io_context for native linux AIO.
+/** Creates an io_context_t for native linux AIO.
 @param[in]	max_events	number of events
 @param[out]	io_ctx		io_ctx to initialize.
 @return true on success. */
 bool
 AIO::linux_create_io_ctx(
 	unsigned	max_events,
-	io_context_t*	io_ctx)
+	io_context_t&	io_ctx)
 {
 	ssize_t		n_retries = 0;
 
 	for (;;) {
 
-		memset(io_ctx, 0x0, sizeof(*io_ctx));
+		memset(&io_ctx, 0x0, sizeof(io_ctx));
 
 		/* Initialize the io_ctx. Tell it how many pending
 		IO requests this context will handle. */
 
-		int	ret = io_setup(max_events, io_ctx);
+		int	ret = io_setup(max_events, &io_ctx);
+		ut_a(ret != -EINVAL);
 
 		if (ret == 0) {
 			/* Success. Return now. */
@@ -2262,7 +2279,7 @@
 	io_context_t	io_ctx;
 	char		name[1000];
 
-	if (!linux_create_io_ctx(1, &io_ctx)) {
+	if (!linux_create_io_ctx(1, io_ctx)) {
 
 		/* The platform does not support native aio. */
 
@@ -2278,6 +2295,10 @@
 				<< "Unable to create temp file to check"
 				" native AIO support.";
 
+			int ret = io_destroy(io_ctx);
+			ut_a(ret != -EINVAL);
+			ut_ad(ret != -EFAULT);
+
 			return(false);
 		}
 	} else {
@@ -2307,6 +2328,10 @@
 				<< " \"" << name << "\" to check native"
 				<< " AIO read support.";
 
+			int ret = io_destroy(io_ctx);
+			ut_a(ret != EINVAL);
+			ut_ad(ret != EFAULT);
+
 			return(false);
 		}
 	}
@@ -2335,11 +2360,15 @@
 		io_prep_pread(p_iocb, fd, ptr, 512, 0);
 	}
 
+	ut_a(reinterpret_cast(p_iocb->u.c.buf) % OS_FILE_LOG_BLOCK_SIZE
+	     == 0);
 	int	err = io_submit(io_ctx, 1, &p_iocb);
+	ut_a(err != -EINVAL);
 
 	if (err >= 1) {
 		/* Now collect the submitted IO request. */
 		err = io_getevents(io_ctx, 1, 1, &io_event, NULL);
+		ut_a(err != -EINVAL);
 	}
 
 	ut_free(buf);
@@ -2347,7 +2376,13 @@
 
 	switch (err) {
 	case 1:
-		return(true);
+		{
+			int ret = io_destroy(io_ctx);
+			ut_a(ret != -EINVAL);
+			ut_ad(ret != -EFAULT);
+
+			return(true);
+		}
 
 	case -EINVAL:
 	case -ENOSYS:
@@ -2367,6 +2402,10 @@
 			<< "returned error[" << -err << "]";
 	}
 
+	int ret = io_destroy(io_ctx);
+	ut_a(ret != -EINVAL);
+	ut_ad(ret != -EFAULT);
+
 	return(false);
 }
 
@@ -4695,19 +4734,23 @@
 				CloseHandle(fh);
 			}
 		}
+		stat_info->block_size = 0;
 
+		/* What follows, is calculation of FS block size, which is not important
+		(it is just shown in I_S innodb tables). The error to calculate it will be ignored.*/
 		char	volname[MAX_PATH];
 		BOOL	result = GetVolumePathName(path, volname, MAX_PATH);
-
+		static	bool warned_once = false;
 		if (!result) {
-
-			ib::error()
-				<< "os_file_get_status_win32: "
-				<< "Failed to get the volume path name for: "
-				<< path
-				<< "- OS error number " << GetLastError();
-
-			return(DB_FAIL);
+			if (!warned_once) {
+				ib::warn()
+					<< "os_file_get_status_win32: "
+					<< "Failed to get the volume path name for: "
+					<< path
+					<< "- OS error number " << GetLastError();
+				warned_once = true;
+			}
+			return(DB_SUCCESS);
 		}
 
 		DWORD	sectorsPerCluster;
@@ -4723,15 +4766,15 @@
 			&totalNumberOfClusters);
 
 		if (!result) {
-
-			ib::error()
-				<< "GetDiskFreeSpace(" << volname << ",...) "
-				<< "failed "
-				<< "- OS error number " << GetLastError();
-
-			return(DB_FAIL);
+			if (!warned_once) {
+				ib::warn()
+					<< "GetDiskFreeSpace(" << volname << ",...) "
+					<< "failed "
+					<< "- OS error number " << GetLastError();
+				warned_once = true;
+			}
+			return(DB_SUCCESS);
 		}
-
 		stat_info->block_size = bytesPerSector * sectorsPerCluster;
 	} else {
 		stat_info->type = OS_FILE_TYPE_UNKNOWN;
@@ -5719,8 +5762,7 @@
 	m_n_segments(segments),
 	m_n_reserved()
 # ifdef LINUX_NATIVE_AIO
-	,m_aio_ctx(),
-	m_events(m_slots.size())
+	,m_events(m_slots.size())
 # endif /* LINUX_NATIVE_AIO */
 #ifdef WIN_ASYNC_IO
 	,m_completion_port(new_completion_port())
@@ -5776,29 +5818,20 @@
 dberr_t
 AIO::init_linux_native_aio()
 {
-	/* Initialize the io_context array. One io_context
-	per segment in the array. */
-
-	ut_a(m_aio_ctx == NULL);
 
-	m_aio_ctx = static_cast(
-		ut_zalloc_nokey(m_n_segments * sizeof(*m_aio_ctx)));
-
-	if (m_aio_ctx == NULL) {
-		return(DB_OUT_OF_MEMORY);
-	}
+	/* Initialize the io_context_t array. One io_context_t
+	per segment in the array. */
+	m_aio_ctx.resize(get_n_segments());
 
-	io_context**	ctx = m_aio_ctx;
 	ulint		max_events = slots_per_segment();
 
-	for (ulint i = 0; i < m_n_segments; ++i, ++ctx) {
+	for (std::vector::iterator it = m_aio_ctx.begin(),
+						 end = m_aio_ctx.end();
+	     it != end; ++it) {
 
-		if (!linux_create_io_ctx(max_events, ctx)) {
+		if (!linux_create_io_ctx(max_events, *it)) {
 			/* If something bad happened during aio setup
 			we disable linux native aio.
-			The disadvantage will be a small memory leak
-			at shutdown but that's ok compared to a crash
-			or a not working server.
 			This frequently happens when running the test suite
 			with many threads on a system with low fs.aio-max-nr!
 			*/
@@ -5810,8 +5843,15 @@
 				<< "try increasing system "
 				<< "fs.aio-max-nr to 1048576 or larger or "
 				<< "setting innodb_use_native_aio = 0 in my.cnf";
-			ut_free(m_aio_ctx);
-			m_aio_ctx = 0;
+
+			for (std::vector::iterator it2
+			     = m_aio_ctx.begin();
+			     it2 != it; ++it2) {
+				int ret = io_destroy(*it2);
+				ut_a(ret != -EINVAL);
+			}
+
+			m_aio_ctx.clear();
 			srv_use_native_aio = FALSE;
 			return(DB_SUCCESS);
 		}
@@ -5887,15 +5927,15 @@
 
 #if defined(LINUX_NATIVE_AIO)
 	if (srv_use_native_aio) {
-		m_events.clear();
-		ut_free(m_aio_ctx);
+		for (ulint i = 0; i < m_aio_ctx.size(); i++) {
+			int ret = io_destroy(m_aio_ctx[i]);
+			ut_a(ret != -EINVAL);
+		}
 	}
 #endif /* LINUX_NATIVE_AIO */
 #if defined(WIN_ASYNC_IO)
 	CloseHandle(m_completion_port);
 #endif
-
-	m_slots.clear();
 }
 
 /** Initializes the asynchronous io system. Creates one array each for ibuf
@@ -6189,6 +6229,10 @@
 	os_offset_t		offset,
 	ulint			len)
 {
+	ut_ad(reinterpret_cast(buf) % OS_FILE_LOG_BLOCK_SIZE == 0);
+	ut_ad(offset % OS_FILE_LOG_BLOCK_SIZE == 0);
+	ut_ad(len % OS_FILE_LOG_BLOCK_SIZE == 0);
+
 #ifdef WIN_ASYNC_IO
 	ut_a((len & 0xFFFFFFFFUL) == len);
 #endif /* WIN_ASYNC_IO */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/os/os0proc.cc mariadb-10.3-10.3.22/storage/innobase/os/os0proc.cc
--- mariadb-10.3-10.3.18/storage/innobase/os/os0proc.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/os/os0proc.cc	2020-01-26 18:37:29.000000000 +0000
@@ -157,6 +157,12 @@
 {
 	ut_a(os_total_large_mem_allocated >= size);
 
+	// We could have manually poisoned that memory for ASAN.
+	// And we must unpoison it by ourself as specified in documentation
+	// for __asan_poison_memory_region() in sanitizer/asan_interface.h
+	// munmap() doesn't do it for us automatically.
+	UNIV_MEM_ALLOC(ptr, size);
+
 #ifdef HAVE_LINUX_LARGE_PAGES
 	if (my_use_large_pages && opt_large_page_size && !shmdt(ptr)) {
 		my_atomic_addlint(
diff -Nru mariadb-10.3-10.3.18/storage/innobase/os/os0thread.cc mariadb-10.3-10.3.22/storage/innobase/os/os0thread.cc
--- mariadb-10.3-10.3.18/storage/innobase/os/os0thread.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/os/os0thread.cc	2020-01-26 18:37:29.000000000 +0000
@@ -125,11 +125,17 @@
 
 	pthread_attr_t	attr;
 
-	pthread_attr_init(&attr);
+	int	ret = pthread_attr_init(&attr);
+	if (UNIV_UNLIKELY(ret)) {
+		fprintf(stderr,
+			"InnoDB: Error: pthread_attr_init() returned %d\n",
+			ret);
+		abort();
+	}
 
 	my_atomic_addlint(&os_thread_count, 1);
 
-	int	ret = pthread_create(&new_thread_id, &attr, func, arg);
+	ret = pthread_create(&new_thread_id, &attr, func, arg);
 
 	ut_a(ret == 0);
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/page/page0cur.cc mariadb-10.3-10.3.22/storage/innobase/page/page0cur.cc
--- mariadb-10.3-10.3.18/storage/innobase/page/page0cur.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/page/page0cur.cc	2020-01-26 18:37:29.000000000 +0000
@@ -35,38 +35,6 @@
 
 #include 
 
-/*******************************************************************//**
-This is a linear congruential generator PRNG. Returns a pseudo random
-number between 0 and 2^64-1 inclusive. The formula and the constants
-being used are:
-X[n+1] = (a * X[n] + c) mod m
-where:
-X[0] = my_interval_timer()
-a = 1103515245 (3^5 * 5 * 7 * 129749)
-c = 12345 (3 * 5 * 823)
-m = 18446744073709551616 (2^64)
-
-@return number between 0 and 2^64-1 */
-static
-ib_uint64_t
-page_cur_lcg_prng(void)
-/*===================*/
-{
-#define LCG_a	1103515245
-#define LCG_c	12345
-	static uint64_t	lcg_current;
-
-	if (!lcg_current) {
-		lcg_current = my_interval_timer();
-	}
-
-	/* no need to "% 2^64" explicitly because lcg_current is
-	64 bit and this will be done anyway */
-	lcg_current = LCG_a * lcg_current + LCG_c;
-
-	return(lcg_current);
-}
-
 #ifdef BTR_CUR_HASH_ADAPT
 # ifdef UNIV_SEARCH_PERF_STAT
 static ulint	page_cur_short_succ;
@@ -99,8 +67,8 @@
 	ibool		success		= FALSE;
 	const page_t*	page		= buf_block_get_frame(block);
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(dtuple_check_typed(tuple));
@@ -183,8 +151,8 @@
 	ibool		success		= FALSE;
 	const page_t*	page		= buf_block_get_frame(block);
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(dtuple_check_typed(tuple));
@@ -255,7 +223,7 @@
 /*=======================*/
 	const dtuple_t*	tuple,	/*!< in: data tuple */
 	const rec_t*	rec,	/*!< in: record */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		n)	/*!< in: compare nth field */
 {
 	const dtype_t*	type;
@@ -331,8 +299,8 @@
 	const page_zip_des_t*	page_zip = buf_block_get_page_zip(block);
 #endif /* UNIV_ZIP_DEBUG */
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(dtuple_validate(tuple));
@@ -590,8 +558,8 @@
 	const page_zip_des_t*	page_zip = buf_block_get_page_zip(block);
 #endif /* UNIV_ZIP_DEBUG */
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(dtuple_validate(tuple));
@@ -803,8 +771,7 @@
 	buf_block_t*	block,	/*!< in: page */
 	page_cur_t*	cursor)	/*!< out: page cursor */
 {
-	ulint	rnd;
-	ulint	n_recs = page_get_n_recs(buf_block_get_frame(block));
+	const ulint	n_recs = page_get_n_recs(block->frame);
 
 	page_cur_set_before_first(block, cursor);
 
@@ -813,11 +780,8 @@
 		return;
 	}
 
-	rnd = (ulint) (page_cur_lcg_prng() % n_recs);
-
-	do {
-		page_cur_move_to_next(cursor);
-	} while (rnd--);
+	cursor->rec = page_rec_get_nth(block->frame,
+				       ut_rnd_interval(n_recs) + 1);
 }
 
 /** Write a redo log record of inserting a record into an index page.
@@ -857,11 +821,11 @@
 
 	{
 		mem_heap_t*	heap		= NULL;
-		ulint		cur_offs_[REC_OFFS_NORMAL_SIZE];
-		ulint		ins_offs_[REC_OFFS_NORMAL_SIZE];
+		offset_t	cur_offs_[REC_OFFS_NORMAL_SIZE];
+		offset_t	ins_offs_[REC_OFFS_NORMAL_SIZE];
 
-		ulint*		cur_offs;
-		ulint*		ins_offs;
+		offset_t*	cur_offs;
+		offset_t*	ins_offs;
 
 		rec_offs_init(cur_offs_);
 		rec_offs_init(ins_offs_);
@@ -1037,8 +1001,8 @@
 	ulint		info_and_status_bits = 0; /* remove warning */
 	page_cur_t	cursor;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	page = block ? buf_block_get_frame(block) : NULL;
@@ -1255,7 +1219,7 @@
 				which the new record is inserted */
 	dict_index_t*	index,	/*!< in: record descriptor */
 	const rec_t*	rec,	/*!< in: pointer to a physical record */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
 {
 	byte*		insert_buf;
@@ -1306,8 +1270,8 @@
 	free_rec = page_header_get_ptr(page, PAGE_FREE);
 	if (UNIV_LIKELY_NULL(free_rec)) {
 		/* Try to allocate from the head of the free list. */
-		ulint		foffsets_[REC_OFFS_NORMAL_SIZE];
-		ulint*		foffsets	= foffsets_;
+		offset_t	foffsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t*	foffsets	= foffsets_;
 		mem_heap_t*	heap		= NULL;
 
 		rec_offs_init(foffsets_);
@@ -1478,7 +1442,7 @@
 	page_cur_t*	cursor,	/*!< in/out: page cursor */
 	dict_index_t*	index,	/*!< in: record descriptor */
 	const rec_t*	rec,	/*!< in: pointer to a physical record */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle, or NULL */
 {
 	byte*		insert_buf;
@@ -1719,8 +1683,8 @@
 	if (UNIV_LIKELY_NULL(free_rec)) {
 		/* Try to allocate from the head of the free list. */
 		lint	extra_size_diff;
-		ulint		foffsets_[REC_OFFS_NORMAL_SIZE];
-		ulint*		foffsets	= foffsets_;
+		offset_t	foffsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t*	foffsets	= foffsets_;
 		mem_heap_t*	heap		= NULL;
 
 		rec_offs_init(foffsets_);
@@ -2042,8 +2006,8 @@
 	byte*	log_ptr;
 	ulint	log_data_len;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(page_dir_get_n_heap(new_page) == PAGE_HEAP_NO_USER_LOW);
@@ -2266,7 +2230,7 @@
 	if (block) {
 		page_t*		page		= buf_block_get_frame(block);
 		mem_heap_t*	heap		= NULL;
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
 		rec_t*		rec		= page + offset;
 		rec_offs_init(offsets_);
 
@@ -2294,7 +2258,7 @@
 /*================*/
 	page_cur_t*		cursor,	/*!< in/out: a page cursor */
 	const dict_index_t*	index,	/*!< in: record descriptor */
-	const ulint*		offsets,/*!< in: rec_get_offsets(
+	const offset_t*		offsets,/*!< in: rec_get_offsets(
 					cursor->rec, index) */
 	mtr_t*			mtr)	/*!< in: mini-transaction handle
 					or NULL */
@@ -2425,27 +2389,22 @@
 	if (cur_n_owned <= PAGE_DIR_SLOT_MIN_N_OWNED) {
 		page_dir_balance_slot(page, page_zip, cur_slot_no);
 	}
-
-#ifdef UNIV_ZIP_DEBUG
-	ut_a(!page_zip || page_zip_validate(page_zip, page, index));
-#endif /* UNIV_ZIP_DEBUG */
 }
 
 #ifdef UNIV_COMPILE_TEST_FUNCS
 
 /*******************************************************************//**
-Print the first n numbers, generated by page_cur_lcg_prng() to make sure
+Print the first n numbers, generated by ut_rnd_gen() to make sure
 (visually) that it works properly. */
 void
-test_page_cur_lcg_prng(
-/*===================*/
+test_ut_rnd_gen(
 	int	n)	/*!< in: print first n numbers */
 {
 	int			i;
 	unsigned long long	rnd;
 
 	for (i = 0; i < n; i++) {
-		rnd = page_cur_lcg_prng();
+		rnd = ut_rnd_gen();
 		printf("%llu\t%%2=%llu %%3=%llu %%5=%llu %%7=%llu %%11=%llu\n",
 		       rnd,
 		       rnd % 2,
diff -Nru mariadb-10.3-10.3.18/storage/innobase/page/page0page.cc mariadb-10.3-10.3.22/storage/innobase/page/page0page.cc
--- mariadb-10.3-10.3.18/storage/innobase/page/page0page.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/page/page0page.cc	2020-01-26 18:37:29.000000000 +0000
@@ -36,6 +36,7 @@
 #include "fut0lst.h"
 #include "btr0sea.h"
 #include "trx0sys.h"
+#include 
 
 /*			THE INDEX PAGE
 			==============
@@ -581,8 +582,8 @@
 	page_cur_t	cur1;
 	rec_t*		cur2;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	page_cur_position(rec, block, &cur1);
@@ -603,20 +604,20 @@
 	/* Copy records from the original page to the new page */
 
 	while (!page_cur_is_after_last(&cur1)) {
-		rec_t*	cur1_rec = page_cur_get_rec(&cur1);
 		rec_t*	ins_rec;
-		offsets = rec_get_offsets(cur1_rec, index, offsets, is_leaf,
+		offsets = rec_get_offsets(cur1.rec, index, offsets, is_leaf,
 					  ULINT_UNDEFINED, &heap);
 		ins_rec = page_cur_insert_rec_low(cur2, index,
-						  cur1_rec, offsets, mtr);
+						  cur1.rec, offsets, mtr);
 		if (UNIV_UNLIKELY(!ins_rec)) {
 			ib::fatal() << "Rec offset " << page_offset(rec)
-				<< ", cur1 offset "
-				<< page_offset(page_cur_get_rec(&cur1))
+				<< ", cur1 offset " << page_offset(cur1.rec)
 				<< ", cur2 offset " << page_offset(cur2);
 		}
 
 		page_cur_move_to_next(&cur1);
+		ut_ad(!(rec_get_info_bits(cur1.rec, page_is_comp(new_page))
+			& REC_INFO_MIN_REC_FLAG));
 		cur2 = ins_rec;
 	}
 
@@ -803,6 +804,8 @@
 	dict_index_t*	index,		/*!< in: record descriptor */
 	mtr_t*		mtr)		/*!< in: mtr */
 {
+	ut_ad(page_align(rec) == block->frame);
+
 	page_t*		new_page	= buf_block_get_frame(new_block);
 	page_zip_des_t*	new_page_zip	= buf_block_get_page_zip(new_block);
 	page_cur_t	cur1;
@@ -812,15 +815,14 @@
 	rtr_rec_move_t*	rec_move	= NULL;
 	rec_t*		ret
 		= page_rec_get_prev(page_get_supremum_rec(new_page));
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	/* Here, "ret" may be pointing to a user record or the
 	predefined infimum record. */
 
 	if (page_rec_is_infimum(rec)) {
-
 		return(ret);
 	}
 
@@ -838,7 +840,8 @@
 	const bool is_leaf = page_rec_is_leaf(rec);
 
 	/* Copy records from the original page to the new page */
-	if (dict_index_is_spatial(index)) {
+	if (index->is_spatial()) {
+		ut_ad(!index->is_instant());
 		ulint		max_to_move = page_get_n_recs(
 						buf_block_get_frame(block));
 		heap = mem_heap_create(256);
@@ -854,17 +857,18 @@
 						      rec_move, max_to_move,
 						      &num_moved, mtr);
 	} else {
-
 		while (page_cur_get_rec(&cur1) != rec) {
-			rec_t*	cur1_rec = page_cur_get_rec(&cur1);
-			offsets = rec_get_offsets(cur1_rec, index, offsets,
+			offsets = rec_get_offsets(cur1.rec, index, offsets,
 						  is_leaf,
 						  ULINT_UNDEFINED, &heap);
 			cur2 = page_cur_insert_rec_low(cur2, index,
-						       cur1_rec, offsets, mtr);
+						       cur1.rec, offsets, mtr);
 			ut_a(cur2);
 
 			page_cur_move_to_next(&cur1);
+			ut_ad(!(rec_get_info_bits(cur1.rec,
+						  page_is_comp(new_page))
+				& REC_INFO_MIN_REC_FLAG));
 		}
 	}
 
@@ -1048,8 +1052,8 @@
 	page_zip_des_t*	page_zip	= buf_block_get_page_zip(block);
 	page_t*		page		= page_align(rec);
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(size == ULINT_UNDEFINED || size < srv_page_size);
@@ -1250,12 +1254,13 @@
 	mtr_t*		mtr)	/*!< in: mtr */
 {
 	page_cur_t	cur1;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	mem_heap_t*	heap		= NULL;
 
 	rec_offs_init(offsets_);
 
+	ut_ad(page_align(rec) == block->frame);
 	ut_ad((ibool) !!page_rec_is_comp(rec)
 	      == dict_table_is_comp(index->table));
 #ifdef UNIV_ZIP_DEBUG
@@ -1737,7 +1742,7 @@
 page_rec_print(
 /*===========*/
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: record descriptor */
+	const offset_t*	offsets)/*!< in: record descriptor */
 {
 	ut_a(!page_rec_is_comp(rec) == !rec_offs_comp(offsets));
 	rec_print_new(stderr, rec, offsets);
@@ -1812,8 +1817,8 @@
 	ulint		count;
 	ulint		n_recs;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_a((ibool)!!page_is_comp(page) == dict_table_is_comp(index->table));
@@ -1923,7 +1928,7 @@
 page_rec_validate(
 /*==============*/
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint		n_owned;
 	ulint		heap_no;
@@ -2165,7 +2170,17 @@
 			goto func_exit;
 		}
 
-		rec = page_rec_get_next_const(rec);
+		ulint offs = rec_get_next_offs(rec, FALSE);
+		if (!offs) {
+			break;
+		}
+		if (UNIV_UNLIKELY(offs < PAGE_OLD_INFIMUM
+				  || offs >= srv_page_size)) {
+			ib::error() << "Page free list is corrupted " << count;
+			goto func_exit;
+		}
+
+		rec = page + offs;
 	}
 
 	if (UNIV_UNLIKELY(page_dir_get_n_heap(page) != count + 1)) {
@@ -2357,7 +2372,17 @@
 			goto func_exit;
 		}
 
-		rec = page_rec_get_next_const(rec);
+		const ulint offs = rec_get_next_offs(rec, TRUE);
+		if (!offs) {
+			break;
+		}
+		if (UNIV_UNLIKELY(offs < PAGE_OLD_INFIMUM
+				  || offs >= srv_page_size)) {
+			ib::error() << "Page free list is corrupted " << count;
+			goto func_exit;
+		}
+
+		rec = page + offs;
 	}
 
 	if (UNIV_UNLIKELY(page_dir_get_n_heap(page) != count + 1)) {
@@ -2374,25 +2399,27 @@
 	return(ret);
 }
 
-/***************************************************************//**
-This function checks the consistency of an index page.
-@return TRUE if ok */
-ibool
-page_validate(
-/*==========*/
-	const page_t*	page,	/*!< in: index page */
-	dict_index_t*	index)	/*!< in: data dictionary index containing
-				the page record type definition */
+/** Check the consistency of an index page.
+@param[in]	page	index page
+@param[in]	index	B-tree or R-tree index
+@return	whether the page is valid */
+bool page_validate(const page_t* page, const dict_index_t* index)
 {
 	const page_dir_slot_t*	slot;
 	const rec_t*		rec;
 	const rec_t*		old_rec		= NULL;
+	const rec_t*		first_rec	= NULL;
 	ulint			offs;
 	ulint			n_slots;
 	ibool			ret		= TRUE;
 	ulint			i;
-	ulint*			offsets		= NULL;
-	ulint*			old_offsets	= NULL;
+	offset_t		offsets_1[REC_OFFS_NORMAL_SIZE];
+	offset_t		offsets_2[REC_OFFS_NORMAL_SIZE];
+	offset_t*		offsets		= offsets_1;
+	offset_t*		old_offsets	= offsets_2;
+
+	rec_offs_init(offsets_1);
+	rec_offs_init(offsets_2);
 
 #ifdef UNIV_GIS_DEBUG
 	if (dict_index_is_spatial(index)) {
@@ -2510,6 +2537,43 @@
 			goto next_rec;
 		}
 
+		if (rec == first_rec) {
+			if ((rec_get_info_bits(rec, page_is_comp(page))
+			     & REC_INFO_MIN_REC_FLAG)) {
+				if (page_has_prev(page)) {
+					ib::error() << "REC_INFO_MIN_REC_FLAG "
+						"is set on non-left page";
+					ret = false;
+				} else if (!page_is_leaf(page)) {
+					/* leftmost node pointer page */
+				} else if (!index->is_instant()) {
+					ib::error() << "REC_INFO_MIN_REC_FLAG "
+						"is set in a leaf-page record";
+					ret = false;
+				} else if (rec_get_deleted_flag(
+						   rec, page_is_comp(page))) {
+					/* If this were a 10.4 metadata
+					record for index->table->instant
+					we should not get here in 10.3, because
+					the metadata record should not have
+					been recognized by
+					btr_cur_instant_init_low(). */
+					ib::error() << "Metadata record "
+						"is delete-marked";
+					ret = false;
+				}
+			} else if (!page_has_prev(page)
+				   && index->is_instant()) {
+				ib::error() << "Metadata record is missing";
+				ret = false;
+			}
+		} else if (rec_get_info_bits(rec, page_is_comp(page))
+			   & REC_INFO_MIN_REC_FLAG) {
+			ib::error() << "REC_INFO_MIN_REC_FLAG record is not "
+				       "first in page";
+			ret = false;
+		}
+
 		/* Check that the records are in the ascending order */
 		if (count >= PAGE_HEAP_NO_USER_LOW
 		    && !page_rec_is_supremum(rec)) {
@@ -2616,12 +2680,13 @@
 		old_rec = rec;
 		rec = page_rec_get_next_const(rec);
 
-		/* set old_offsets to offsets; recycle offsets */
-		{
-			ulint* offs = old_offsets;
-			old_offsets = offsets;
-			offsets = offs;
+		if (page_rec_is_infimum(old_rec)
+		    && page_rec_is_user_rec(rec)) {
+			first_rec = rec;
 		}
+
+		/* set old_offsets to offsets; recycle offsets */
+		std::swap(old_offsets, offsets);
 	}
 
 	if (page_is_comp(page)) {
@@ -2657,14 +2722,28 @@
 	}
 
 	/* Check then the free list */
-	for (rec = page_header_get_ptr(page, PAGE_FREE);
-	     rec;
-	     rec = page_rec_get_next_const(rec)) {
+	rec = page_header_get_ptr(page, PAGE_FREE);
+
+	while (rec != NULL) {
 		offsets = rec_get_offsets(rec, index, offsets,
 					  page_is_leaf(page),
 					  ULINT_UNDEFINED, &heap);
 		if (UNIV_UNLIKELY(!page_rec_validate(rec, offsets))) {
 			ret = FALSE;
+next_free:
+			const ulint offs = rec_get_next_offs(
+				rec, page_is_comp(page));
+			if (!offs) {
+				break;
+			}
+			if (UNIV_UNLIKELY(offs < PAGE_OLD_INFIMUM
+					  || offs >= srv_page_size)) {
+				ib::error() << "Page free list is corrupted";
+				ret = FALSE;
+				break;
+			}
+
+			rec = page + offs;
 			continue;
 		}
 
@@ -2675,7 +2754,7 @@
 			ib::error() << "Free record offset out of bounds: "
 				    << offs << '+' << i;
 			ret = FALSE;
-			continue;
+			goto next_free;
 		}
 		while (i--) {
 			if (UNIV_UNLIKELY(buf[offs + i])) {
@@ -2686,6 +2765,8 @@
 			}
 			buf[offs + i] = 1;
 		}
+
+		goto next_free;
 	}
 
 	if (UNIV_UNLIKELY(page_dir_get_n_heap(page) != count + 1)) {
@@ -2766,7 +2847,7 @@
 		page_zip/*!< in: compressed page descriptor */
 #endif
 	,
-	const ulint*		offsets)/*!< in: offsets for record */
+	const offset_t*		offsets)/*!< in: offsets for record */
 {
 	bool		no_compress_needed;
 	buf_block_t*	block = pcur->block;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/page/page0zip.cc mariadb-10.3-10.3.22/storage/innobase/page/page0zip.cc
--- mariadb-10.3-10.3.18/storage/innobase/page/page0zip.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/page/page0zip.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2,7 +2,7 @@
 
 Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
 Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2014, 2019, MariaDB Corporation.
+Copyright (c) 2014, 2020, 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
@@ -878,7 +878,7 @@
 	mem_heap_t*	heap)		/*!< in: temporary memory heap */
 {
 	int	err	= Z_OK;
-	ulint*	offsets = NULL;
+	offset_t* offsets = NULL;
 
 	do {
 		const rec_t*	rec = *recs++;
@@ -983,7 +983,7 @@
 	FILE_LOGFILE
 	z_stream*	c_stream,	/*!< in/out: compressed page stream */
 	const rec_t*	rec,		/*!< in: record */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec) */
 	ulint		trx_id_col,	/*!< in: position of of DB_TRX_ID */
 	byte*		deleted,	/*!< in: dense directory entry pointing
 					to the head of the free list */
@@ -1122,7 +1122,7 @@
 	mem_heap_t*	heap)		/*!< in: temporary memory heap */
 {
 	int	err		= Z_OK;
-	ulint*	offsets		= NULL;
+	offset_t* offsets		= NULL;
 	/* BTR_EXTERN_FIELD_REF storage */
 	byte*	externs		= storage - n_dense
 		* (DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN);
@@ -1985,7 +1985,7 @@
 page_zip_apply_log_ext(
 /*===================*/
 	rec_t*		rec,		/*!< in/out: record */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec) */
 	ulint		trx_id_col,	/*!< in: position of of DB_TRX_ID */
 	const byte*	data,		/*!< in: modification log */
 	const byte*	end)		/*!< in: end of modification log */
@@ -2086,7 +2086,7 @@
 				/*!< in: heap_no and status bits for
 				the next record to uncompress */
 	dict_index_t*	index,	/*!< in: index of the page */
-	ulint*		offsets)/*!< in/out: work area for
+	offset_t*	offsets)/*!< in/out: work area for
 				rec_get_offsets_reverse() */
 {
 	const byte* const end = data + size;
@@ -2154,7 +2154,7 @@
 		if (val & 1) {
 			/* Clear the data bytes of the record. */
 			mem_heap_t*	heap	= NULL;
-			ulint*		offs;
+			offset_t*	offs;
 			offs = rec_get_offsets(rec, index, offsets, is_leaf,
 					       ULINT_UNDEFINED, &heap);
 			memset(rec, 0, rec_offs_data_size(offs));
@@ -2304,7 +2304,7 @@
 					sorted by address */
 	ulint		n_dense,	/*!< in: size of recs[] */
 	dict_index_t*	index,		/*!< in: the index of the page */
-	ulint*		offsets,	/*!< in/out: temporary offsets */
+	offset_t*	offsets,	/*!< in/out: temporary offsets */
 	mem_heap_t*	heap)		/*!< in: temporary memory heap */
 {
 	ulint		heap_status = REC_STATUS_NODE_PTR
@@ -2494,7 +2494,7 @@
 					sorted by address */
 	ulint		n_dense,	/*!< in: size of recs[] */
 	dict_index_t*	index,		/*!< in: the index of the page */
-	ulint*		offsets)	/*!< in/out: temporary offsets */
+	offset_t*	offsets)	/*!< in/out: temporary offsets */
 {
 	ulint	heap_status	= REC_STATUS_ORDINARY
 		| PAGE_HEAP_NO_USER_LOW << REC_HEAP_NO_SHIFT;
@@ -2627,7 +2627,7 @@
 /*==========================*/
 	z_stream*	d_stream,	/*!< in/out: compressed page stream */
 	rec_t*		rec,		/*!< in/out: record */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec) */
 	ulint		trx_id_col)	/*!< in: position of of DB_TRX_ID */
 {
 	ulint	i;
@@ -2742,7 +2742,7 @@
 	ulint		n_dense,	/*!< in: size of recs[] */
 	dict_index_t*	index,		/*!< in: the index of the page */
 	ulint		trx_id_col,	/*!< index of the trx_id column */
-	ulint*		offsets,	/*!< in/out: temporary offsets */
+	offset_t*	offsets,	/*!< in/out: temporary offsets */
 	mem_heap_t*	heap)		/*!< in: temporary memory heap */
 {
 	int		err;
@@ -3046,7 +3046,7 @@
 	ulint		n_dense;/* number of user records on the page */
 	ulint		trx_id_col = ULINT_UNDEFINED;
 	mem_heap_t*	heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 
 	ut_ad(page_zip_simple_validate(page_zip));
 	UNIV_MEM_ASSERT_W(page, srv_page_size);
@@ -3170,10 +3170,10 @@
 		ulint	n = 1 + 1/* node ptr */ + REC_OFFS_HEADER_SIZE
 			+ dict_index_get_n_fields(index);
 
-		offsets = static_cast(
+		offsets = static_cast(
 			mem_heap_alloc(heap, n * sizeof(ulint)));
 
-		*offsets = n;
+		rec_offs_set_n_alloc(offsets, n);
 	}
 
 	/* Decompress the records in heap_no order. */
@@ -3338,7 +3338,19 @@
 		   FIL_PAGE_LSN - FIL_PAGE_PREV)
 	    || memcmp(page_zip->data + FIL_PAGE_TYPE, page + FIL_PAGE_TYPE, 2)
 	    || memcmp(page_zip->data + FIL_PAGE_DATA, page + FIL_PAGE_DATA,
-		      PAGE_DATA - FIL_PAGE_DATA)) {
+		      PAGE_ROOT_AUTO_INC)
+	    /* The PAGE_ROOT_AUTO_INC can be updated while holding an SX-latch
+	    on the clustered index root page (page number 3 in .ibd files).
+	    That allows concurrent readers (holding buf_block_t::lock S-latch).
+	    Because we do not know what type of a latch our caller is holding,
+	    we will ignore the field on clustered index root pages in order
+	    to avoid false positives. */
+	    || (page_get_page_no(page) != 3/* clustered index root page */
+		&& memcmp(&page_zip->data[FIL_PAGE_DATA + PAGE_ROOT_AUTO_INC],
+			  &page[FIL_PAGE_DATA + PAGE_ROOT_AUTO_INC], 8))
+	    || memcmp(&page_zip->data[FIL_PAGE_DATA + PAGE_HEADER_PRIV_END],
+		      &page[FIL_PAGE_DATA + PAGE_HEADER_PRIV_END],
+		      PAGE_DATA - FIL_PAGE_DATA - PAGE_HEADER_PRIV_END)) {
 		page_zip_fail(("page_zip_validate: page header\n"));
 		page_zip_hexdump(page_zip, sizeof *page_zip);
 		page_zip_hexdump(page_zip->data, page_zip_get_size(page_zip));
@@ -3398,7 +3410,7 @@
 		committed.  Let us tolerate that difference when we
 		are performing a sloppy validation. */
 
-		ulint*		offsets;
+		offset_t*	offsets;
 		mem_heap_t*	heap;
 		const rec_t*	rec;
 		const rec_t*	trec;
@@ -3565,7 +3577,7 @@
 	const page_t*	page,		/*!< in: page containing rec */
 	const byte*	rec,		/*!< in: record being written */
 	dict_index_t*	index,		/*!< in: record descriptor */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec, index) */
 	ulint		create,		/*!< in: nonzero=insert, zero=update */
 	ulint		trx_id_col,	/*!< in: position of DB_TRX_ID */
 	ulint		heap_no,	/*!< in: heap number of rec */
@@ -3684,7 +3696,7 @@
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page */
 	const byte*	rec,	/*!< in: record being written */
 	dict_index_t*	index,	/*!< in: the index the record belongs to */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	ulint		create)	/*!< in: nonzero=insert, zero=update */
 {
 	const page_t*	page;
@@ -3934,7 +3946,7 @@
 	const byte*	rec,	/*!< in/out: record whose data is being
 				written */
 	dict_index_t*	index,	/*!< in: index of the page */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	ulint		n,	/*!< in: column index */
 	mtr_t*		mtr)	/*!< in: mini-transaction handle,
 				or NULL if no logging is needed */
@@ -4155,7 +4167,7 @@
 page_zip_write_trx_id_and_roll_ptr(
 	page_zip_des_t*	page_zip,
 	byte*		rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	ulint		trx_id_col,
 	trx_id_t	trx_id,
 	roll_ptr_t	roll_ptr,
@@ -4294,7 +4306,7 @@
 	page_zip_des_t*	page_zip,	/*!< in/out: compressed page */
 	byte*		rec,		/*!< in: record to clear */
 	const dict_index_t*	index,	/*!< in: index of rec */
-	const ulint*	offsets)	/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets)	/*!< in: rec_get_offsets(rec, index) */
 {
 	ulint	heap_no;
 	page_t*	page	= page_align(rec);
@@ -4369,10 +4381,6 @@
 	} else {
 		ut_ad(!rec_offs_any_extern(offsets));
 	}
-
-#ifdef UNIV_ZIP_DEBUG
-	ut_a(page_zip_validate(page_zip, page, index));
-#endif /* UNIV_ZIP_DEBUG */
 }
 
 /**********************************************************************//**
@@ -4504,7 +4512,7 @@
 	page_zip_des_t*		page_zip,	/*!< in/out: compressed page */
 	byte*			rec,		/*!< in: deleted record */
 	const dict_index_t*	index,		/*!< in: index of rec */
-	const ulint*		offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*		offsets,	/*!< in: rec_get_offsets(rec) */
 	const byte*		free)		/*!< in: previous start of
 						the free list */
 {
diff -Nru mariadb-10.3-10.3.18/storage/innobase/pars/lexyy.cc mariadb-10.3-10.3.22/storage/innobase/pars/lexyy.cc
--- mariadb-10.3-10.3.18/storage/innobase/pars/lexyy.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/pars/lexyy.cc	2020-01-26 18:37:29.000000000 +0000
@@ -356,8 +356,8 @@
 	(yy_hold_char) = *yy_cp; \
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 123
-#define YY_END_OF_BUFFER 124
+#define YY_NUM_RULES 102
+#define YY_END_OF_BUFFER 103
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -365,53 +365,42 @@
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static const flex_int16_t yy_accept[404] =
+static const flex_int16_t yy_accept[307] =
     {   0,
-        0,    0,  118,  118,    0,    0,    0,    0,  124,  122,
-      121,  121,    8,  122,  113,    5,  102,  108,  111,  109,
-      106,  110,  122,  112,    1,  122,  107,  105,  103,  104,
-      116,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-      114,  115,  118,  119,    6,    7,    9,   10,  121,    4,
-       97,  117,    2,    1,    3,   98,   99,  101,  100,    0,
-       95,    0,   95,   95,   95,   95,   95,   44,   95,   95,
-       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-       95,   95,   95,   28,   17,   25,   95,   95,   95,   95,
-
-       95,   95,   54,   62,   95,   14,   95,   95,   95,   95,
-       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-       95,   95,   95,   95,  118,  119,  119,  120,    6,    7,
-        9,   10,    2,    0,   96,   13,   45,   95,   95,   95,
-       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-       95,   95,   95,   95,   95,   27,   95,   95,   95,   41,
-       95,   95,   95,   95,   21,   95,   95,   95,   95,   95,
-       15,   95,   95,   95,   18,   95,   95,   95,   95,   95,
-       81,   95,   95,   95,   51,   95,   12,   95,   36,   95,
-       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-
-        0,   96,   95,   95,   95,   95,   20,   95,   24,   95,
-       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
-       46,   95,   30,   95,   88,   95,   95,   39,   95,   95,
-       95,   95,   95,   48,   95,   93,   90,   32,   92,   95,
-       11,   65,   95,   95,   95,   42,   95,   95,   95,   95,
-       95,   95,   95,   95,   95,   95,   29,   95,   95,   95,
-       95,   95,   95,   95,   95,   95,   86,    0,   95,   26,
-       95,   95,   95,   67,   95,   95,   95,   95,   37,   95,
-       95,   95,   95,   95,   95,   31,   66,   23,   95,   59,
-       95,   76,   95,   95,   95,   43,   95,   95,   95,   95,
-
-       95,   95,   95,   95,   91,   95,   95,   56,   95,   95,
-       95,   95,   95,   95,   95,   40,   33,    0,   80,   94,
-       19,   95,   95,   84,   95,   75,   55,   95,   64,   95,
-       52,   95,   95,   47,   95,   77,   95,   79,   95,   95,
-       34,   95,   95,   95,   35,   73,   95,   95,   95,   95,
-       60,   95,   50,   49,   95,   95,   95,   57,   53,   63,
-       95,   95,   22,   95,   95,   74,   82,   95,   95,   78,
-       95,   69,   95,   95,   95,   95,   95,   38,   89,   68,
-       95,   85,   95,   95,   95,   87,   95,   95,   61,   16,
-       95,   71,   70,   95,   58,   83,   95,   95,   95,   95,
+        0,    0,   97,   97,    0,    0,    0,    0,  103,  101,
+      100,  100,    8,  101,   92,    5,   81,   87,   90,   88,
+       85,   89,  101,   91,    1,  101,   86,   84,   82,   83,
+       95,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       93,   94,   97,   98,    6,    7,    9,   10,  100,    4,
+       76,   96,    2,    1,    3,   77,   78,   80,   79,    0,
+       74,    0,   74,   74,   74,   74,   36,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       23,   17,   20,   74,   74,   74,   74,   74,   74,   46,
+
+       52,   74,   14,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   97,   98,
+       98,   99,    6,    7,    9,   10,    2,    0,   75,   13,
+       37,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   22,   74,   74,   34,   74,
+       74,   74,   74,   18,   74,   74,   74,   74,   74,   15,
+       74,   74,   74,   74,   74,   74,   74,   43,   74,   12,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+        0,   75,   74,   74,   19,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   38,   25,   74,   67,   74,
+
+       32,   74,   74,   74,   74,   40,   74,   72,   69,   27,
+       71,   74,   11,   55,   74,   74,   74,   74,   74,   74,
+       74,   74,   24,   74,   74,   74,   74,   74,   74,   66,
+        0,   21,   74,   57,   74,   74,   74,   31,   74,   74,
+       74,   74,   74,   26,   56,   74,   49,   74,   62,   74,
+       74,   35,   74,   74,   74,   74,   70,   74,   48,   74,
+       74,   74,   74,   33,   28,    0,   73,   74,   64,   61,
+       47,   74,   54,   74,   44,   74,   39,   63,   74,   74,
+       29,   74,   30,   60,   74,   50,   42,   41,   74,   45,
+       53,   74,   74,   74,   74,   74,   74,   68,   58,   74,
 
-       95,   72,    0
+       65,   74,   51,   16,   59,    0
     } ;
 
 static const YY_CHAR yy_ec[256] =
@@ -424,12 +413,12 @@
        17,   17,   17,   17,   17,   17,   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,
-        1,    1,    1,    1,   51,    1,   34,   34,   34,   34,
+       41,   42,   43,   44,   45,   46,   47,   48,   49,   34,
+        1,    1,    1,    1,   50,    1,   34,   34,   34,   34,
 
-       34,   34,   34,   34,   34,   34,   34,   52,   34,   34,
-       34,   34,   53,   34,   54,   34,   34,   34,   34,   34,
-       34,   34,   55,    1,   56,    1,    1,    1,    1,    1,
+       34,   34,   34,   34,   34,   34,   34,   51,   34,   34,
+       34,   34,   52,   34,   53,   34,   34,   34,   34,   34,
+       34,   34,   54,    1,   55,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -446,418 +435,324 @@
         1,    1,    1,    1,    1
     } ;
 
-static const YY_CHAR yy_meta[57] =
+static const YY_CHAR yy_meta[56] =
     {   0,
         1,    1,    1,    2,    3,    1,    1,    4,    1,    1,
         5,    1,    1,    1,    1,    6,    7,    1,    1,    1,
         8,    1,    1,    6,    9,    9,    9,    9,    9,    9,
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
         9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
-        9,    9,    9,    9,    1,    1
+        9,    9,    9,    1,    1
     } ;
 
-static const flex_int16_t yy_base[417] =
+static const flex_int16_t yy_base[320] =
     {   0,
-        0,    0,  296,  281,  283,  280,  261,  252,  253, 1285,
-       55,   57, 1285,    0, 1285, 1285, 1285, 1285, 1285, 1285,
-     1285, 1285,  211,  213,   46,  202, 1285,   43, 1285,  199,
-     1285,   46,   50,   56,   52,   66,   64,   51,   81,   92,
-       91,   94,   96,  111,  113,  116,  130,  134,   53,  143,
-     1285, 1285,    0,  106,    0,  206,    0,  205,  141,    0,
-     1285, 1285,  177,   56,  152, 1285, 1285, 1285, 1285,  161,
-      140,  147,  152,  154,  155,  161,  167,  171,  177,  172,
-      184,  174,  188,  189,  191,  194,  203,  212,  217,  219,
-      222,  223,  228,  224,  226,  233,  235,  239,  244,  251,
-
-      256,  260,  261,  262,  265,  271,  266,  281,  277,  287,
-      282,  288,  303,  306,  307,  292,  310,  321,  322,  323,
-      324,  325,  335,  338,    0,  112,  173, 1285,    0,  152,
-        0,  145,  130,   59,    0,  339,  341,  353,  351,  354,
-      365,  367,  355,  372,  376,  383,  379,  386,  388,  385,
-      398,  392,  402,  401,  414,  415,  416,  417,  426,  430,
-      432,  437,  433,  439,  442,  443,  449,  456,  460,  461,
-      463,  470,  472,  473,  479,  483,  485,  489,  492,  495,
-      498,  499,  502,  508,  509,  514,  515,  518,  520,  527,
-      530,  534,  536,  541,  543,  553,  555,  557,  559,  568,
-
-       41,    0,  564,  569,  570,  573,  574,  585,  580,  589,
-      586,  595,  598,  600,  605,  610,  611,  617,  620,  615,
-      622,  627,  626,  631,  641,  642,  646,  647,  648,  651,
-      652,  653,  657,  662,  663,  667,  669,  673,  680,  682,
-      684,  685,  686,  687,  689,  696,  698,  700,  701,  703,
-      699,  710,  714,  716,  729,  732,  731,  733,  735,  734,
-      746,  747,  748,  752,  753,  759,  749,   39,  769,  770,
-      771,  773,  774,  780,  783,  784,  787,  785,  786,  802,
-      800,  803,  816,  817,  818,  819,  820,  823,  833,  835,
-      836,  837,  838,  839,  848,  849,  852,  853,  854,  859,
-
-      863,  870,  868,  872,  875,  884,  885,  887,  889,  890,
-      888,  904,  906,  907,  908,  918,  919,   73,  921,  922,
-      923,  924,  933,  934,  936,  937,  938,  939,  940,  949,
-      952,  955,  953,  965,  969,  970,  971,  972,  974,  975,
-      981,  984,  986,  988,  990,  991, 1000, 1006, 1004, 1009,
-     1016, 1018, 1020, 1021, 1025, 1027, 1032, 1034, 1038, 1039,
-     1041, 1043, 1048, 1050, 1052, 1055, 1059, 1064, 1066, 1068,
-     1071, 1073, 1077, 1084, 1086, 1087, 1091, 1093, 1098, 1100,
-     1102, 1104, 1105, 1111, 1114, 1116, 1117, 1118, 1120, 1127,
-     1129, 1130, 1134, 1139, 1141, 1145, 1146, 1148, 1150, 1151,
+        0,    0,  262,  259,  249,  244,  239,  234,  236,  960,
+       54,   56,  960,    0,  960,  960,  960,  960,  960,  960,
+      960,  960,  217,  220,   45,  186,  960,   42,  960,  184,
+      960,   45,   49,   55,   51,   65,   80,   50,   69,   94,
+       90,   92,  104,   60,  114,  116,  131,  134,  135,  149,
+      960,  960,    0,   61,    0,  194,    0,  197,  133,    0,
+      960,  960,  163,   53,  143,  960,  960,  960,  960,  147,
+      125,  123,  138,  151,  152,  153,  155,  166,  169,  173,
+      170,  171,  176,  180,  193,  182,  200,  204,  206,  209,
+      210,  211,  213,  224,  225,  226,  235,  240,  242,  245,
+
+      251,  252,  255,  256,  258,  261,  270,  274,  272,  277,
+      289,  288,  276,  294,  295,  300,  304,  305,    0,   79,
+      110,  960,    0,  116,    0,  113,   98,   58,    0,  306,
+      315,  316,  318,  319,  322,  328,  329,  332,  334,  338,
+      344,  353,  351,  354,  366,  360,  367,  369,  376,  378,
+      381,  385,  388,  382,  394,  400,  403,  404,  406,  407,
+      410,  417,  423,  424,  426,  429,  433,  440,  442,  443,
+      444,  445,  454,  456,  459,  461,  472,  473,  474,  477,
+       53,    0,  475,  478,  479,  490,  502,  504,  505,  507,
+      508,  509,  511,  518,  520,  523,  524,  525,  529,  538,
+
+      541,  542,  543,  545,  547,  544,  556,  557,  558,  559,
+      560,  569,  572,  574,  578,  581,  579,  583,  588,  590,
+      600,  601,  602,  607,  611,  613,  612,  618,  622,  629,
+       41,  634,  636,  638,  639,  643,  645,  648,  649,  650,
+      655,  659,  661,  660,  670,  675,  676,  679,  680,  682,
+      686,  689,  691,  696,  693,  700,  705,  706,  709,  711,
+      712,  716,  722,  723,  726,   72,  727,  736,  737,  738,
+      739,  740,  742,  743,  752,  753,  755,  757,  758,  759,
+      764,  770,  769,  771,  774,  784,  785,  786,  787,  789,
+      790,  791,  796,  801,  802,  803,  806,  807,  812,  817,
 
-     1155, 1157, 1285, 1197, 1206, 1215, 1218, 1221, 1225, 1234,
-     1243, 1252, 1261, 1268, 1272, 1275
+      816,  823,  826,  828,  832,  960,  872,  881,  890,  893,
+      896,  900,  909,  918,  927,  936,  943,  947,  950
     } ;
 
-static const flex_int16_t yy_def[417] =
+static const flex_int16_t yy_def[320] =
     {   0,
-      403,    1,  404,  404,  405,  405,  406,  406,  403,  403,
-      403,  403,  403,  407,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  408,  403,  403,  403,  403,
-      403,  409,  409,  409,  409,  409,   34,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      403,  403,  410,  411,  412,  403,  413,  403,  403,  407,
-      403,  403,  403,  403,  408,  403,  403,  403,  403,  414,
-      409,  415,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  410,  411,  411,  403,  412,  403,
-      413,  403,  403,  403,  416,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-
-      403,  416,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  403,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  403,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
-      409,  409,  409,  409,  409,  409,  409,  409,  409,  409,
+      306,    1,  307,  307,  308,  308,  309,  309,  306,  306,
+      306,  306,  306,  310,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  311,  306,  306,  306,  306,
+      306,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      306,  306,  313,  314,  315,  306,  316,  306,  306,  310,
+      306,  306,  306,  306,  311,  306,  306,  306,  306,  317,
+      312,  318,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  313,  314,
+      314,  306,  315,  306,  316,  306,  306,  306,  319,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      306,  319,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      306,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  306,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
 
-      409,  409,    0,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403
+      312,  312,  312,  312,  312,    0,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306
     } ;
 
-static const flex_int16_t yy_nxt[1342] =
+static const flex_int16_t yy_nxt[1016] =
     {   0,
        10,   11,   12,   13,   10,   14,   15,   16,   17,   18,
        19,   20,   21,   22,   23,   24,   25,   26,   27,   28,
        29,   30,   31,   10,   32,   33,   34,   35,   36,   37,
        38,   38,   39,   38,   38,   40,   41,   42,   43,   44,
        38,   45,   46,   47,   48,   49,   50,   38,   38,   38,
-       38,   38,   38,   38,   51,   52,   59,   59,   59,   59,
-       63,   70,   64,   67,   68,   70,   70,   70,   70,   72,
-       63,   70,   64,   72,   72,   72,   72,  122,   75,   72,
-       84,   70,   76,   73,   85,   77,  135,   79,   74,   72,
-      318,   80,   89,  268,   81,   71,   70,   82,   78,   90,
-
-       83,   86,   91,   87,   72,   92,   70,   70,   93,   70,
-       94,   70,  201,   88,   72,   72,  127,   72,   95,   72,
-       97,  128,  403,   96,   98,  103,   70,  403,   70,  100,
-       99,   70,  101,  104,   72,  105,   72,  106,  102,   72,
-      107,  109,   59,   59,  112,   70,  133,  113,  132,   70,
-      110,  111,  108,   72,  117,   70,  114,   72,   70,  130,
-      115,  118,   70,   72,  116,  134,   72,   70,  119,   70,
-       70,  120,  403,  121,  123,   72,   70,   72,   72,  136,
-      137,  124,   70,  127,   72,  139,   70,   70,  128,   70,
-       72,  140,   70,  133,   72,   72,  138,   72,  141,   70,
-
-       72,  143,  149,   70,   70,  142,   70,   72,  132,   70,
-      144,   72,   72,  130,   72,  151,  145,   72,   70,   69,
-      146,  147,   66,   62,  152,   61,   72,   70,  148,  150,
-      156,  153,   70,  154,   70,   72,  155,   70,   70,   70,
-       72,   70,   72,   70,  157,   72,   72,   72,   70,   72,
-       70,   72,  403,  163,   70,   58,   72,  159,   72,   70,
-      158,  161,   72,  160,   58,  162,   70,   72,  164,  165,
-      168,   70,  166,  167,   72,   70,   70,   70,  170,   72,
-       70,   70,  169,   72,   72,   72,   70,   56,   72,   72,
-       56,   54,   70,  173,   72,  172,   70,   70,  174,  171,
-
-       72,  178,   70,   70,   72,   72,   54,   70,  403,  175,
-       72,   72,  403,  176,  181,   72,  179,  182,   70,  177,
-      180,   70,   70,  184,  403,   70,   72,  186,  183,   72,
-       72,  185,  188,   72,  190,  191,   70,   70,   70,   70,
-       70,  187,  403,  189,   72,   72,   72,   72,   72,  192,
-       70,  196,  403,   70,   70,  194,   70,  403,   72,  403,
-      197,   72,   72,  198,   72,  195,   70,  199,   70,   70,
-       70,  403,  193,  403,   72,  403,   72,   72,   72,  200,
-       70,  203,   70,  204,  403,  403,  205,   70,   72,  206,
-       72,   70,  207,  208,   70,   72,  209,  403,   70,   72,
-
-       70,   70,   72,   70,  403,  214,   72,   70,   72,   72,
-      403,   72,  216,   70,  210,   72,   70,   70,  211,  212,
-      220,   72,  213,  215,   72,   72,  217,  218,  221,   70,
-       70,   70,   70,  219,  403,  403,  403,   72,   72,   72,
-       72,   70,  223,  226,  222,   70,  224,   70,   70,   72,
-      227,  403,   70,   72,   70,   72,   72,   70,   70,  225,
-       72,  230,   72,  229,   70,   72,   72,  231,  228,  403,
-      233,   70,   72,  235,  403,   70,   70,  236,   70,   72,
-      234,  403,  232,   72,   72,   70,   72,   70,   70,  239,
-      237,  403,  240,   72,   70,   72,   72,  403,   70,  238,
-
-       70,  243,   72,  403,   70,  241,   72,   70,   72,  242,
-       70,  245,   72,   70,   70,   72,  246,   70,   72,  403,
-      244,   72,   72,   70,   70,   72,  403,  247,  403,   70,
-       70,   72,   72,   70,  250,   70,  252,   72,   72,  248,
-      403,   72,   70,   72,  403,   70,  403,  403,  249,   70,
-       72,   70,  251,   72,  255,  253,   70,   72,   70,   72,
-      254,  258,  259,  403,   72,  256,   72,  403,   70,  403,
-       70,  257,   70,  260,   70,  262,   72,  263,   72,   70,
-       72,  261,   72,   70,   70,   70,  403,   72,   70,   70,
-      403,   72,   72,   72,  266,   70,   72,   72,  265,  264,
-
-       70,   70,  267,   72,   70,  269,  270,  271,   72,   72,
-       70,  403,   72,   70,  272,   70,  403,  274,   72,  273,
-       70,   72,  277,   72,  278,   70,   70,  276,   72,  275,
-       70,  403,   70,   72,   72,   70,  403,   70,   72,  281,
-       72,   70,   70,   72,  283,   72,   70,  403,  279,   72,
-       72,  403,  403,  280,   72,  282,   70,   70,  284,  285,
-      286,   70,   70,   70,   72,   72,   70,   70,   70,   72,
-       72,   72,   70,  287,   72,   72,   72,   70,   70,  403,
-       72,  403,   70,  403,   70,   72,   72,  293,   70,  288,
-       72,  289,   72,  291,  292,   70,   72,   70,  290,   70,
-
-       70,   70,   70,   72,   70,   72,  294,   72,   72,   72,
-       72,   70,   72,   70,   70,   70,   70,  298,   70,   72,
-      295,   72,   72,   72,   72,   70,   72,  296,  302,   70,
-      297,   70,  403,   72,  403,  403,  304,   72,  303,   72,
-      299,  300,  305,  301,   70,  403,   70,   70,   70,   70,
-       70,  403,   72,  307,   72,   72,   72,   72,   72,  306,
-      308,   70,   70,   70,   70,  309,  310,   70,   70,   72,
-       72,   72,   72,  403,   70,   72,   72,  313,  311,  403,
-      315,  316,   72,  403,   70,   70,   70,  317,   70,   70,
-      312,  314,   72,   72,   72,   70,   72,   72,   70,   70,
-
-       70,   70,   70,   72,  403,  403,   72,   72,   72,   72,
-       72,  323,  319,  325,  320,   70,  403,   70,   70,  403,
-      403,  321,  403,   72,  322,   72,   72,  324,  326,  403,
-      327,   70,   70,   70,   70,   70,  403,  328,   70,   72,
-       72,   72,   72,   72,  329,  331,   72,  403,   70,  403,
-       70,   70,   70,   70,   70,  332,   72,  330,   72,   72,
-       72,   72,   72,   70,   70,  333,  335,   70,   70,   70,
-      336,   72,   72,  403,   70,   72,   72,   72,   70,  334,
-      339,  338,   72,   70,  403,   70,   72,   70,  403,  403,
-       70,   72,  337,   72,  343,   72,  341,  340,   72,   70,
-
-       70,  403,   70,   70,   70,   70,  342,   72,   72,  344,
-       72,   72,   72,   72,  349,  345,  403,  403,  403,   70,
-      403,   70,   70,   70,  350,  346,  348,   72,  347,   72,
-       72,   72,  351,   70,   70,  353,   70,   70,   70,   70,
-      403,   72,   72,  352,   72,   72,   72,   72,   70,   70,
-      354,   70,   70,   70,   70,   70,   72,   72,  403,   72,
-       72,   72,   72,   72,   70,  403,  356,   70,   70,  403,
-       70,  403,   72,  355,  357,   72,   72,  360,   72,  358,
-       70,  361,  359,  403,   70,   70,   70,   70,   72,   70,
-       70,  362,   72,   72,   72,   72,   70,   72,   72,   70,
-
-      403,   70,  403,   70,   72,   70,   70,   72,  364,   72,
-      363,   72,  368,   72,   72,   70,  366,  403,  365,   70,
-      369,   70,  403,   72,   70,  367,  403,   72,  370,   72,
-      371,   70,   72,   70,  373,   70,   70,  403,  403,   72,
-       70,   72,   70,   72,   72,  372,  374,   70,   72,   70,
-       72,  403,  403,   70,   70,   72,   70,   72,   70,  376,
-      377,   72,   72,   70,   72,   70,   72,   70,  375,  403,
-       70,   72,  403,   72,   70,   72,  403,  380,   72,   70,
-      379,   70,   72,   70,  378,  403,   70,   72,   70,   72,
-      403,   72,   70,  381,   72,  403,   72,  403,  382,   70,
-
-       72,   70,   70,  383,  403,  385,   70,   72,   70,   72,
-       72,  386,  384,   70,   72,   70,   72,   70,  389,   70,
-       70,   72,  403,   72,  387,   72,   70,   72,   72,   70,
-      390,   70,   70,   70,   72,   70,  388,   72,  403,   72,
-       72,   72,   70,   72,   70,   70,  395,  403,  391,   70,
-       72,  403,   72,   72,   70,  393,   70,   72,  396,  392,
-       70,   70,   72,   70,   72,   70,   70,  394,   72,   72,
-       70,   72,   70,   72,   72,  400,  397,  403,   72,  401,
-       72,  403,  403,  403,  399,  403,  403,  403,  403,  403,
-      398,  403,  403,  403,  403,  403,  402,   53,   53,   53,
-
-       53,   53,   53,   53,   53,   53,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   57,   57,   57,   57,   57,
-       57,   57,   57,   57,   60,  403,   60,   65,   65,   65,
-       71,   71,  403,   71,  125,  125,  125,  125,  403,  125,
-      125,  125,  125,  126,  126,  126,  126,  126,  126,  126,
-      126,  126,  129,  129,  129,  403,  129,  129,  129,  129,
-      129,  131,  403,  131,  131,  131,  131,  131,  131,  131,
-      135,  403,  403,  403,  403,  403,  135,   72,   72,  403,
-       72,  202,  403,  202,    9,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403
+       38,   38,   38,   51,   52,   59,   59,   59,   59,   63,
+       70,   64,   67,   68,   70,   70,   70,   63,   72,   64,
+       70,  121,   72,   72,   72,   70,  122,   75,   72,   83,
+       70,   76,   73,   72,   70,  129,   78,   74,   72,  306,
+       79,  266,   72,   80,  306,   70,   81,   77,   91,   82,
+
+       84,  104,   85,   72,  231,   70,   92,   70,   87,   70,
+      181,   93,   86,   72,  127,   72,  126,   72,   88,   70,
+      121,   89,   94,  124,   90,  122,   95,   72,   97,   70,
+       98,   70,   96,  100,   59,   59,   99,   72,   70,   72,
+       70,  101,  105,  102,  107,  103,   70,  108,   72,   70,
+       70,  128,  106,   70,   72,  111,  109,   72,   72,  116,
+      110,   72,  112,  306,   70,  130,   70,   70,   70,  113,
+       70,  114,   72,  115,   72,   72,   72,  131,   72,  127,
+      117,   70,  132,  133,   70,   70,   70,  118,   70,   72,
+      134,   70,   72,   72,   72,   70,   72,   70,  140,   72,
+
+      126,  124,  142,   72,   69,   72,   66,  135,   70,  137,
+      138,  143,  141,  136,  147,   70,   72,  139,  144,   70,
+      146,   70,  145,   72,   70,   70,   70,   72,   70,   72,
+       62,   61,   72,   72,   72,  306,   72,   58,  152,   70,
+       70,   70,   58,  148,  150,  149,  151,   72,   72,   72,
+       70,   56,  157,  153,  154,   70,   56,   70,   72,  156,
+       70,  155,  159,   72,  158,   72,   70,   70,   72,   54,
+       70,   70,   54,   70,   72,   72,   70,  161,   72,   72,
+      162,   72,  163,  160,   72,   70,  306,   70,  306,   70,
+      306,   70,   70,   72,  164,   72,  166,   72,  169,   72,
+
+       72,  165,  171,   70,   70,  167,  306,  170,  306,   70,
+       70,   72,   72,  168,  172,   70,  173,   72,   72,   70,
+       70,   70,  176,   72,  306,  174,  175,   72,   72,   72,
+       70,   70,  178,   70,   70,  177,  179,   70,   72,   72,
+      306,   72,   72,   70,   70,   72,  180,   70,  183,   70,
+      184,   72,   72,   70,  306,   72,  306,   72,  189,   70,
+      185,   72,  191,  306,  186,  188,   70,   72,   70,   70,
+      187,  190,  306,  306,   72,   70,   72,   72,  306,  195,
+      196,   70,   70,   72,   70,  192,  193,  306,  194,   72,
+       72,   70,   72,   70,  197,  200,   70,   70,  198,   72,
+
+       70,   72,  306,   70,   72,   72,  306,  202,   72,   70,
+      199,   72,  306,  203,  201,   70,  204,   72,   70,   70,
+      206,   70,   70,   72,  207,   70,   72,   72,  208,   72,
+       72,  205,   70,   72,  211,  306,  212,  209,   70,   70,
+       72,   70,  306,  210,   70,  213,   72,   72,   70,   72,
+      216,  215,   72,  306,  214,   70,   72,   70,   70,   70,
+       70,  219,  306,   72,  218,   72,   72,   72,   72,   70,
+      217,   70,  306,  306,   70,  306,   70,   72,  306,   72,
+      222,  224,   72,  220,   72,  226,  221,   70,   70,   70,
+       70,  223,   70,   70,   70,   72,   72,   72,   72,  225,
+
+       72,   72,   72,  306,  306,   70,  306,  306,  306,  229,
+      306,  230,  232,   72,  228,  233,  227,   70,  234,   70,
+       70,  306,   70,   70,   70,   72,   70,   72,   72,  237,
+       72,   72,   72,   70,   72,   70,  236,  240,   70,   70,
+       70,   72,  242,   72,   70,  235,   72,   72,   72,  241,
+      238,  239,   72,   70,  244,  306,   70,   70,   70,   70,
+       70,   72,   70,  243,   72,   72,   72,   72,   72,  245,
+       72,   70,   70,   70,   70,   70,  306,  306,  306,   72,
+       72,   72,   72,   72,   70,  246,  248,   70,  249,   70,
+      247,  306,   72,   70,   70,   72,   70,   72,   70,  250,
+
+      306,   72,   72,   70,   72,   70,   72,  251,  255,  253,
+      306,   72,  306,   72,  256,   70,   70,   70,  257,  252,
+      254,  306,   70,   72,   72,   72,   70,   70,   70,  259,
+       72,  306,  306,   70,   72,   72,   72,   70,  306,  260,
+      263,   72,  306,  258,   70,   72,  264,  306,  306,   70,
+      265,   70,   72,   70,   70,  261,  262,   72,   70,   72,
+       70,   72,   72,   70,   70,   70,   72,  268,   72,  306,
+       70,   72,   72,   72,   70,   70,   70,  271,   72,  267,
+      306,  306,   72,   72,   72,   70,  269,  272,  270,  275,
+       70,   70,  306,   72,   70,   70,  273,   70,   72,   72,
+
+      274,   70,   72,   72,   70,   72,   70,  276,   70,   72,
+      306,   70,   72,  278,   72,   70,   72,  282,  280,   72,
+       70,   70,  277,   72,   70,  306,   70,   70,   72,   72,
+      279,   70,   72,  281,   72,   72,  306,   70,   70,   72,
+      286,   70,   70,  283,  287,   72,   72,  284,  285,   72,
+       72,   70,   70,   70,   70,   70,  306,   70,   70,   72,
+       72,   72,   72,   72,  288,   72,   72,   70,   70,  306,
+       70,  291,   70,   70,   70,   72,   72,  289,   72,   70,
+       72,   72,   72,  290,   70,   70,   70,   72,  306,   70,
+      306,  292,   72,   72,   72,  293,  295,   72,  296,   70,
+
+       70,   70,   70,  294,   70,   70,   70,   72,   72,   72,
+       72,   70,   72,   72,   72,  297,   70,   70,   70,   72,
+      306,   70,   70,  299,   72,   72,   72,   70,  298,   72,
+       72,   70,   70,  303,  306,   72,  301,  306,   70,   72,
+       72,   70,  300,   70,  302,  304,   72,   70,  306,   72,
+      306,   72,  306,  306,  306,   72,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  305,   53,   53,   53,   53,   53,   53,   53,   53,
+       53,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   60,
+
+      306,   60,   65,   65,   65,   71,   71,  306,   71,  119,
+      119,  119,  119,  306,  119,  119,  119,  119,  120,  120,
+      120,  120,  120,  120,  120,  120,  120,  123,  123,  123,
+      306,  123,  123,  123,  123,  123,  125,  306,  125,  125,
+      125,  125,  125,  125,  125,  129,  306,  306,  306,  306,
+      306,  129,   72,   72,  306,   72,  182,  306,  182,    9,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306
     } ;
 
-static const flex_int16_t yy_chk[1342] =
+static const flex_int16_t yy_chk[1016] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    1,    1,    1,    1,   11,   11,   12,   12,
-       25,   32,   25,   28,   28,   33,   38,   35,   49,   32,
-       64,   34,   64,   33,   38,   35,   49,   49,   33,   34,
-       35,   36,   33,   32,   35,   33,  318,   34,   32,   36,
-      268,   34,   37,  201,   34,   37,   39,   34,   33,   37,
-
-       34,   36,   37,   36,   39,   37,   41,   40,   37,   42,
-       39,   43,  134,   36,   41,   40,   54,   42,   39,   43,
-       40,   54,  126,   39,   40,   43,   44,  126,   45,   41,
-       40,   46,   42,   43,   44,   43,   45,   43,   42,   46,
-       43,   45,   59,   59,   46,   47,  133,   46,  132,   48,
-       45,   45,   44,   47,   47,   71,   46,   48,   50,  130,
-       46,   47,   72,   71,   46,   70,   50,   73,   47,   74,
-       75,   48,   65,   48,   50,   73,   76,   74,   75,   73,
-       74,   50,   77,  127,   76,   75,   78,   80,  127,   82,
-       77,   76,   79,   63,   78,   80,   74,   82,   76,   81,
-
-       79,   79,   82,   83,   84,   77,   85,   81,   58,   86,
-       80,   83,   84,   56,   85,   84,   80,   86,   87,   30,
-       81,   81,   26,   24,   84,   23,   87,   88,   81,   83,
-       87,   84,   89,   85,   90,   88,   86,   91,   92,   94,
-       89,   95,   90,   93,   88,   91,   92,   94,   96,   95,
-       97,   93,    9,   95,   98,    8,   96,   90,   97,   99,
-       89,   92,   98,   91,    7,   93,  100,   99,   95,   95,
-       99,  101,   97,   98,  100,  102,  103,  104,  100,  101,
-      105,  107,   99,  102,  103,  104,  106,    6,  105,  107,
-        5,    4,  109,  105,  106,  102,  108,  111,  106,  101,
-
-      109,  109,  110,  112,  108,  111,    3,  116,    0,  107,
-      110,  112,    0,  108,  110,  116,  109,  111,  113,  108,
-      109,  114,  115,  112,    0,  117,  113,  113,  111,  114,
-      115,  112,  115,  117,  116,  117,  118,  119,  120,  121,
-      122,  114,    0,  115,  118,  119,  120,  121,  122,  118,
-      123,  121,    0,  124,  136,  120,  137,    0,  123,    0,
-      122,  124,  136,  123,  137,  120,  139,  123,  138,  140,
-      143,    0,  119,    0,  139,    0,  138,  140,  143,  124,
-      141,  138,  142,  139,    0,    0,  140,  144,  141,  141,
-      142,  145,  142,  142,  147,  144,  143,    0,  146,  145,
-
-      150,  148,  147,  149,    0,  147,  146,  152,  150,  148,
-        0,  149,  149,  151,  144,  152,  154,  153,  145,  146,
-      152,  151,  146,  148,  154,  153,  150,  150,  153,  155,
-      156,  157,  158,  151,    0,    0,    0,  155,  156,  157,
-      158,  159,  155,  158,  154,  160,  155,  161,  163,  159,
-      159,    0,  162,  160,  164,  161,  163,  165,  166,  157,
-      162,  163,  164,  162,  167,  165,  166,  164,  161,    0,
-      165,  168,  167,  166,    0,  169,  170,  167,  171,  168,
-      165,    0,  164,  169,  170,  172,  171,  173,  174,  170,
-      168,    0,  171,  172,  175,  173,  174,    0,  176,  169,
-
-      177,  174,  175,    0,  178,  172,  176,  179,  177,  173,
-      180,  177,  178,  181,  182,  179,  178,  183,  180,    0,
-      176,  181,  182,  184,  185,  183,    0,  179,    0,  186,
-      187,  184,  185,  188,  182,  189,  184,  186,  187,  180,
-        0,  188,  190,  189,    0,  191,    0,    0,  181,  192,
-      190,  193,  183,  191,  190,  186,  194,  192,  195,  193,
-      188,  193,  193,    0,  194,  191,  195,    0,  196,    0,
-      197,  192,  198,  193,  199,  195,  196,  196,  197,  203,
-      198,  194,  199,  200,  204,  205,    0,  203,  206,  207,
-        0,  200,  204,  205,  199,  209,  206,  207,  198,  197,
-
-      208,  211,  200,  209,  210,  203,  204,  205,  208,  211,
-      212,    0,  210,  213,  206,  214,    0,  210,  212,  208,
-      215,  213,  213,  214,  214,  216,  217,  212,  215,  211,
-      220,    0,  218,  216,  217,  219,    0,  221,  220,  217,
-      218,  223,  222,  219,  219,  221,  224,    0,  215,  223,
-      222,    0,    0,  216,  224,  218,  225,  226,  220,  222,
-      224,  227,  228,  229,  225,  226,  230,  231,  232,  227,
-      228,  229,  233,  226,  230,  231,  232,  234,  235,    0,
-      233,    0,  236,    0,  237,  234,  235,  233,  238,  227,
-      236,  229,  237,  231,  232,  239,  238,  240,  230,  241,
-
-      242,  243,  244,  239,  245,  240,  235,  241,  242,  243,
-      244,  246,  245,  247,  251,  248,  249,  245,  250,  246,
-      240,  247,  251,  248,  249,  252,  250,  243,  250,  253,
-      244,  254,    0,  252,    0,    0,  252,  253,  251,  254,
-      247,  248,  253,  249,  255,    0,  257,  256,  258,  260,
-      259,    0,  255,  255,  257,  256,  258,  260,  259,  254,
-      256,  261,  262,  263,  267,  258,  259,  264,  265,  261,
-      262,  263,  267,    0,  266,  264,  265,  262,  260,    0,
-      264,  265,  266,    0,  269,  270,  271,  266,  272,  273,
-      261,  263,  269,  270,  271,  274,  272,  273,  275,  276,
-
-      278,  279,  277,  274,    0,    0,  275,  276,  278,  279,
-      277,  275,  269,  277,  271,  281,    0,  280,  282,    0,
-        0,  272,    0,  281,  273,  280,  282,  276,  278,    0,
-      280,  283,  284,  285,  286,  287,    0,  281,  288,  283,
-      284,  285,  286,  287,  282,  284,  288,    0,  289,    0,
-      290,  291,  292,  293,  294,  285,  289,  283,  290,  291,
-      292,  293,  294,  295,  296,  289,  293,  297,  298,  299,
-      294,  295,  296,    0,  300,  297,  298,  299,  301,  291,
-      298,  297,  300,  303,    0,  302,  301,  304,    0,    0,
-      305,  303,  295,  302,  302,  304,  300,  299,  305,  306,
-
-      307,    0,  308,  311,  309,  310,  301,  306,  307,  303,
-      308,  311,  309,  310,  310,  304,    0,    0,    0,  312,
-        0,  313,  314,  315,  311,  306,  309,  312,  307,  313,
-      314,  315,  312,  316,  317,  314,  319,  320,  321,  322,
-        0,  316,  317,  313,  319,  320,  321,  322,  323,  324,
-      315,  325,  326,  327,  328,  329,  323,  324,    0,  325,
-      326,  327,  328,  329,  330,    0,  322,  331,  333,    0,
-      332,    0,  330,  321,  323,  331,  333,  330,  332,  325,
-      334,  332,  328,    0,  335,  336,  337,  338,  334,  339,
-      340,  333,  335,  336,  337,  338,  341,  339,  340,  342,
-
-        0,  343,    0,  344,  341,  345,  346,  342,  337,  343,
-      335,  344,  343,  345,  346,  347,  340,    0,  339,  349,
-      344,  348,    0,  347,  350,  342,    0,  349,  347,  348,
-      348,  351,  350,  352,  350,  353,  354,    0,    0,  351,
-      355,  352,  356,  353,  354,  349,  352,  357,  355,  358,
-      356,    0,    0,  359,  360,  357,  361,  358,  362,  356,
-      357,  359,  360,  363,  361,  364,  362,  365,  355,    0,
-      366,  363,    0,  364,  367,  365,    0,  364,  366,  368,
-      362,  369,  367,  370,  361,    0,  371,  368,  372,  369,
-        0,  370,  373,  365,  371,    0,  372,    0,  368,  374,
-
-      373,  375,  376,  369,    0,  373,  377,  374,  378,  375,
-      376,  374,  371,  379,  377,  380,  378,  381,  377,  382,
-      383,  379,    0,  380,  375,  381,  384,  382,  383,  385,
-      381,  386,  387,  388,  384,  389,  376,  385,    0,  386,
-      387,  388,  390,  389,  391,  392,  388,    0,  383,  393,
-      390,    0,  391,  392,  394,  385,  395,  393,  391,  384,
-      396,  397,  394,  398,  395,  399,  400,  387,  396,  397,
-      401,  398,  402,  399,  400,  399,  394,    0,  401,  400,
-      402,    0,    0,    0,  398,    0,    0,    0,    0,    0,
-      397,    0,    0,    0,    0,    0,  401,  404,  404,  404,
-
-      404,  404,  404,  404,  404,  404,  405,  405,  405,  405,
-      405,  405,  405,  405,  405,  406,  406,  406,  406,  406,
-      406,  406,  406,  406,  407,    0,  407,  408,  408,  408,
-      409,  409,    0,  409,  410,  410,  410,  410,    0,  410,
-      410,  410,  410,  411,  411,  411,  411,  411,  411,  411,
-      411,  411,  412,  412,  412,    0,  412,  412,  412,  412,
-      412,  413,    0,  413,  413,  413,  413,  413,  413,  413,
-      414,    0,    0,    0,    0,    0,  414,  415,  415,    0,
-      415,  416,    0,  416,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
-      403
+        1,    1,    1,    1,    1,   11,   11,   12,   12,   25,
+       32,   25,   28,   28,   33,   38,   35,   64,   32,   64,
+       34,   54,   33,   38,   35,   44,   54,   33,   34,   35,
+       36,   33,   32,   44,   39,  266,   34,   32,   36,  120,
+       34,  231,   39,   34,  120,   37,   34,   33,   39,   34,
+
+       36,   44,   36,   37,  181,   41,   39,   42,   37,   40,
+      128,   39,   36,   41,  127,   42,  126,   40,   37,   43,
+      121,   37,   40,  124,   37,  121,   40,   43,   41,   45,
+       42,   46,   40,   43,   59,   59,   42,   45,   72,   46,
+       71,   43,   45,   43,   46,   43,   47,   46,   71,   48,
+       49,   70,   45,   73,   47,   47,   46,   48,   49,   49,
+       46,   73,   47,   65,   50,   73,   74,   75,   76,   47,
+       77,   48,   50,   48,   74,   75,   76,   74,   77,   63,
+       50,   78,   75,   76,   79,   81,   82,   50,   80,   78,
+       78,   83,   79,   81,   82,   84,   80,   86,   81,   83,
+
+       58,   56,   83,   84,   30,   86,   26,   79,   85,   80,
+       80,   83,   82,   79,   86,   87,   85,   80,   83,   88,
+       85,   89,   84,   87,   90,   91,   92,   88,   93,   89,
+       24,   23,   90,   91,   92,    9,   93,    8,   92,   94,
+       95,   96,    7,   87,   89,   88,   90,   94,   95,   96,
+       97,    6,   96,   92,   92,   98,    5,   99,   97,   95,
+      100,   94,   97,   98,   96,   99,  101,  102,  100,    4,
+      103,  104,    3,  105,  101,  102,  106,   99,  103,  104,
+      102,  105,  103,   98,  106,  107,    0,  109,    0,  108,
+        0,  113,  110,  107,  104,  109,  106,  108,  108,  113,
+
+      110,  105,  110,  112,  111,  107,    0,  109,    0,  114,
+      115,  112,  111,  107,  111,  116,  112,  114,  115,  117,
+      118,  130,  115,  116,    0,  113,  114,  117,  118,  130,
+      131,  132,  117,  133,  134,  116,  117,  135,  131,  132,
+        0,  133,  134,  136,  137,  135,  118,  138,  132,  139,
+      133,  136,  137,  140,    0,  138,    0,  139,  138,  141,
+      134,  140,  140,    0,  135,  137,  143,  141,  142,  144,
+      136,  139,    0,    0,  143,  146,  142,  144,    0,  143,
+      144,  145,  147,  146,  148,  141,  141,    0,  142,  145,
+      147,  149,  148,  150,  145,  148,  151,  154,  145,  149,
+
+      152,  150,    0,  153,  151,  154,    0,  151,  152,  155,
+      147,  153,    0,  152,  150,  156,  153,  155,  157,  158,
+      154,  159,  160,  156,  155,  161,  157,  158,  156,  159,
+      160,  153,  162,  161,  159,    0,  160,  157,  163,  164,
+      162,  165,    0,  158,  166,  161,  163,  164,  167,  165,
+      164,  163,  166,    0,  162,  168,  167,  169,  170,  171,
+      172,  167,    0,  168,  166,  169,  170,  171,  172,  173,
+      165,  174,    0,    0,  175,    0,  176,  173,    0,  174,
+      172,  174,  175,  169,  176,  176,  171,  177,  178,  179,
+      183,  173,  180,  184,  185,  177,  178,  179,  183,  175,
+
+      180,  184,  185,    0,    0,  186,    0,    0,    0,  179,
+        0,  180,  183,  186,  178,  184,  177,  187,  186,  188,
+      189,    0,  190,  191,  192,  187,  193,  188,  189,  189,
+      190,  191,  192,  194,  193,  195,  188,  192,  196,  197,
+      198,  194,  194,  195,  199,  187,  196,  197,  198,  193,
+      190,  191,  199,  200,  198,    0,  201,  202,  203,  206,
+      204,  200,  205,  195,  201,  202,  203,  206,  204,  200,
+      205,  207,  208,  209,  210,  211,    0,    0,    0,  207,
+      208,  209,  210,  211,  212,  202,  204,  213,  205,  214,
+      203,    0,  212,  215,  217,  213,  216,  214,  218,  207,
+
+        0,  215,  217,  219,  216,  220,  218,  212,  218,  216,
+        0,  219,    0,  220,  219,  221,  222,  223,  220,  215,
+      217,    0,  224,  221,  222,  223,  225,  227,  226,  222,
+      224,    0,    0,  228,  225,  227,  226,  229,    0,  224,
+      227,  228,    0,  221,  230,  229,  228,    0,    0,  232,
+      229,  233,  230,  234,  235,  225,  226,  232,  236,  233,
+      237,  234,  235,  238,  239,  240,  236,  235,  237,    0,
+      241,  238,  239,  240,  242,  244,  243,  239,  241,  233,
+        0,    0,  242,  244,  243,  245,  236,  240,  237,  243,
+      246,  247,    0,  245,  248,  249,  241,  250,  246,  247,
+
+      242,  251,  248,  249,  252,  250,  253,  246,  255,  251,
+        0,  254,  252,  250,  253,  256,  255,  255,  253,  254,
+      257,  258,  248,  256,  259,    0,  260,  261,  257,  258,
+      251,  262,  259,  254,  260,  261,    0,  263,  264,  262,
+      261,  265,  267,  256,  262,  263,  264,  258,  260,  265,
+      267,  268,  269,  270,  271,  272,    0,  273,  274,  268,
+      269,  270,  271,  272,  263,  273,  274,  275,  276,    0,
+      277,  274,  278,  279,  280,  275,  276,  268,  277,  281,
+      278,  279,  280,  272,  283,  282,  284,  281,    0,  285,
+        0,  276,  283,  282,  284,  279,  282,  285,  285,  286,
+
+      287,  288,  289,  280,  290,  291,  292,  286,  287,  288,
+      289,  293,  290,  291,  292,  289,  294,  295,  296,  293,
+        0,  297,  298,  293,  294,  295,  296,  299,  292,  297,
+      298,  301,  300,  297,    0,  299,  295,    0,  302,  301,
+      300,  303,  294,  304,  296,  300,  302,  305,    0,  303,
+        0,  304,    0,    0,    0,  305,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,  302,  307,  307,  307,  307,  307,  307,  307,  307,
+      307,  308,  308,  308,  308,  308,  308,  308,  308,  308,
+      309,  309,  309,  309,  309,  309,  309,  309,  309,  310,
+
+        0,  310,  311,  311,  311,  312,  312,    0,  312,  313,
+      313,  313,  313,    0,  313,  313,  313,  313,  314,  314,
+      314,  314,  314,  314,  314,  314,  314,  315,  315,  315,
+        0,  315,  315,  315,  315,  315,  316,    0,  316,  316,
+      316,  316,  316,  316,  316,  317,    0,    0,    0,    0,
+        0,  317,  318,  318,    0,  318,  319,    0,  319,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+
+      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
+      306,  306,  306,  306,  306
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -961,9 +856,9 @@
 	stringbuf_len += len;
 }
 
-#line 964 "lexyy.cc"
+#line 859 "lexyy.cc"
 
-#line 966 "lexyy.cc"
+#line 861 "lexyy.cc"
 
 #define INITIAL 0
 #define comment 1
@@ -1184,7 +1079,7 @@
 #line 112 "pars0lex.l"
 
 
-#line 1187 "lexyy.cc"
+#line 1082 "lexyy.cc"
 
 	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
 		{
@@ -1211,13 +1106,13 @@
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 404 )
+				if ( yy_current_state >= 307 )
 					yy_c = yy_meta[yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
 			++yy_cp;
 			}
-		while ( yy_current_state != 403 );
+		while ( yy_current_state != 306 );
 		yy_cp = (yy_last_accepting_cpos);
 		yy_current_state = (yy_last_accepting_state);
 
@@ -1436,554 +1331,407 @@
 YY_RULE_SETUP
 #line 252 "pars0lex.l"
 {
-			return(PARS_OUT_TOKEN);
+			return(PARS_INT_TOKEN);
 }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 256 "pars0lex.l"
 {
-			return(PARS_BINARY_TOKEN);
+			return(PARS_CHAR_TOKEN);
 }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 260 "pars0lex.l"
 {
-			return(PARS_BLOB_TOKEN);
+			return(PARS_IS_TOKEN);
 }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 264 "pars0lex.l"
 {
-			return(PARS_INT_TOKEN);
+			return(PARS_BEGIN_TOKEN);
 }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 268 "pars0lex.l"
 {
-			return(PARS_INT_TOKEN);
+			return(PARS_END_TOKEN);
 }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 272 "pars0lex.l"
 {
-			return(PARS_FLOAT_TOKEN);
+			return(PARS_IF_TOKEN);
 }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 276 "pars0lex.l"
 {
-			return(PARS_CHAR_TOKEN);
+			return(PARS_THEN_TOKEN);
 }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 280 "pars0lex.l"
 {
-			return(PARS_IS_TOKEN);
+			return(PARS_ELSE_TOKEN);
 }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 284 "pars0lex.l"
 {
-			return(PARS_BEGIN_TOKEN);
+			return(PARS_ELSIF_TOKEN);
 }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 288 "pars0lex.l"
 {
-			return(PARS_END_TOKEN);
+			return(PARS_LOOP_TOKEN);
 }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 292 "pars0lex.l"
 {
-			return(PARS_IF_TOKEN);
+			return(PARS_WHILE_TOKEN);
 }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 296 "pars0lex.l"
 {
-			return(PARS_THEN_TOKEN);
+			return(PARS_RETURN_TOKEN);
 }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 300 "pars0lex.l"
 {
-			return(PARS_ELSE_TOKEN);
+			return(PARS_SELECT_TOKEN);
 }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 304 "pars0lex.l"
 {
-			return(PARS_ELSIF_TOKEN);
+			return(PARS_COUNT_TOKEN);
 }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 308 "pars0lex.l"
 {
-			return(PARS_LOOP_TOKEN);
+			return(PARS_FROM_TOKEN);
 }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 312 "pars0lex.l"
 {
-			return(PARS_WHILE_TOKEN);
+			return(PARS_WHERE_TOKEN);
 }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 316 "pars0lex.l"
 {
-			return(PARS_RETURN_TOKEN);
+			return(PARS_FOR_TOKEN);
 }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 320 "pars0lex.l"
 {
-			return(PARS_SELECT_TOKEN);
+			return(PARS_ORDER_TOKEN);
 }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 324 "pars0lex.l"
 {
-			return(PARS_SUM_TOKEN);
+			return(PARS_BY_TOKEN);
 }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 328 "pars0lex.l"
 {
-			return(PARS_COUNT_TOKEN);
+			return(PARS_ASC_TOKEN);
 }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 332 "pars0lex.l"
 {
-			return(PARS_DISTINCT_TOKEN);
+			return(PARS_DESC_TOKEN);
 }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 336 "pars0lex.l"
 {
-			return(PARS_FROM_TOKEN);
+			return(PARS_INSERT_TOKEN);
 }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 340 "pars0lex.l"
 {
-			return(PARS_WHERE_TOKEN);
+			return(PARS_INTO_TOKEN);
 }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 344 "pars0lex.l"
 {
-			return(PARS_FOR_TOKEN);
+			return(PARS_VALUES_TOKEN);
 }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 348 "pars0lex.l"
 {
-			return(PARS_READ_TOKEN);
+			return(PARS_UPDATE_TOKEN);
 }
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 352 "pars0lex.l"
 {
-			return(PARS_ORDER_TOKEN);
+			return(PARS_SET_TOKEN);
 }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 356 "pars0lex.l"
 {
-			return(PARS_BY_TOKEN);
+			return(PARS_DELETE_TOKEN);
 }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 360 "pars0lex.l"
 {
-			return(PARS_ASC_TOKEN);
+			return(PARS_CURRENT_TOKEN);
 }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 364 "pars0lex.l"
 {
-			return(PARS_DESC_TOKEN);
+			return(PARS_OF_TOKEN);
 }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 368 "pars0lex.l"
 {
-			return(PARS_INSERT_TOKEN);
+			return(PARS_CREATE_TOKEN);
 }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 372 "pars0lex.l"
 {
-			return(PARS_INTO_TOKEN);
+			return(PARS_TABLE_TOKEN);
 }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 376 "pars0lex.l"
 {
-			return(PARS_VALUES_TOKEN);
+			return(PARS_INDEX_TOKEN);
 }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 380 "pars0lex.l"
 {
-			return(PARS_UPDATE_TOKEN);
+			return(PARS_UNIQUE_TOKEN);
 }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
 #line 384 "pars0lex.l"
 {
-			return(PARS_SET_TOKEN);
+			return(PARS_CLUSTERED_TOKEN);
 }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
 #line 388 "pars0lex.l"
 {
-			return(PARS_DELETE_TOKEN);
+			return(PARS_ON_TOKEN);
 }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 392 "pars0lex.l"
 {
-			return(PARS_CURRENT_TOKEN);
+			return(PARS_DECLARE_TOKEN);
 }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
 #line 396 "pars0lex.l"
 {
-			return(PARS_OF_TOKEN);
+			return(PARS_CURSOR_TOKEN);
 }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
 #line 400 "pars0lex.l"
 {
-			return(PARS_CREATE_TOKEN);
+			return(PARS_OPEN_TOKEN);
 }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
 #line 404 "pars0lex.l"
 {
-			return(PARS_TABLE_TOKEN);
+			return(PARS_FETCH_TOKEN);
 }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
 #line 408 "pars0lex.l"
 {
-			return(PARS_COMPACT_TOKEN);
+			return(PARS_CLOSE_TOKEN);
 }
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
 #line 412 "pars0lex.l"
 {
-			return(PARS_BLOCK_SIZE_TOKEN);
+			return(PARS_NOTFOUND_TOKEN);
 }
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
 #line 416 "pars0lex.l"
 {
-			return(PARS_INDEX_TOKEN);
+			return(PARS_TO_BINARY_TOKEN);
 }
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
 #line 420 "pars0lex.l"
 {
-			return(PARS_UNIQUE_TOKEN);
+			return(PARS_SUBSTR_TOKEN);
 }
 	YY_BREAK
 case 61:
 YY_RULE_SETUP
 #line 424 "pars0lex.l"
 {
-			return(PARS_CLUSTERED_TOKEN);
+			return(PARS_CONCAT_TOKEN);
 }
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
 #line 428 "pars0lex.l"
 {
-			return(PARS_ON_TOKEN);
+			return(PARS_INSTR_TOKEN);
 }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
 #line 432 "pars0lex.l"
 {
-			return(PARS_DECLARE_TOKEN);
+			return(PARS_LENGTH_TOKEN);
 }
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
 #line 436 "pars0lex.l"
 {
-			return(PARS_CURSOR_TOKEN);
+			return(PARS_COMMIT_TOKEN);
 }
 	YY_BREAK
 case 65:
 YY_RULE_SETUP
 #line 440 "pars0lex.l"
 {
-			return(PARS_OPEN_TOKEN);
+			return(PARS_ROLLBACK_TOKEN);
 }
 	YY_BREAK
 case 66:
 YY_RULE_SETUP
 #line 444 "pars0lex.l"
 {
-			return(PARS_FETCH_TOKEN);
+			return(PARS_WORK_TOKEN);
 }
 	YY_BREAK
 case 67:
 YY_RULE_SETUP
 #line 448 "pars0lex.l"
 {
-			return(PARS_CLOSE_TOKEN);
+			return(PARS_EXIT_TOKEN);
 }
 	YY_BREAK
 case 68:
 YY_RULE_SETUP
 #line 452 "pars0lex.l"
 {
-			return(PARS_NOTFOUND_TOKEN);
+			return(PARS_FUNCTION_TOKEN);
 }
 	YY_BREAK
 case 69:
 YY_RULE_SETUP
 #line 456 "pars0lex.l"
 {
-			return(PARS_TO_CHAR_TOKEN);
+			return(PARS_LOCK_TOKEN);
 }
 	YY_BREAK
 case 70:
 YY_RULE_SETUP
 #line 460 "pars0lex.l"
 {
-			return(PARS_TO_NUMBER_TOKEN);
+			return(PARS_SHARE_TOKEN);
 }
 	YY_BREAK
 case 71:
 YY_RULE_SETUP
 #line 464 "pars0lex.l"
 {
-			return(PARS_TO_BINARY_TOKEN);
+			return(PARS_MODE_TOKEN);
 }
 	YY_BREAK
 case 72:
 YY_RULE_SETUP
 #line 468 "pars0lex.l"
 {
-			return(PARS_BINARY_TO_NUMBER_TOKEN);
+                        return(PARS_LIKE_TOKEN);
 }
 	YY_BREAK
 case 73:
 YY_RULE_SETUP
 #line 472 "pars0lex.l"
 {
-			return(PARS_SUBSTR_TOKEN);
+			return(PARS_BIGINT_TOKEN);
 }
 	YY_BREAK
 case 74:
 YY_RULE_SETUP
 #line 476 "pars0lex.l"
 {
-			return(PARS_REPLSTR_TOKEN);
-}
-	YY_BREAK
-case 75:
-YY_RULE_SETUP
-#line 480 "pars0lex.l"
-{
-			return(PARS_CONCAT_TOKEN);
-}
-	YY_BREAK
-case 76:
-YY_RULE_SETUP
-#line 484 "pars0lex.l"
-{
-			return(PARS_INSTR_TOKEN);
-}
-	YY_BREAK
-case 77:
-YY_RULE_SETUP
-#line 488 "pars0lex.l"
-{
-			return(PARS_LENGTH_TOKEN);
-}
-	YY_BREAK
-case 78:
-YY_RULE_SETUP
-#line 492 "pars0lex.l"
-{
-			return(PARS_SYSDATE_TOKEN);
-}
-	YY_BREAK
-case 79:
-YY_RULE_SETUP
-#line 496 "pars0lex.l"
-{
-			return(PARS_PRINTF_TOKEN);
-}
-	YY_BREAK
-case 80:
-YY_RULE_SETUP
-#line 500 "pars0lex.l"
-{
-			return(PARS_ASSERT_TOKEN);
-}
-	YY_BREAK
-case 81:
-YY_RULE_SETUP
-#line 504 "pars0lex.l"
-{
-			return(PARS_RND_TOKEN);
-}
-	YY_BREAK
-case 82:
-YY_RULE_SETUP
-#line 508 "pars0lex.l"
-{
-			return(PARS_RND_STR_TOKEN);
-}
-	YY_BREAK
-case 83:
-YY_RULE_SETUP
-#line 512 "pars0lex.l"
-{
-			return(PARS_ROW_PRINTF_TOKEN);
-}
-	YY_BREAK
-case 84:
-YY_RULE_SETUP
-#line 516 "pars0lex.l"
-{
-			return(PARS_COMMIT_TOKEN);
-}
-	YY_BREAK
-case 85:
-YY_RULE_SETUP
-#line 520 "pars0lex.l"
-{
-			return(PARS_ROLLBACK_TOKEN);
-}
-	YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 524 "pars0lex.l"
-{
-			return(PARS_WORK_TOKEN);
-}
-	YY_BREAK
-case 87:
-YY_RULE_SETUP
-#line 528 "pars0lex.l"
-{
-			return(PARS_UNSIGNED_TOKEN);
-}
-	YY_BREAK
-case 88:
-YY_RULE_SETUP
-#line 532 "pars0lex.l"
-{
-			return(PARS_EXIT_TOKEN);
-}
-	YY_BREAK
-case 89:
-YY_RULE_SETUP
-#line 536 "pars0lex.l"
-{
-			return(PARS_FUNCTION_TOKEN);
-}
-	YY_BREAK
-case 90:
-YY_RULE_SETUP
-#line 540 "pars0lex.l"
-{
-			return(PARS_LOCK_TOKEN);
-}
-	YY_BREAK
-case 91:
-YY_RULE_SETUP
-#line 544 "pars0lex.l"
-{
-			return(PARS_SHARE_TOKEN);
-}
-	YY_BREAK
-case 92:
-YY_RULE_SETUP
-#line 548 "pars0lex.l"
-{
-			return(PARS_MODE_TOKEN);
-}
-	YY_BREAK
-case 93:
-YY_RULE_SETUP
-#line 552 "pars0lex.l"
-{
-                        return(PARS_LIKE_TOKEN);
-}
-	YY_BREAK
-case 94:
-YY_RULE_SETUP
-#line 556 "pars0lex.l"
-{
-			return(PARS_BIGINT_TOKEN);
-}
-	YY_BREAK
-case 95:
-YY_RULE_SETUP
-#line 560 "pars0lex.l"
-{
 			yylval = sym_tab_add_id(pars_sym_tab_global,
 							(byte*) yytext,
 							ut_strlen(yytext));
 			return(PARS_ID_TOKEN);
 }
 	YY_BREAK
-case 96:
+case 75:
 YY_RULE_SETUP
-#line 567 "pars0lex.l"
+#line 483 "pars0lex.l"
 {
 			yylval = sym_tab_add_id(pars_sym_tab_global,
 							(byte*) yytext,
@@ -1991,192 +1739,192 @@
 			return(PARS_TABLE_NAME_TOKEN);
 }
 	YY_BREAK
-case 97:
+case 76:
 YY_RULE_SETUP
-#line 574 "pars0lex.l"
+#line 490 "pars0lex.l"
 {
 			return(PARS_DDOT_TOKEN);
 }
 	YY_BREAK
-case 98:
+case 77:
 YY_RULE_SETUP
-#line 578 "pars0lex.l"
+#line 494 "pars0lex.l"
 {
 			return(PARS_ASSIGN_TOKEN);
 }
 	YY_BREAK
-case 99:
+case 78:
 YY_RULE_SETUP
-#line 582 "pars0lex.l"
+#line 498 "pars0lex.l"
 {
 			return(PARS_LE_TOKEN);
 }
 	YY_BREAK
-case 100:
+case 79:
 YY_RULE_SETUP
-#line 586 "pars0lex.l"
+#line 502 "pars0lex.l"
 {
 			return(PARS_GE_TOKEN);
 }
 	YY_BREAK
-case 101:
+case 80:
 YY_RULE_SETUP
-#line 590 "pars0lex.l"
+#line 506 "pars0lex.l"
 {
 			return(PARS_NE_TOKEN);
 }
 	YY_BREAK
-case 102:
+case 81:
 YY_RULE_SETUP
-#line 594 "pars0lex.l"
+#line 510 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 103:
+case 82:
 YY_RULE_SETUP
-#line 599 "pars0lex.l"
+#line 515 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 104:
+case 83:
 YY_RULE_SETUP
-#line 604 "pars0lex.l"
+#line 520 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 105:
+case 84:
 YY_RULE_SETUP
-#line 609 "pars0lex.l"
+#line 525 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 106:
+case 85:
 YY_RULE_SETUP
-#line 614 "pars0lex.l"
+#line 530 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 107:
+case 86:
 YY_RULE_SETUP
-#line 619 "pars0lex.l"
+#line 535 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 108:
+case 87:
 YY_RULE_SETUP
-#line 624 "pars0lex.l"
+#line 540 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 109:
+case 88:
 YY_RULE_SETUP
-#line 629 "pars0lex.l"
+#line 545 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 110:
+case 89:
 YY_RULE_SETUP
-#line 634 "pars0lex.l"
+#line 550 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 111:
+case 90:
 YY_RULE_SETUP
-#line 639 "pars0lex.l"
+#line 555 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 112:
+case 91:
 YY_RULE_SETUP
-#line 644 "pars0lex.l"
+#line 560 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 113:
+case 92:
 YY_RULE_SETUP
-#line 649 "pars0lex.l"
+#line 565 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 114:
+case 93:
 YY_RULE_SETUP
-#line 654 "pars0lex.l"
+#line 570 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 115:
+case 94:
 YY_RULE_SETUP
-#line 659 "pars0lex.l"
+#line 575 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 116:
+case 95:
 YY_RULE_SETUP
-#line 664 "pars0lex.l"
+#line 580 "pars0lex.l"
 {
 
 			return((int)(*yytext));
 }
 	YY_BREAK
-case 117:
+case 96:
 YY_RULE_SETUP
-#line 669 "pars0lex.l"
+#line 585 "pars0lex.l"
 BEGIN(comment); /* eat up comment */
 	YY_BREAK
-case 118:
-/* rule 118 can match eol */
+case 97:
+/* rule 97 can match eol */
 YY_RULE_SETUP
-#line 671 "pars0lex.l"
+#line 587 "pars0lex.l"
 
 	YY_BREAK
-case 119:
-/* rule 119 can match eol */
+case 98:
+/* rule 98 can match eol */
 YY_RULE_SETUP
-#line 672 "pars0lex.l"
+#line 588 "pars0lex.l"
 
 	YY_BREAK
-case 120:
+case 99:
 YY_RULE_SETUP
-#line 673 "pars0lex.l"
+#line 589 "pars0lex.l"
 BEGIN(INITIAL);
 	YY_BREAK
-case 121:
-/* rule 121 can match eol */
+case 100:
+/* rule 100 can match eol */
 YY_RULE_SETUP
-#line 675 "pars0lex.l"
+#line 591 "pars0lex.l"
 /* eat up whitespace */
 	YY_BREAK
-case 122:
+case 101:
 YY_RULE_SETUP
-#line 678 "pars0lex.l"
+#line 594 "pars0lex.l"
 {
 			fprintf(stderr,"Unrecognized character: %02x\n",
 				*yytext);
@@ -2186,12 +1934,12 @@
 			return(0);
 }
 	YY_BREAK
-case 123:
+case 102:
 YY_RULE_SETUP
-#line 687 "pars0lex.l"
+#line 603 "pars0lex.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 2194 "lexyy.cc"
+#line 1942 "lexyy.cc"
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(comment):
 case YY_STATE_EOF(quoted):
@@ -2492,7 +2240,7 @@
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 404 )
+			if ( yy_current_state >= 307 )
 				yy_c = yy_meta[yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -2520,11 +2268,11 @@
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 404 )
+		if ( yy_current_state >= 307 )
 			yy_c = yy_meta[yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-	yy_is_jam = (yy_current_state == 403);
+	yy_is_jam = (yy_current_state == 306);
 
 		return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3077,7 +2825,7 @@
 
 #define YYTABLES_NAME "yytables"
 
-#line 687 "pars0lex.l"
+#line 603 "pars0lex.l"
 
 
 /**********************************************************************
diff -Nru mariadb-10.3-10.3.18/storage/innobase/pars/pars0grm.cc mariadb-10.3-10.3.22/storage/innobase/pars/pars0grm.cc
--- mariadb-10.3-10.3.18/storage/innobase/pars/pars0grm.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/pars/pars0grm.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,8 +1,9 @@
-/* A Bison parser, made by GNU Bison 3.0.4.  */
+/* A Bison parser, made by GNU Bison 3.4.2.  */
 
 /* Bison implementation for Yacc-like parsers in C
 
-   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
+   Inc.
 
    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
@@ -40,11 +41,14 @@
    define necessary library symbols; they are noted "INFRINGES ON
    USER NAME SPACE" below.  */
 
+/* Undocumented macros, especially those whose name start with YY_,
+   are private implementation details.  Do not rely on them.  */
+
 /* Identify Bison output.  */
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "3.0.4"
+#define YYBISON_VERSION "3.4.2"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -61,8 +65,8 @@
 
 
 
-/* Copy the first part of user declarations.  */
-#line 29 "pars0grm.y" /* yacc.c:339  */
+/* First part of user prologue.  */
+#line 29 "pars0grm.y"
 
 /* The value of the semantic attribute is a pointer to a query tree node
 que_node_t */
@@ -81,13 +85,17 @@
 int
 yylex(void);
 
-#line 85 "pars0grm.cc" /* yacc.c:339  */
+#line 89 "pars0grm.cc"
 
 # ifndef YY_NULLPTR
-#  if defined __cplusplus && 201103L <= __cplusplus
-#   define YY_NULLPTR nullptr
+#  if defined __cplusplus
+#   if 201103L <= __cplusplus
+#    define YY_NULLPTR nullptr
+#   else
+#    define YY_NULLPTR 0
+#   endif
 #  else
-#   define YY_NULLPTR 0
+#   define YY_NULLPTR ((void*)0)
 #  endif
 # endif
 
@@ -99,8 +107,8 @@
 # define YYERROR_VERBOSE 0
 #endif
 
-/* In a future release of Bison, this section will be replaced
-   by #include "pars0grm.tab.h".  */
+/* Use api.header.include to #include this header
+   instead of duplicating it here.  */
 #ifndef YY_YY_PARS0GRM_TAB_H_INCLUDED
 # define YY_YY_PARS0GRM_TAB_H_INCLUDED
 /* Debug traces.  */
@@ -129,91 +137,71 @@
     PARS_NE_TOKEN = 268,
     PARS_PROCEDURE_TOKEN = 269,
     PARS_IN_TOKEN = 270,
-    PARS_OUT_TOKEN = 271,
-    PARS_BINARY_TOKEN = 272,
-    PARS_BLOB_TOKEN = 273,
-    PARS_INT_TOKEN = 274,
-    PARS_FLOAT_TOKEN = 275,
-    PARS_CHAR_TOKEN = 276,
-    PARS_IS_TOKEN = 277,
-    PARS_BEGIN_TOKEN = 278,
-    PARS_END_TOKEN = 279,
-    PARS_IF_TOKEN = 280,
-    PARS_THEN_TOKEN = 281,
-    PARS_ELSE_TOKEN = 282,
-    PARS_ELSIF_TOKEN = 283,
-    PARS_LOOP_TOKEN = 284,
-    PARS_WHILE_TOKEN = 285,
-    PARS_RETURN_TOKEN = 286,
-    PARS_SELECT_TOKEN = 287,
-    PARS_SUM_TOKEN = 288,
-    PARS_COUNT_TOKEN = 289,
-    PARS_DISTINCT_TOKEN = 290,
-    PARS_FROM_TOKEN = 291,
-    PARS_WHERE_TOKEN = 292,
-    PARS_FOR_TOKEN = 293,
-    PARS_DDOT_TOKEN = 294,
-    PARS_READ_TOKEN = 295,
-    PARS_ORDER_TOKEN = 296,
-    PARS_BY_TOKEN = 297,
-    PARS_ASC_TOKEN = 298,
-    PARS_DESC_TOKEN = 299,
-    PARS_INSERT_TOKEN = 300,
-    PARS_INTO_TOKEN = 301,
-    PARS_VALUES_TOKEN = 302,
-    PARS_UPDATE_TOKEN = 303,
-    PARS_SET_TOKEN = 304,
-    PARS_DELETE_TOKEN = 305,
-    PARS_CURRENT_TOKEN = 306,
-    PARS_OF_TOKEN = 307,
-    PARS_CREATE_TOKEN = 308,
-    PARS_TABLE_TOKEN = 309,
-    PARS_INDEX_TOKEN = 310,
-    PARS_UNIQUE_TOKEN = 311,
-    PARS_CLUSTERED_TOKEN = 312,
-    PARS_ON_TOKEN = 313,
-    PARS_ASSIGN_TOKEN = 314,
-    PARS_DECLARE_TOKEN = 315,
-    PARS_CURSOR_TOKEN = 316,
-    PARS_SQL_TOKEN = 317,
-    PARS_OPEN_TOKEN = 318,
-    PARS_FETCH_TOKEN = 319,
-    PARS_CLOSE_TOKEN = 320,
-    PARS_NOTFOUND_TOKEN = 321,
-    PARS_TO_CHAR_TOKEN = 322,
-    PARS_TO_NUMBER_TOKEN = 323,
-    PARS_TO_BINARY_TOKEN = 324,
-    PARS_BINARY_TO_NUMBER_TOKEN = 325,
-    PARS_SUBSTR_TOKEN = 326,
-    PARS_REPLSTR_TOKEN = 327,
-    PARS_CONCAT_TOKEN = 328,
-    PARS_INSTR_TOKEN = 329,
-    PARS_LENGTH_TOKEN = 330,
-    PARS_SYSDATE_TOKEN = 331,
-    PARS_PRINTF_TOKEN = 332,
-    PARS_ASSERT_TOKEN = 333,
-    PARS_RND_TOKEN = 334,
-    PARS_RND_STR_TOKEN = 335,
-    PARS_ROW_PRINTF_TOKEN = 336,
-    PARS_COMMIT_TOKEN = 337,
-    PARS_ROLLBACK_TOKEN = 338,
-    PARS_WORK_TOKEN = 339,
-    PARS_UNSIGNED_TOKEN = 340,
-    PARS_EXIT_TOKEN = 341,
-    PARS_FUNCTION_TOKEN = 342,
-    PARS_LOCK_TOKEN = 343,
-    PARS_SHARE_TOKEN = 344,
-    PARS_MODE_TOKEN = 345,
-    PARS_LIKE_TOKEN = 346,
-    PARS_LIKE_TOKEN_EXACT = 347,
-    PARS_LIKE_TOKEN_PREFIX = 348,
-    PARS_LIKE_TOKEN_SUFFIX = 349,
-    PARS_LIKE_TOKEN_SUBSTR = 350,
-    PARS_TABLE_NAME_TOKEN = 351,
-    PARS_COMPACT_TOKEN = 352,
-    PARS_BLOCK_SIZE_TOKEN = 353,
-    PARS_BIGINT_TOKEN = 354,
-    NEG = 355
+    PARS_INT_TOKEN = 271,
+    PARS_CHAR_TOKEN = 272,
+    PARS_IS_TOKEN = 273,
+    PARS_BEGIN_TOKEN = 274,
+    PARS_END_TOKEN = 275,
+    PARS_IF_TOKEN = 276,
+    PARS_THEN_TOKEN = 277,
+    PARS_ELSE_TOKEN = 278,
+    PARS_ELSIF_TOKEN = 279,
+    PARS_LOOP_TOKEN = 280,
+    PARS_WHILE_TOKEN = 281,
+    PARS_RETURN_TOKEN = 282,
+    PARS_SELECT_TOKEN = 283,
+    PARS_COUNT_TOKEN = 284,
+    PARS_FROM_TOKEN = 285,
+    PARS_WHERE_TOKEN = 286,
+    PARS_FOR_TOKEN = 287,
+    PARS_DDOT_TOKEN = 288,
+    PARS_ORDER_TOKEN = 289,
+    PARS_BY_TOKEN = 290,
+    PARS_ASC_TOKEN = 291,
+    PARS_DESC_TOKEN = 292,
+    PARS_INSERT_TOKEN = 293,
+    PARS_INTO_TOKEN = 294,
+    PARS_VALUES_TOKEN = 295,
+    PARS_UPDATE_TOKEN = 296,
+    PARS_SET_TOKEN = 297,
+    PARS_DELETE_TOKEN = 298,
+    PARS_CURRENT_TOKEN = 299,
+    PARS_OF_TOKEN = 300,
+    PARS_CREATE_TOKEN = 301,
+    PARS_TABLE_TOKEN = 302,
+    PARS_INDEX_TOKEN = 303,
+    PARS_UNIQUE_TOKEN = 304,
+    PARS_CLUSTERED_TOKEN = 305,
+    PARS_ON_TOKEN = 306,
+    PARS_ASSIGN_TOKEN = 307,
+    PARS_DECLARE_TOKEN = 308,
+    PARS_CURSOR_TOKEN = 309,
+    PARS_SQL_TOKEN = 310,
+    PARS_OPEN_TOKEN = 311,
+    PARS_FETCH_TOKEN = 312,
+    PARS_CLOSE_TOKEN = 313,
+    PARS_NOTFOUND_TOKEN = 314,
+    PARS_TO_BINARY_TOKEN = 315,
+    PARS_SUBSTR_TOKEN = 316,
+    PARS_CONCAT_TOKEN = 317,
+    PARS_INSTR_TOKEN = 318,
+    PARS_LENGTH_TOKEN = 319,
+    PARS_COMMIT_TOKEN = 320,
+    PARS_ROLLBACK_TOKEN = 321,
+    PARS_WORK_TOKEN = 322,
+    PARS_EXIT_TOKEN = 323,
+    PARS_FUNCTION_TOKEN = 324,
+    PARS_LOCK_TOKEN = 325,
+    PARS_SHARE_TOKEN = 326,
+    PARS_MODE_TOKEN = 327,
+    PARS_LIKE_TOKEN = 328,
+    PARS_LIKE_TOKEN_EXACT = 329,
+    PARS_LIKE_TOKEN_PREFIX = 330,
+    PARS_LIKE_TOKEN_SUFFIX = 331,
+    PARS_LIKE_TOKEN_SUBSTR = 332,
+    PARS_TABLE_NAME_TOKEN = 333,
+    PARS_BIGINT_TOKEN = 334,
+    NEG = 335
   };
 #endif
 
@@ -231,9 +219,7 @@
 
 #endif /* !YY_YY_PARS0GRM_TAB_H_INCLUDED  */
 
-/* Copy the second part of user declarations.  */
 
-#line 237 "pars0grm.cc" /* yacc.c:358  */
 
 #ifdef short
 # undef short
@@ -254,13 +240,13 @@
 #ifdef YYTYPE_UINT16
 typedef YYTYPE_UINT16 yytype_uint16;
 #else
-typedef unsigned short int yytype_uint16;
+typedef unsigned short yytype_uint16;
 #endif
 
 #ifdef YYTYPE_INT16
 typedef YYTYPE_INT16 yytype_int16;
 #else
-typedef short int yytype_int16;
+typedef short yytype_int16;
 #endif
 
 #ifndef YYSIZE_T
@@ -272,7 +258,7 @@
 #  include  /* INFRINGES ON USER NAME SPACE */
 #  define YYSIZE_T size_t
 # else
-#  define YYSIZE_T unsigned int
+#  define YYSIZE_T unsigned
 # endif
 #endif
 
@@ -308,15 +294,6 @@
 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
 #endif
 
-#if !defined _Noreturn \
-     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
-# if defined _MSC_VER && 1200 <= _MSC_VER
-#  define _Noreturn __declspec (noreturn)
-# else
-#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
-# endif
-#endif
-
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
 # define YYUSE(E) ((void) (E))
@@ -324,7 +301,7 @@
 # define YYUSE(E) /* empty */
 #endif
 
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
+#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
 /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
     _Pragma ("GCC diagnostic push") \
@@ -344,6 +321,8 @@
 #endif
 
 
+#define YY_ASSERT(E) ((void) (0 && (E)))
+
 #if ! defined yyoverflow || YYERROR_VERBOSE
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
@@ -475,42 +454,42 @@
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  5
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   780
+#define YYLAST   603
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  116
+#define YYNTOKENS  96
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  72
+#define YYNNTS  64
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  178
+#define YYNRULES  150
 /* YYNSTATES -- Number of states.  */
-#define YYNSTATES  345
+#define YYNSTATES  300
 
-/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
-   by yylex, with out-of-bounds checking.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   355
+#define YYMAXUTOK   335
 
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+   as returned by yylex, with out-of-bounds checking.  */
 #define YYTRANSLATE(YYX)                                                \
-  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+  ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
-   as returned by yylex, without out-of-bounds checking.  */
+   as returned by yylex.  */
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,   108,     2,     2,
-     110,   111,   105,   104,   113,   103,     2,   106,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,     2,   109,
-     101,   100,   102,   112,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,    88,     2,     2,
+      90,    91,    85,    84,    93,    83,     2,    86,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,    89,
+      81,    80,    82,    92,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,   114,     2,   115,     2,     2,     2,     2,
+       2,     2,     2,    94,     2,    95,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -531,33 +510,29 @@
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
-      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
-      85,    86,    87,    88,    89,    90,    91,    92,    93,    94,
-      95,    96,    97,    98,    99,   107
+      75,    76,    77,    78,    79,    87
 };
 
 #if YYDEBUG
   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   160,   160,   163,   164,   165,   166,   167,   168,   169,
-     170,   171,   172,   173,   174,   175,   176,   177,   178,   179,
-     180,   181,   182,   183,   184,   188,   189,   194,   195,   197,
-     198,   199,   200,   201,   202,   203,   204,   205,   206,   207,
-     208,   209,   211,   212,   213,   214,   215,   216,   217,   218,
-     219,   221,   226,   227,   228,   229,   231,   232,   233,   234,
-     235,   236,   237,   240,   242,   243,   247,   253,   258,   259,
-     260,   264,   268,   269,   274,   275,   276,   281,   282,   283,
-     287,   288,   293,   299,   306,   307,   308,   313,   315,   318,
-     322,   323,   327,   328,   333,   334,   339,   340,   341,   345,
-     346,   353,   368,   373,   376,   384,   390,   391,   396,   402,
-     411,   419,   427,   434,   442,   450,   456,   463,   469,   470,
-     475,   476,   478,   482,   489,   495,   505,   509,   513,   520,
-     527,   531,   539,   548,   549,   554,   555,   560,   561,   567,
-     568,   574,   575,   580,   581,   586,   597,   598,   603,   604,
-     608,   609,   613,   627,   628,   632,   637,   642,   643,   644,
-     645,   646,   650,   655,   663,   664,   665,   670,   676,   678,
-     679,   683,   691,   697,   698,   701,   703,   704,   708
+       0,   140,   140,   143,   144,   145,   146,   147,   148,   149,
+     150,   151,   152,   153,   154,   155,   156,   157,   158,   159,
+     160,   161,   162,   166,   167,   172,   173,   175,   176,   177,
+     178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
+     189,   190,   191,   192,   193,   194,   195,   196,   197,   199,
+     204,   205,   206,   207,   208,   211,   213,   214,   218,   224,
+     228,   229,   234,   235,   236,   241,   242,   243,   247,   248,
+     256,   257,   258,   263,   265,   268,   272,   273,   277,   278,
+     283,   284,   289,   290,   291,   295,   296,   303,   318,   323,
+     326,   334,   340,   341,   346,   352,   361,   369,   377,   384,
+     392,   400,   407,   413,   414,   419,   420,   422,   426,   433,
+     439,   449,   453,   457,   464,   471,   475,   483,   492,   493,
+     498,   499,   504,   505,   511,   519,   520,   525,   526,   530,
+     531,   535,   549,   550,   554,   559,   564,   565,   566,   570,
+     576,   578,   579,   583,   591,   597,   598,   601,   603,   604,
+     608
 };
 #endif
 
@@ -570,39 +545,30 @@
   "PARS_STR_LIT", "PARS_NULL_LIT", "PARS_ID_TOKEN", "PARS_AND_TOKEN",
   "PARS_OR_TOKEN", "PARS_NOT_TOKEN", "PARS_GE_TOKEN", "PARS_LE_TOKEN",
   "PARS_NE_TOKEN", "PARS_PROCEDURE_TOKEN", "PARS_IN_TOKEN",
-  "PARS_OUT_TOKEN", "PARS_BINARY_TOKEN", "PARS_BLOB_TOKEN",
-  "PARS_INT_TOKEN", "PARS_FLOAT_TOKEN", "PARS_CHAR_TOKEN", "PARS_IS_TOKEN",
-  "PARS_BEGIN_TOKEN", "PARS_END_TOKEN", "PARS_IF_TOKEN", "PARS_THEN_TOKEN",
-  "PARS_ELSE_TOKEN", "PARS_ELSIF_TOKEN", "PARS_LOOP_TOKEN",
-  "PARS_WHILE_TOKEN", "PARS_RETURN_TOKEN", "PARS_SELECT_TOKEN",
-  "PARS_SUM_TOKEN", "PARS_COUNT_TOKEN", "PARS_DISTINCT_TOKEN",
+  "PARS_INT_TOKEN", "PARS_CHAR_TOKEN", "PARS_IS_TOKEN", "PARS_BEGIN_TOKEN",
+  "PARS_END_TOKEN", "PARS_IF_TOKEN", "PARS_THEN_TOKEN", "PARS_ELSE_TOKEN",
+  "PARS_ELSIF_TOKEN", "PARS_LOOP_TOKEN", "PARS_WHILE_TOKEN",
+  "PARS_RETURN_TOKEN", "PARS_SELECT_TOKEN", "PARS_COUNT_TOKEN",
   "PARS_FROM_TOKEN", "PARS_WHERE_TOKEN", "PARS_FOR_TOKEN",
-  "PARS_DDOT_TOKEN", "PARS_READ_TOKEN", "PARS_ORDER_TOKEN",
-  "PARS_BY_TOKEN", "PARS_ASC_TOKEN", "PARS_DESC_TOKEN",
-  "PARS_INSERT_TOKEN", "PARS_INTO_TOKEN", "PARS_VALUES_TOKEN",
-  "PARS_UPDATE_TOKEN", "PARS_SET_TOKEN", "PARS_DELETE_TOKEN",
-  "PARS_CURRENT_TOKEN", "PARS_OF_TOKEN", "PARS_CREATE_TOKEN",
-  "PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN", "PARS_UNIQUE_TOKEN",
-  "PARS_CLUSTERED_TOKEN", "PARS_ON_TOKEN", "PARS_ASSIGN_TOKEN",
-  "PARS_DECLARE_TOKEN", "PARS_CURSOR_TOKEN", "PARS_SQL_TOKEN",
-  "PARS_OPEN_TOKEN", "PARS_FETCH_TOKEN", "PARS_CLOSE_TOKEN",
-  "PARS_NOTFOUND_TOKEN", "PARS_TO_CHAR_TOKEN", "PARS_TO_NUMBER_TOKEN",
-  "PARS_TO_BINARY_TOKEN", "PARS_BINARY_TO_NUMBER_TOKEN",
-  "PARS_SUBSTR_TOKEN", "PARS_REPLSTR_TOKEN", "PARS_CONCAT_TOKEN",
-  "PARS_INSTR_TOKEN", "PARS_LENGTH_TOKEN", "PARS_SYSDATE_TOKEN",
-  "PARS_PRINTF_TOKEN", "PARS_ASSERT_TOKEN", "PARS_RND_TOKEN",
-  "PARS_RND_STR_TOKEN", "PARS_ROW_PRINTF_TOKEN", "PARS_COMMIT_TOKEN",
-  "PARS_ROLLBACK_TOKEN", "PARS_WORK_TOKEN", "PARS_UNSIGNED_TOKEN",
-  "PARS_EXIT_TOKEN", "PARS_FUNCTION_TOKEN", "PARS_LOCK_TOKEN",
-  "PARS_SHARE_TOKEN", "PARS_MODE_TOKEN", "PARS_LIKE_TOKEN",
-  "PARS_LIKE_TOKEN_EXACT", "PARS_LIKE_TOKEN_PREFIX",
+  "PARS_DDOT_TOKEN", "PARS_ORDER_TOKEN", "PARS_BY_TOKEN", "PARS_ASC_TOKEN",
+  "PARS_DESC_TOKEN", "PARS_INSERT_TOKEN", "PARS_INTO_TOKEN",
+  "PARS_VALUES_TOKEN", "PARS_UPDATE_TOKEN", "PARS_SET_TOKEN",
+  "PARS_DELETE_TOKEN", "PARS_CURRENT_TOKEN", "PARS_OF_TOKEN",
+  "PARS_CREATE_TOKEN", "PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN",
+  "PARS_UNIQUE_TOKEN", "PARS_CLUSTERED_TOKEN", "PARS_ON_TOKEN",
+  "PARS_ASSIGN_TOKEN", "PARS_DECLARE_TOKEN", "PARS_CURSOR_TOKEN",
+  "PARS_SQL_TOKEN", "PARS_OPEN_TOKEN", "PARS_FETCH_TOKEN",
+  "PARS_CLOSE_TOKEN", "PARS_NOTFOUND_TOKEN", "PARS_TO_BINARY_TOKEN",
+  "PARS_SUBSTR_TOKEN", "PARS_CONCAT_TOKEN", "PARS_INSTR_TOKEN",
+  "PARS_LENGTH_TOKEN", "PARS_COMMIT_TOKEN", "PARS_ROLLBACK_TOKEN",
+  "PARS_WORK_TOKEN", "PARS_EXIT_TOKEN", "PARS_FUNCTION_TOKEN",
+  "PARS_LOCK_TOKEN", "PARS_SHARE_TOKEN", "PARS_MODE_TOKEN",
+  "PARS_LIKE_TOKEN", "PARS_LIKE_TOKEN_EXACT", "PARS_LIKE_TOKEN_PREFIX",
   "PARS_LIKE_TOKEN_SUFFIX", "PARS_LIKE_TOKEN_SUBSTR",
-  "PARS_TABLE_NAME_TOKEN", "PARS_COMPACT_TOKEN", "PARS_BLOCK_SIZE_TOKEN",
-  "PARS_BIGINT_TOKEN", "'='", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'",
-  "NEG", "'%'", "';'", "'('", "')'", "'?'", "','", "'{'", "'}'", "$accept",
-  "top_statement", "statement", "statement_list", "exp", "function_name",
-  "question_mark_list", "stored_procedure_call",
-  "predefined_procedure_call", "predefined_procedure_name",
+  "PARS_TABLE_NAME_TOKEN", "PARS_BIGINT_TOKEN", "'='", "'<'", "'>'", "'-'",
+  "'+'", "'*'", "'/'", "NEG", "'%'", "';'", "'('", "')'", "'?'", "','",
+  "'{'", "'}'", "$accept", "top_statement", "statement", "statement_list",
+  "exp", "function_name", "question_mark_list", "stored_procedure_call",
   "user_function_call", "table_list", "variable_list", "exp_list",
   "select_item", "select_item_list", "select_list", "search_condition",
   "for_update_clause", "lock_shared_clause", "order_direction",
@@ -611,16 +577,14 @@
   "cursor_positioned", "update_statement_start",
   "update_statement_searched", "update_statement_positioned",
   "delete_statement_start", "delete_statement_searched",
-  "delete_statement_positioned", "row_printf_statement",
-  "assignment_statement", "elsif_element", "elsif_list", "else_part",
-  "if_statement", "while_statement", "for_statement", "exit_statement",
-  "return_statement", "open_cursor_statement", "close_cursor_statement",
-  "fetch_statement", "column_def", "column_def_list", "opt_column_len",
-  "opt_unsigned", "opt_not_null", "compact", "block_size", "create_table",
-  "column_list", "unique_def", "clustered_def", "create_index",
-  "table_name", "commit_statement", "rollback_statement", "type_name",
-  "parameter_declaration", "parameter_declaration_list",
-  "variable_declaration", "variable_declaration_list",
+  "delete_statement_positioned", "assignment_statement", "elsif_element",
+  "elsif_list", "else_part", "if_statement", "while_statement",
+  "for_statement", "exit_statement", "return_statement",
+  "open_cursor_statement", "close_cursor_statement", "fetch_statement",
+  "column_def", "column_def_list", "opt_column_len", "opt_not_null",
+  "create_table", "column_list", "unique_def", "clustered_def",
+  "create_index", "table_name", "commit_statement", "rollback_statement",
+  "type_name", "variable_declaration", "variable_declaration_list",
   "cursor_declaration", "function_declaration", "declaration",
   "declaration_list", "procedure_definition", YY_NULLPTR
 };
@@ -639,17 +603,15 @@
      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
      325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
-     335,   336,   337,   338,   339,   340,   341,   342,   343,   344,
-     345,   346,   347,   348,   349,   350,   351,   352,   353,   354,
-      61,    60,    62,    45,    43,    42,    47,   355,    37,    59,
+      61,    60,    62,    45,    43,    42,    47,   335,    37,    59,
       40,    41,    63,    44,   123,   125
 };
 # endif
 
-#define YYPACT_NINF -176
+#define YYPACT_NINF -129
 
 #define yypact_value_is_default(Yystate) \
-  (!!((Yystate) == (-176)))
+  (!!((Yystate) == (-129)))
 
 #define YYTABLE_NINF -1
 
@@ -660,41 +622,36 @@
      STATE-NUM.  */
 static const yytype_int16 yypact[] =
 {
-      20,    21,    41,   -64,   -59,  -176,  -176,    48,    54,  -176,
-     -74,    12,    12,    45,    48,  -176,  -176,  -176,  -176,  -176,
-    -176,  -176,    69,  -176,    12,  -176,     8,   -32,   -43,  -176,
-    -176,  -176,  -176,   -13,  -176,    72,    81,   445,  -176,    75,
-     -11,    42,   530,   530,  -176,    16,    99,    67,    -3,    78,
-     -14,   108,   109,   110,  -176,  -176,  -176,    86,    36,    44,
-    -176,   122,  -176,   216,  -176,    22,    23,    25,     6,    26,
-      93,    27,    33,    93,    46,    51,    53,    56,    61,    63,
-      64,    66,    68,    70,    71,    76,    79,    89,    94,    95,
-      86,  -176,   530,  -176,  -176,  -176,  -176,    43,   530,    49,
-    -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,
-    -176,   530,   530,   570,    77,   603,    80,    96,  -176,   674,
-    -176,   -38,   118,   161,    -3,  -176,  -176,   129,    -3,    -3,
-    -176,   148,  -176,   163,  -176,  -176,  -176,  -176,    97,  -176,
-    -176,  -176,   530,  -176,   100,  -176,  -176,   481,  -176,  -176,
-    -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,
-    -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,
-     102,   674,   149,   220,   155,    14,    91,   530,   530,   530,
-     530,   530,   445,   219,   530,   530,   530,   530,   530,   530,
-     530,   530,   445,   530,   -24,   218,   267,    -3,   530,  -176,
-     221,  -176,   117,  -176,   179,   228,   124,   674,   -65,   530,
-     185,   674,  -176,  -176,  -176,  -176,   220,   220,    19,    19,
-     674,   136,  -176,    19,    19,    19,     3,     3,    14,    14,
-     -57,   326,   554,   231,   128,  -176,   130,  -176,    -1,  -176,
-     610,   142,  -176,   131,   238,   242,   141,  -176,   130,  -176,
-     -52,  -176,   530,   -51,   246,   445,   530,  -176,   227,   233,
-    -176,   229,  -176,   151,  -176,   252,   530,    -3,   225,   530,
-     530,   221,    12,  -176,   -48,   207,   156,   153,   164,   674,
-    -176,  -176,   445,   626,  -176,   250,  -176,  -176,  -176,  -176,
-     230,   194,   655,   674,  -176,   173,   187,   238,    -3,  -176,
-    -176,  -176,   445,  -176,  -176,   270,   245,   445,   284,   204,
-    -176,   192,  -176,   181,   445,   203,   253,  -176,   386,   193,
-    -176,   286,   205,  -176,   296,   217,   299,   279,  -176,   303,
-    -176,   307,  -176,   -47,  -176,    30,  -176,  -176,  -176,  -176,
-     305,  -176,  -176,  -176,  -176
+       5,    34,    46,   -28,   -41,  -129,  -129,   -12,    45,    57,
+      23,  -129,     9,  -129,  -129,  -129,    20,    -9,  -129,  -129,
+    -129,  -129,     2,  -129,    83,    87,   278,  -129,    93,    28,
+      71,   427,   427,  -129,   335,   105,    85,    -1,   104,   -27,
+     129,   132,   133,    76,    77,  -129,   141,  -129,   149,  -129,
+      61,    19,    62,   118,    65,    66,   118,    68,    69,    70,
+      72,    73,    74,    75,    78,    79,    82,    84,    89,    90,
+      91,    94,   138,  -129,   427,  -129,  -129,  -129,  -129,    86,
+     427,    96,  -129,  -129,  -129,  -129,  -129,   427,   427,   438,
+      92,   454,    95,  -129,     1,  -129,   -24,   130,   157,    -1,
+    -129,  -129,   144,    -1,    -1,  -129,   139,  -129,   154,  -129,
+    -129,  -129,    98,  -129,  -129,  -129,   108,  -129,  -129,   345,
+    -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,
+    -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,
+    -129,   112,     1,   135,   285,   143,    -8,    15,   427,   427,
+     427,   427,   427,   278,   203,   427,   427,   427,   427,   427,
+     427,   427,   427,   278,   124,   204,   381,    -1,   427,  -129,
+     209,  -129,   120,  -129,   173,   215,   131,   427,   180,     1,
+    -129,  -129,  -129,  -129,   285,   285,    30,    30,     1,    10,
+    -129,    30,    30,    30,    60,    60,    -8,    -8,     1,   -39,
+     192,   137,  -129,   136,  -129,   -13,  -129,   472,   146,  -129,
+     147,   225,   227,   151,  -129,   136,  -129,   -21,     0,   229,
+     278,   427,  -129,   213,   219,  -129,   427,   220,  -129,   237,
+     427,    -1,   214,   427,   427,   209,    23,  -129,    14,   196,
+     160,   158,   162,  -129,  -129,   278,   486,  -129,   231,     1,
+    -129,  -129,  -129,   218,   194,   517,     1,  -129,   175,  -129,
+     225,    -1,  -129,  -129,  -129,   278,  -129,  -129,   251,   234,
+     278,   266,   260,  -129,   181,   278,   201,   239,  -129,   235,
+     184,   271,  -129,   272,   208,   275,   258,  -129,  -129,  -129,
+      17,  -129,    -7,  -129,  -129,   277,  -129,  -129,  -129,  -129
 };
 
   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -702,67 +659,60 @@
      means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,     0,     0,     0,     1,     2,   164,     0,   165,
-       0,     0,     0,     0,     0,   160,   161,   157,   159,   158,
-     162,   163,   168,   166,     0,   169,   175,     0,     0,   170,
-     173,   174,   176,     0,   167,     0,     0,     0,   177,     0,
-       0,     0,     0,     0,   127,    84,     0,     0,     0,     0,
-     148,     0,     0,     0,    68,    69,    70,     0,     0,     0,
-     126,     0,    25,     0,     3,     0,     0,     0,     0,     0,
-      90,     0,     0,    90,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     1,     2,     0,     0,   140,
+       0,   141,   147,   136,   138,   137,     0,     0,   142,   145,
+     146,   148,     0,   139,     0,     0,     0,   149,     0,     0,
+       0,     0,     0,   112,    70,     0,     0,     0,     0,   127,
+       0,     0,     0,     0,     0,   111,     0,    23,     0,     3,
+       0,     0,     0,    76,     0,     0,    76,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,   172,     0,    29,    30,    31,    32,    27,     0,    33,
-      52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
-      62,     0,     0,     0,     0,     0,     0,     0,    87,    80,
-      85,    89,     0,     0,     0,   153,   154,     0,     0,     0,
-     149,   150,   128,     0,   129,   115,   155,   156,     0,   178,
-      26,     4,    77,    11,     0,   104,    12,     0,   110,   111,
-      16,    17,   113,   114,    14,    15,    13,    10,     8,     5,
-       6,     7,     9,    18,    20,    19,    23,    24,    21,    22,
-       0,   116,     0,    49,     0,    38,     0,     0,     0,     0,
+       0,     0,     0,   144,     0,    27,    28,    29,    30,    25,
+       0,    31,    50,    51,    52,    53,    54,     0,     0,     0,
+       0,     0,     0,    73,    68,    71,    75,     0,     0,     0,
+     132,   133,     0,     0,     0,   128,   129,   113,     0,   114,
+     134,   135,     0,   150,    24,    10,     0,    90,    11,     0,
+      96,    97,    14,    15,    99,   100,    12,    13,     9,     7,
+       4,     5,     6,     8,    16,    18,    17,    21,    22,    19,
+      20,     0,   101,     0,    47,     0,    36,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,    77,     0,     0,     0,    74,     0,     0,     0,   102,
-       0,   112,     0,   151,     0,    74,    63,    78,     0,    77,
-       0,    91,   171,    50,    51,    39,    47,    48,    44,    45,
-      46,   120,    41,    40,    42,    43,    35,    34,    36,    37,
-       0,     0,     0,     0,     0,    75,    88,    86,    90,    72,
-       0,     0,   106,   109,     0,     0,    75,   131,   130,    64,
-       0,    67,     0,     0,     0,     0,     0,   118,   122,     0,
-      28,     0,    83,     0,    81,     0,     0,     0,    92,     0,
-       0,     0,     0,   133,     0,     0,     0,     0,     0,    79,
-     103,   108,   121,     0,   119,     0,   124,    82,    76,    73,
-       0,    94,     0,   105,   107,   135,   141,     0,     0,    71,
-      66,    65,     0,   123,    93,     0,    99,     0,     0,   137,
-     142,   143,   134,     0,   117,     0,     0,   101,     0,     0,
-     138,   139,     0,   145,     0,     0,     0,     0,   136,     0,
-     132,     0,   146,     0,    95,    96,   125,   140,   144,   152,
-       0,    97,    98,   100,   147
+       0,     0,    65,     0,     0,    62,     0,     0,     0,    88,
+       0,    98,     0,   130,     0,    62,    55,    65,     0,    77,
+     143,    48,    49,    37,    45,    46,    42,    43,    44,   105,
+      39,    38,    40,    41,    33,    32,    34,    35,    66,     0,
+       0,     0,    63,    74,    72,    76,    60,     0,     0,    92,
+      95,     0,     0,    63,   116,   115,    56,     0,     0,     0,
+       0,     0,   103,   107,     0,    26,     0,     0,    69,     0,
+       0,     0,    78,     0,     0,     0,     0,   118,     0,     0,
+       0,     0,     0,    89,    94,   106,     0,   104,     0,    67,
+     109,    64,    61,     0,    80,     0,    91,    93,   120,   124,
+       0,     0,    59,    58,    57,     0,   108,    79,     0,    85,
+       0,     0,   122,   119,     0,   102,     0,     0,    87,     0,
+       0,     0,   117,     0,     0,     0,     0,   121,   123,   125,
+       0,    81,    82,   110,   131,     0,    83,    84,    86,   126
 };
 
   /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -176,  -176,   -62,  -175,   -40,  -176,  -176,  -176,  -176,  -176,
-    -176,  -176,   111,  -166,   119,  -176,  -176,   -67,  -176,  -176,
-    -176,  -176,   -33,  -176,  -176,    47,  -176,   240,  -176,  -176,
-    -176,  -176,  -176,  -176,  -176,  -176,    59,  -176,  -176,  -176,
-    -176,  -176,  -176,  -176,  -176,  -176,  -176,    17,  -176,  -176,
-    -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -176,  -115,
-    -176,  -176,   -12,   313,  -176,   293,  -176,  -176,  -176,   295,
-    -176,  -176
+    -129,  -129,   -48,  -128,   -30,  -129,  -129,  -129,  -129,  -129,
+     113,   110,   123,  -129,  -129,   -52,  -129,  -129,  -129,  -129,
+     -40,  -129,  -129,    55,  -129,   238,  -129,  -129,  -129,  -129,
+    -129,  -129,  -129,    88,  -129,  -129,  -129,  -129,  -129,  -129,
+    -129,  -129,  -129,  -129,    35,  -129,  -129,  -129,  -129,  -129,
+    -129,  -129,  -129,   -96,  -129,  -129,    81,   290,  -129,  -129,
+    -129,   286,  -129,  -129
 };
 
   /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,     2,    62,    63,   207,   114,   250,    64,    65,    66,
-     247,   238,   236,   208,   120,   121,   122,   148,   291,   306,
-     343,   317,    67,    68,    69,   242,   243,   149,    70,    71,
-      72,    73,    74,    75,    76,    77,   257,   258,   259,    78,
-      79,    80,    81,    82,    83,    84,    85,   273,   274,   309,
-     321,   330,   311,   323,    86,   333,   131,   204,    87,   127,
-      88,    89,    20,     9,    10,    25,    26,    30,    31,    32,
-      33,     3
+      -1,     2,    47,    48,    94,    90,   217,    49,   214,   205,
+     203,   199,    95,    96,    97,   120,   254,   269,   298,   278,
+      50,    51,    52,   209,   210,   121,    53,    54,    55,    56,
+      57,    58,    59,   222,   223,   224,    60,    61,    62,    63,
+      64,    65,    66,    67,   237,   238,   272,   282,    68,   290,
+     106,   174,    69,   102,    70,    71,    16,    11,    12,    19,
+      20,    21,    22,     3
 };
 
   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
@@ -770,232 +720,189 @@
      number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_uint16 yytable[] =
 {
-      21,   140,   113,   115,   125,   119,   152,   221,   195,   199,
-      37,   233,    27,   201,   202,    24,   181,   231,    35,    93,
-      94,    95,    96,    97,   135,   230,    98,   181,     4,    15,
-      16,    17,   181,    18,     1,   145,   266,    13,    45,    14,
-     129,     5,   130,   253,    36,     6,   251,    28,   252,   116,
-     117,     7,   171,   144,   260,     8,   252,   170,   173,   277,
-     280,   278,   252,   296,   339,   297,   340,    22,    28,    11,
-      12,   175,   176,   341,   342,   196,    24,    34,    99,    39,
-     282,   234,   239,   100,   101,   102,   103,   104,    40,   105,
-     106,   107,   108,   126,   183,   109,   110,    90,    91,   177,
-     178,    92,   179,   180,   181,   183,   123,   211,   189,   190,
-     183,    19,   267,   124,   128,   132,   133,   134,    45,   111,
-     136,   118,   187,   188,   189,   190,   112,   314,   137,   138,
-     147,   141,   318,   142,   143,   146,   150,   216,   217,   218,
-     219,   220,   151,    41,   223,   224,   225,   226,   227,   228,
-     229,   172,   289,   232,   197,   154,   119,   174,   240,   140,
-     155,    42,   156,   255,   256,   157,    43,    44,    45,   140,
-     158,   268,   159,   160,    46,   161,   198,   162,   200,   163,
-     164,    47,   183,   313,    48,   165,    49,   191,   166,    50,
-     193,   184,   185,   186,   187,   188,   189,   190,   167,    51,
-      52,    53,   215,   168,   169,   203,   194,   206,    54,   205,
-     209,   212,   279,    55,    56,   213,   283,    57,    58,    59,
-     140,   214,    60,    41,   222,   235,   211,   244,   241,   292,
-     293,   179,   180,   181,   245,   246,   249,   254,   263,   264,
-     139,    42,   270,   265,   271,   272,    43,    44,    45,   275,
-      61,   276,   140,   281,    46,   256,   140,   285,   286,   288,
-     295,    47,   287,   290,    48,   298,    49,   299,   300,    50,
-      93,    94,    95,    96,    97,   303,   301,    98,   304,    51,
-      52,    53,   305,   308,   310,   315,   316,   319,    54,   320,
-     322,   324,   325,    55,    56,   326,   329,    57,    58,    59,
-     116,   117,    60,   332,   328,   331,   335,   334,   336,   337,
-     338,   183,   344,   153,   312,   237,   248,   284,   294,    29,
-     184,   185,   186,   187,   188,   189,   190,    23,    38,    99,
-      61,     0,     0,    41,   100,   101,   102,   103,   104,     0,
-     105,   106,   107,   108,     0,     0,   109,   110,     0,     0,
-     261,    42,     0,     0,     0,     0,    43,    44,    45,     0,
-       0,     0,     0,     0,    46,     0,     0,     0,     0,     0,
-     111,    47,     0,     0,    48,     0,    49,   112,     0,    50,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,    51,
-      52,    53,     0,    41,     0,     0,     0,     0,    54,     0,
-       0,     0,     0,    55,    56,     0,     0,    57,    58,    59,
-     327,    42,    60,     0,     0,     0,    43,    44,    45,     0,
-       0,     0,     0,     0,    46,     0,     0,     0,     0,     0,
-       0,    47,     0,     0,    48,     0,    49,     0,     0,    50,
-      61,     0,     0,     0,     0,     0,     0,     0,     0,    51,
-      52,    53,    41,     0,     0,     0,     0,     0,    54,     0,
-       0,     0,     0,    55,    56,     0,     0,    57,    58,    59,
-      42,     0,    60,     0,     0,    43,    44,    45,     0,     0,
-       0,     0,     0,    46,    93,    94,    95,    96,    97,     0,
-      47,    98,     0,    48,     0,    49,     0,     0,    50,     0,
-      61,     0,     0,     0,     0,     0,     0,     0,    51,    52,
-      53,     0,     0,     0,     0,     0,     0,    54,     0,     0,
-       0,     0,    55,    56,     0,     0,    57,    58,    59,     0,
-       0,    60,   210,    93,    94,    95,    96,    97,     0,     0,
-      98,     0,     0,    99,     0,     0,     0,     0,   100,   101,
-     102,   103,   104,     0,   105,   106,   107,   108,     0,    61,
-     109,   110,   177,   178,     0,   179,   180,   181,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,   177,   178,
-       0,   179,   180,   181,   111,     0,     0,     0,     0,     0,
-       0,   112,    99,     0,     0,     0,   182,   100,   101,   102,
-     103,   104,     0,   105,   106,   107,   108,     0,     0,   109,
-     110,   177,   178,     0,   179,   180,   181,     0,   177,   178,
-       0,   179,   180,   181,     0,     0,     0,     0,     0,     0,
-       0,     0,   192,   111,   177,   178,     0,   179,   180,   181,
-     112,     0,     0,     0,     0,   183,     0,     0,     0,   269,
-       0,     0,   302,     0,   184,   185,   186,   187,   188,   189,
-     190,   183,     0,   177,   178,   262,   179,   180,   181,     0,
-     184,   185,   186,   187,   188,   189,   190,     0,     0,     0,
-       0,     0,   177,   178,   307,   179,   180,   181,     0,     0,
-       0,     0,     0,     0,   183,     0,     0,     0,     0,     0,
-       0,   183,     0,   184,   185,   186,   187,   188,   189,   190,
-     184,   185,   186,   187,   188,   189,   190,   183,     0,     0,
-       0,     0,     0,     0,     0,     0,   184,   185,   186,   187,
-     188,   189,   190,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   183,     0,     0,     0,
-       0,     0,     0,     0,     0,   184,   185,   186,   187,   188,
-     189,   190,     0,     0,     0,   183,     0,     0,     0,     0,
-       0,     0,     0,     0,   184,   185,   186,   187,   188,   189,
-     190
+     114,    89,    91,   169,   124,   152,   100,   171,   172,   148,
+     149,   117,   150,   151,   152,   165,    10,    30,   230,     1,
+     104,    26,   105,   148,   149,   189,   150,   151,   152,   296,
+     297,    31,   141,   220,   221,   200,    32,    33,    34,    13,
+      14,     4,    35,   152,   142,    24,     5,    34,    36,     7,
+     144,    37,   225,    38,   226,    17,    39,   146,   147,   116,
+      25,     6,    17,     9,    10,   154,    40,    41,    42,   166,
+     241,   206,   242,   152,   154,    43,    44,   101,    45,     8,
+     231,   155,   156,   157,   158,   159,   160,   161,   154,   179,
+      28,   243,   245,   226,    29,   155,   156,   157,   158,   159,
+     160,   161,    15,   154,    46,   259,   183,   260,   294,    23,
+     295,    72,    98,   158,   159,   160,   161,    73,   184,   185,
+     186,   187,   188,    74,    99,   191,   192,   193,   194,   195,
+     196,   197,   198,   154,   103,   252,   107,   275,   207,   108,
+     109,   114,   279,   110,   111,   160,   161,   198,   112,   119,
+     115,   118,   114,   232,   122,   123,    30,   126,   127,   128,
+     167,   129,   130,   131,   132,   274,    34,   133,   134,   113,
+      31,   135,   168,   136,   143,    32,    33,    34,   137,   138,
+     139,    35,   162,   140,   145,   164,   170,    36,   176,   173,
+      37,   246,    38,   175,   181,    39,   249,   114,   177,    30,
+     179,   180,   182,   255,   256,    40,    41,    42,   190,   201,
+     211,   202,   227,    31,    43,    44,   208,    45,    32,    33,
+      34,   212,   213,   216,    35,   219,   234,   114,   228,   229,
+      36,   114,   236,    37,   239,    38,   244,   221,    39,   248,
+     235,   240,    30,    46,   251,   250,   253,   261,    40,    41,
+      42,   262,   266,   263,   264,   286,    31,    43,    44,   267,
+      45,    32,    33,    34,   268,   271,   276,    35,   277,   280,
+     281,   283,   284,    36,   285,   287,    37,   288,    38,   289,
+     291,    39,   292,   293,   299,    30,    46,   218,   215,   204,
+     257,    40,    41,    42,   125,   273,   150,   151,   152,    31,
+      43,    44,    18,    45,    32,    33,    34,     0,    27,     0,
+      35,   247,     0,     0,     0,     0,    36,   258,     0,    37,
+       0,    38,     0,     0,    39,     0,     0,     0,     0,    46,
+       0,     0,     0,     0,    40,    41,    42,     0,    75,    76,
+      77,    78,    79,    43,    44,    80,    45,     0,    75,    76,
+      77,    78,    79,     0,     0,    80,     0,     0,   154,     0,
+       0,     0,     0,     0,    92,   155,   156,   157,   158,   159,
+     160,   161,    46,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    75,    76,    77,    78,    79,   178,
+      81,    80,     0,     0,     0,    82,    83,    84,    85,    86,
+      81,     0,     0,     0,     0,    82,    83,    84,    85,    86,
+      92,     0,     0,     0,     0,     0,     0,     0,    87,     0,
+      93,     0,     0,     0,     0,    88,     0,     0,    87,     0,
+      75,    76,    77,    78,    79,    88,    81,    80,     0,     0,
+       0,    82,    83,    84,    85,    86,   148,   149,     0,   150,
+     151,   152,     0,     0,     0,     0,     0,     0,     0,     0,
+     153,     0,   148,   149,    87,   150,   151,   152,     0,     0,
+       0,    88,     0,     0,     0,     0,     0,     0,     0,   163,
+     148,   149,    81,   150,   151,   152,     0,    82,    83,    84,
+      85,    86,     0,     0,   148,   149,     0,   150,   151,   152,
+       0,     0,     0,     0,     0,   233,     0,     0,   265,     0,
+      87,   154,     0,     0,     0,     0,     0,    88,   155,   156,
+     157,   158,   159,   160,   161,   148,   149,   154,   150,   151,
+     152,     0,     0,     0,   155,   156,   157,   158,   159,   160,
+     161,     0,   270,     0,     0,   154,     0,     0,     0,     0,
+       0,     0,   155,   156,   157,   158,   159,   160,   161,   154,
+       0,     0,     0,     0,     0,     0,   155,   156,   157,   158,
+     159,   160,   161,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     154,     0,     0,     0,     0,     0,     0,   155,   156,   157,
+     158,   159,   160,   161
 };
 
 static const yytype_int16 yycheck[] =
 {
-      12,    63,    42,    43,     7,    45,    73,   182,    46,   124,
-      23,    35,    24,   128,   129,     7,    13,   192,    61,     3,
-       4,     5,     6,     7,    57,   191,    10,    13,     7,    17,
-      18,    19,    13,    21,    14,    68,    37,   111,    32,   113,
-      54,     0,    56,   209,    87,   109,   111,    60,   113,    33,
-      34,   110,    92,    47,   111,     7,   113,    90,    98,   111,
-     111,   113,   113,   111,   111,   113,   113,    22,    60,    15,
-      16,   111,   112,    43,    44,   113,     7,   109,    62,     7,
-     255,   105,   197,    67,    68,    69,    70,    71,     7,    73,
-      74,    75,    76,    96,    91,    79,    80,    22,   109,     8,
-       9,    59,    11,    12,    13,    91,     7,   147,   105,   106,
-      91,    99,   113,    46,    36,     7,     7,     7,    32,   103,
-      84,   105,   103,   104,   105,   106,   110,   302,    84,     7,
-      37,   109,   307,   110,   109,   109,   109,   177,   178,   179,
-     180,   181,   109,     7,   184,   185,   186,   187,   188,   189,
-     190,   108,   267,   193,    36,   109,   196,   108,   198,   221,
-     109,    25,   109,    27,    28,   109,    30,    31,    32,   231,
-     109,   238,   109,   109,    38,   109,    15,   109,    49,   109,
-     109,    45,    91,   298,    48,   109,    50,   110,   109,    53,
-     110,   100,   101,   102,   103,   104,   105,   106,   109,    63,
-      64,    65,   111,   109,   109,    57,   110,   110,    72,    46,
-     110,   109,   252,    77,    78,    66,   256,    81,    82,    83,
-     282,    66,    86,     7,     5,     7,   266,   110,     7,   269,
-     270,    11,    12,    13,    55,     7,   112,    52,     7,   111,
-      24,    25,   100,   113,   113,     7,    30,    31,    32,     7,
-     114,   110,   314,     7,    38,    28,   318,    24,    29,     7,
-     272,    45,   111,    38,    48,    58,    50,   111,   115,    53,
-       3,     4,     5,     6,     7,    25,   112,    10,    48,    63,
-      64,    65,    88,   110,    97,    15,    41,     3,    72,    85,
-      98,   110,    89,    77,    78,    42,    10,    81,    82,    83,
-      33,    34,    86,     7,   111,   100,     7,    90,    29,     6,
-       3,    91,     7,    73,   297,   196,   205,   258,   271,    26,
-     100,   101,   102,   103,   104,   105,   106,    14,    33,    62,
-     114,    -1,    -1,     7,    67,    68,    69,    70,    71,    -1,
-      73,    74,    75,    76,    -1,    -1,    79,    80,    -1,    -1,
-      24,    25,    -1,    -1,    -1,    -1,    30,    31,    32,    -1,
-      -1,    -1,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,
-     103,    45,    -1,    -1,    48,    -1,    50,   110,    -1,    53,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,
-      64,    65,    -1,     7,    -1,    -1,    -1,    -1,    72,    -1,
-      -1,    -1,    -1,    77,    78,    -1,    -1,    81,    82,    83,
-      24,    25,    86,    -1,    -1,    -1,    30,    31,    32,    -1,
-      -1,    -1,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,
-      -1,    45,    -1,    -1,    48,    -1,    50,    -1,    -1,    53,
-     114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,
-      64,    65,     7,    -1,    -1,    -1,    -1,    -1,    72,    -1,
-      -1,    -1,    -1,    77,    78,    -1,    -1,    81,    82,    83,
-      25,    -1,    86,    -1,    -1,    30,    31,    32,    -1,    -1,
-      -1,    -1,    -1,    38,     3,     4,     5,     6,     7,    -1,
-      45,    10,    -1,    48,    -1,    50,    -1,    -1,    53,    -1,
-     114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    64,
-      65,    -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    -1,
-      -1,    -1,    77,    78,    -1,    -1,    81,    82,    83,    -1,
-      -1,    86,    51,     3,     4,     5,     6,     7,    -1,    -1,
-      10,    -1,    -1,    62,    -1,    -1,    -1,    -1,    67,    68,
-      69,    70,    71,    -1,    73,    74,    75,    76,    -1,   114,
-      79,    80,     8,     9,    -1,    11,    12,    13,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     8,     9,
-      -1,    11,    12,    13,   103,    -1,    -1,    -1,    -1,    -1,
-      -1,   110,    62,    -1,    -1,    -1,    26,    67,    68,    69,
-      70,    71,    -1,    73,    74,    75,    76,    -1,    -1,    79,
-      80,     8,     9,    -1,    11,    12,    13,    -1,     8,     9,
-      -1,    11,    12,    13,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    29,   103,     8,     9,    -1,    11,    12,    13,
-     110,    -1,    -1,    -1,    -1,    91,    -1,    -1,    -1,    39,
-      -1,    -1,    26,    -1,   100,   101,   102,   103,   104,   105,
-     106,    91,    -1,     8,     9,   111,    11,    12,    13,    -1,
-     100,   101,   102,   103,   104,   105,   106,    -1,    -1,    -1,
-      -1,    -1,     8,     9,    29,    11,    12,    13,    -1,    -1,
-      -1,    -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,    -1,
-      -1,    91,    -1,   100,   101,   102,   103,   104,   105,   106,
-     100,   101,   102,   103,   104,   105,   106,    91,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   100,   101,   102,   103,
-     104,   105,   106,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   100,   101,   102,   103,   104,
-     105,   106,    -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   100,   101,   102,   103,   104,   105,
-     106
+      48,    31,    32,    99,    56,    13,     7,   103,   104,     8,
+       9,    51,    11,    12,    13,    39,     7,     7,    31,    14,
+      47,    19,    49,     8,     9,   153,    11,    12,    13,    36,
+      37,    21,    72,    23,    24,   163,    26,    27,    28,    16,
+      17,     7,    32,    13,    74,    54,     0,    28,    38,    90,
+      80,    41,    91,    43,    93,    53,    46,    87,    88,    40,
+      69,    89,    53,    18,     7,    73,    56,    57,    58,    93,
+      91,   167,    93,    13,    73,    65,    66,    78,    68,    91,
+      93,    80,    81,    82,    83,    84,    85,    86,    73,   119,
+       7,    91,   220,    93,     7,    80,    81,    82,    83,    84,
+      85,    86,    79,    73,    94,    91,    91,    93,    91,    89,
+      93,    18,     7,    83,    84,    85,    86,    89,   148,   149,
+     150,   151,   152,    52,    39,   155,   156,   157,   158,   159,
+     160,   161,   162,    73,    30,   231,     7,   265,   168,     7,
+       7,   189,   270,    67,    67,    85,    86,   177,     7,    31,
+      89,    89,   200,   205,    89,    89,     7,    89,    89,    89,
+      30,    89,    89,    89,    89,   261,    28,    89,    89,    20,
+      21,    89,    15,    89,    88,    26,    27,    28,    89,    89,
+      89,    32,    90,    89,    88,    90,    42,    38,    90,    50,
+      41,   221,    43,    39,    59,    46,   226,   245,    90,     7,
+     230,    89,    59,   233,   234,    56,    57,    58,     5,    85,
+      90,     7,    20,    21,    65,    66,     7,    68,    26,    27,
+      28,    48,     7,    92,    32,    45,    80,   275,    91,    93,
+      38,   279,     7,    41,     7,    43,     7,    24,    46,    20,
+      93,    90,     7,    94,     7,    25,    32,    51,    56,    57,
+      58,    91,    21,    95,    92,    20,    21,    65,    66,    41,
+      68,    26,    27,    28,    70,    90,    15,    32,    34,     3,
+      10,    90,    71,    38,    35,    91,    41,     6,    43,     7,
+      72,    46,     7,    25,     7,     7,    94,   177,   175,   166,
+     235,    56,    57,    58,    56,   260,    11,    12,    13,    21,
+      65,    66,    12,    68,    26,    27,    28,    -1,    22,    -1,
+      32,   223,    -1,    -1,    -1,    -1,    38,   236,    -1,    41,
+      -1,    43,    -1,    -1,    46,    -1,    -1,    -1,    -1,    94,
+      -1,    -1,    -1,    -1,    56,    57,    58,    -1,     3,     4,
+       5,     6,     7,    65,    66,    10,    68,    -1,     3,     4,
+       5,     6,     7,    -1,    -1,    10,    -1,    -1,    73,    -1,
+      -1,    -1,    -1,    -1,    29,    80,    81,    82,    83,    84,
+      85,    86,    94,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,     3,     4,     5,     6,     7,    44,
+      55,    10,    -1,    -1,    -1,    60,    61,    62,    63,    64,
+      55,    -1,    -1,    -1,    -1,    60,    61,    62,    63,    64,
+      29,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    83,    -1,
+      85,    -1,    -1,    -1,    -1,    90,    -1,    -1,    83,    -1,
+       3,     4,     5,     6,     7,    90,    55,    10,    -1,    -1,
+      -1,    60,    61,    62,    63,    64,     8,     9,    -1,    11,
+      12,    13,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      22,    -1,     8,     9,    83,    11,    12,    13,    -1,    -1,
+      -1,    90,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    25,
+       8,     9,    55,    11,    12,    13,    -1,    60,    61,    62,
+      63,    64,    -1,    -1,     8,     9,    -1,    11,    12,    13,
+      -1,    -1,    -1,    -1,    -1,    33,    -1,    -1,    22,    -1,
+      83,    73,    -1,    -1,    -1,    -1,    -1,    90,    80,    81,
+      82,    83,    84,    85,    86,     8,     9,    73,    11,    12,
+      13,    -1,    -1,    -1,    80,    81,    82,    83,    84,    85,
+      86,    -1,    25,    -1,    -1,    73,    -1,    -1,    -1,    -1,
+      -1,    -1,    80,    81,    82,    83,    84,    85,    86,    73,
+      -1,    -1,    -1,    -1,    -1,    -1,    80,    81,    82,    83,
+      84,    85,    86,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      73,    -1,    -1,    -1,    -1,    -1,    -1,    80,    81,    82,
+      83,    84,    85,    86
 };
 
   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
      symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    14,   117,   187,     7,     0,   109,   110,     7,   179,
-     180,    15,    16,   111,   113,    17,    18,    19,    21,    99,
-     178,   178,    22,   179,     7,   181,   182,   178,    60,   181,
-     183,   184,   185,   186,   109,    61,    87,    23,   185,     7,
-       7,     7,    25,    30,    31,    32,    38,    45,    48,    50,
-      53,    63,    64,    65,    72,    77,    78,    81,    82,    83,
-      86,   114,   118,   119,   123,   124,   125,   138,   139,   140,
-     144,   145,   146,   147,   148,   149,   150,   151,   155,   156,
-     157,   158,   159,   160,   161,   162,   170,   174,   176,   177,
-      22,   109,    59,     3,     4,     5,     6,     7,    10,    62,
-      67,    68,    69,    70,    71,    73,    74,    75,    76,    79,
-      80,   103,   110,   120,   121,   120,    33,    34,   105,   120,
-     130,   131,   132,     7,    46,     7,    96,   175,    36,    54,
-      56,   172,     7,     7,     7,   138,    84,    84,     7,    24,
-     118,   109,   110,   109,    47,   138,   109,    37,   133,   143,
-     109,   109,   133,   143,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     138,   120,   108,   120,   108,   120,   120,     8,     9,    11,
-      12,    13,    26,    91,   100,   101,   102,   103,   104,   105,
-     106,   110,    29,   110,   110,    46,   113,    36,    15,   175,
-      49,   175,   175,    57,   173,    46,   110,   120,   129,   110,
-      51,   120,   109,    66,    66,   111,   120,   120,   120,   120,
-     120,   119,     5,   120,   120,   120,   120,   120,   120,   120,
-     129,   119,   120,    35,   105,     7,   128,   130,   127,   175,
-     120,     7,   141,   142,   110,    55,     7,   126,   128,   112,
-     122,   111,   113,   129,    52,    27,    28,   152,   153,   154,
-     111,    24,   111,     7,   111,   113,    37,   113,   133,    39,
-     100,   113,     7,   163,   164,     7,   110,   111,   113,   120,
-     111,     7,   119,   120,   152,    24,    29,   111,     7,   175,
-      38,   134,   120,   120,   141,   178,   111,   113,    58,   111,
-     115,   112,    26,    25,    48,    88,   135,    29,   110,   165,
-      97,   168,   163,   175,   119,    15,    41,   137,   119,     3,
-      85,   166,    98,   169,   110,    89,    42,    24,   111,    10,
-     167,   100,     7,   171,    90,     7,    29,     6,     3,   111,
-     113,    43,    44,   136,     7
+       0,    14,    97,   159,     7,     0,    89,    90,    91,    18,
+       7,   153,   154,    16,    17,    79,   152,    53,   153,   155,
+     156,   157,   158,    89,    54,    69,    19,   157,     7,     7,
+       7,    21,    26,    27,    28,    32,    38,    41,    43,    46,
+      56,    57,    58,    65,    66,    68,    94,    98,    99,   103,
+     116,   117,   118,   122,   123,   124,   125,   126,   127,   128,
+     132,   133,   134,   135,   136,   137,   138,   139,   144,   148,
+     150,   151,    18,    89,    52,     3,     4,     5,     6,     7,
+      10,    55,    60,    61,    62,    63,    64,    83,    90,   100,
+     101,   100,    29,    85,   100,   108,   109,   110,     7,    39,
+       7,    78,   149,    30,    47,    49,   146,     7,     7,     7,
+      67,    67,     7,    20,    98,    89,    40,   116,    89,    31,
+     111,   121,    89,    89,   111,   121,    89,    89,    89,    89,
+      89,    89,    89,    89,    89,    89,    89,    89,    89,    89,
+      89,   116,   100,    88,   100,    88,   100,   100,     8,     9,
+      11,    12,    13,    22,    73,    80,    81,    82,    83,    84,
+      85,    86,    90,    25,    90,    39,    93,    30,    15,   149,
+      42,   149,   149,    50,   147,    39,    90,    90,    44,   100,
+      89,    59,    59,    91,   100,   100,   100,   100,   100,    99,
+       5,   100,   100,   100,   100,   100,   100,   100,   100,   107,
+      99,    85,     7,   106,   108,   105,   149,   100,     7,   119,
+     120,    90,    48,     7,   104,   106,    92,   102,   107,    45,
+      23,    24,   129,   130,   131,    91,    93,    20,    91,    93,
+      31,    93,   111,    33,    80,    93,     7,   140,   141,     7,
+      90,    91,    93,    91,     7,    99,   100,   129,    20,   100,
+      25,     7,   149,    32,   112,   100,   100,   119,   152,    91,
+      93,    51,    91,    95,    92,    22,    21,    41,    70,   113,
+      25,    90,   142,   140,   149,    99,    15,    34,   115,    99,
+       3,    10,   143,    90,    71,    35,    20,    91,     6,     7,
+     145,    72,     7,    25,    91,    93,    36,    37,   114,     7
 };
 
   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,   116,   117,   118,   118,   118,   118,   118,   118,   118,
-     118,   118,   118,   118,   118,   118,   118,   118,   118,   118,
-     118,   118,   118,   118,   118,   119,   119,   120,   120,   120,
-     120,   120,   120,   120,   120,   120,   120,   120,   120,   120,
-     120,   120,   120,   120,   120,   120,   120,   120,   120,   120,
-     120,   120,   121,   121,   121,   121,   121,   121,   121,   121,
-     121,   121,   121,   122,   122,   122,   123,   124,   125,   125,
-     125,   126,   127,   127,   128,   128,   128,   129,   129,   129,
-     130,   130,   130,   130,   131,   131,   131,   132,   132,   132,
-     133,   133,   134,   134,   135,   135,   136,   136,   136,   137,
-     137,   138,   139,   140,   140,   141,   142,   142,   143,   144,
-     145,   146,   147,   148,   149,   150,   151,   152,   153,   153,
-     154,   154,   154,   155,   156,   157,   158,   159,   160,   161,
-     162,   162,   163,   164,   164,   165,   165,   166,   166,   167,
-     167,   168,   168,   169,   169,   170,   171,   171,   172,   172,
-     173,   173,   174,   175,   175,   176,   177,   178,   178,   178,
-     178,   178,   179,   179,   180,   180,   180,   181,   182,   182,
-     182,   183,   184,   185,   185,   186,   186,   186,   187
+       0,    96,    97,    98,    98,    98,    98,    98,    98,    98,
+      98,    98,    98,    98,    98,    98,    98,    98,    98,    98,
+      98,    98,    98,    99,    99,   100,   100,   100,   100,   100,
+     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
+     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
+     101,   101,   101,   101,   101,   102,   102,   102,   103,   104,
+     105,   105,   106,   106,   106,   107,   107,   107,   108,   108,
+     109,   109,   109,   110,   110,   110,   111,   111,   112,   112,
+     113,   113,   114,   114,   114,   115,   115,   116,   117,   118,
+     118,   119,   120,   120,   121,   122,   123,   124,   125,   126,
+     127,   128,   129,   130,   130,   131,   131,   131,   132,   133,
+     134,   135,   136,   137,   138,   139,   139,   140,   141,   141,
+     142,   142,   143,   143,   144,   145,   145,   146,   146,   147,
+     147,   148,   149,   149,   150,   151,   152,   152,   152,   153,
+     154,   154,   154,   155,   156,   157,   157,   158,   158,   158,
+     159
 };
 
   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
@@ -1003,22 +910,20 @@
 {
        0,     2,     2,     1,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     1,     2,     1,     4,     1,
-       1,     1,     1,     1,     3,     3,     3,     3,     2,     3,
-       3,     3,     3,     3,     3,     3,     3,     3,     3,     2,
-       3,     3,     1,     1,     1,     1,     1,     1,     1,     1,
-       1,     1,     1,     0,     1,     3,     6,     4,     1,     1,
-       1,     3,     1,     3,     0,     1,     3,     0,     1,     3,
-       1,     4,     5,     4,     0,     1,     3,     1,     3,     1,
-       0,     2,     0,     2,     0,     4,     0,     1,     1,     0,
-       4,     8,     3,     5,     2,     3,     1,     3,     4,     4,
-       2,     2,     3,     2,     2,     2,     3,     4,     1,     2,
-       0,     2,     1,     7,     6,    10,     1,     1,     2,     2,
-       4,     4,     5,     1,     3,     0,     3,     0,     1,     0,
-       2,     0,     1,     0,     3,     8,     1,     3,     0,     1,
-       0,     1,    10,     1,     1,     2,     2,     1,     1,     1,
-       1,     1,     3,     3,     0,     1,     3,     3,     0,     1,
-       2,     6,     4,     1,     1,     0,     1,     2,    11
+       2,     2,     2,     1,     2,     1,     4,     1,     1,     1,
+       1,     1,     3,     3,     3,     3,     2,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     2,     3,     3,
+       1,     1,     1,     1,     1,     0,     1,     3,     6,     3,
+       1,     3,     0,     1,     3,     0,     1,     3,     1,     4,
+       0,     1,     3,     1,     3,     1,     0,     2,     0,     2,
+       0,     4,     0,     1,     1,     0,     4,     8,     3,     5,
+       2,     3,     1,     3,     4,     4,     2,     2,     3,     2,
+       2,     3,     4,     1,     2,     0,     2,     1,     7,     6,
+      10,     1,     1,     2,     2,     4,     4,     4,     1,     3,
+       0,     3,     0,     2,     6,     1,     3,     0,     1,     0,
+       1,    10,     1,     1,     2,     2,     1,     1,     1,     3,
+       0,     1,     2,     6,     4,     1,     1,     0,     1,     2,
+      10
 };
 
 
@@ -1034,22 +939,22 @@
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
-#define YYBACKUP(Token, Value)                                  \
-do                                                              \
-  if (yychar == YYEMPTY)                                        \
-    {                                                           \
-      yychar = (Token);                                         \
-      yylval = (Value);                                         \
-      YYPOPSTACK (yylen);                                       \
-      yystate = *yyssp;                                         \
-      goto yybackup;                                            \
-    }                                                           \
-  else                                                          \
-    {                                                           \
-      yyerror (YY_("syntax error: cannot back up")); \
-      YYERROR;                                                  \
-    }                                                           \
-while (0)
+#define YYBACKUP(Token, Value)                                    \
+  do                                                              \
+    if (yychar == YYEMPTY)                                        \
+      {                                                           \
+        yychar = (Token);                                         \
+        yylval = (Value);                                         \
+        YYPOPSTACK (yylen);                                       \
+        yystate = *yyssp;                                         \
+        goto yybackup;                                            \
+      }                                                           \
+    else                                                          \
+      {                                                           \
+        yyerror (YY_("syntax error: cannot back up")); \
+        YYERROR;                                                  \
+      }                                                           \
+  while (0)
 
 /* Error token number */
 #define YYTERROR        1
@@ -1089,37 +994,39 @@
 } while (0)
 
 
-/*----------------------------------------.
-| Print this symbol's value on YYOUTPUT.  |
-`----------------------------------------*/
+/*-----------------------------------.
+| Print this symbol's value on YYO.  |
+`-----------------------------------*/
 
 static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
 {
-  FILE *yyo = yyoutput;
-  YYUSE (yyo);
+  FILE *yyoutput = yyo;
+  YYUSE (yyoutput);
   if (!yyvaluep)
     return;
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
-    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+    YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
 # endif
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   YYUSE (yytype);
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 }
 
 
-/*--------------------------------.
-| Print this symbol on YYOUTPUT.  |
-`--------------------------------*/
+/*---------------------------.
+| Print this symbol on YYO.  |
+`---------------------------*/
 
 static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
 {
-  YYFPRINTF (yyoutput, "%s %s (",
+  YYFPRINTF (yyo, "%s %s (",
              yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
 
-  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
-  YYFPRINTF (yyoutput, ")");
+  yy_symbol_value_print (yyo, yytype, yyvaluep);
+  YYFPRINTF (yyo, ")");
 }
 
 /*------------------------------------------------------------------.
@@ -1153,7 +1060,7 @@
 static void
 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
 {
-  unsigned long int yylno = yyrline[yyrule];
+  unsigned long yylno = yyrline[yyrule];
   int yynrhs = yyr2[yyrule];
   int yyi;
   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
@@ -1164,7 +1071,7 @@
       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
       yy_symbol_print (stderr,
                        yystos[yyssp[yyi + 1 - yynrhs]],
-                       &(yyvsp[(yyi + 1) - (yynrhs)])
+                       &yyvsp[(yyi + 1) - (yynrhs)]
                                               );
       YYFPRINTF (stderr, "\n");
     }
@@ -1268,7 +1175,10 @@
           case '\\':
             if (*++yyp != '\\')
               goto do_not_strip_quotes;
-            /* Fall through.  */
+            else
+              goto append;
+
+          append:
           default:
             if (yyres)
               yyres[yyn] = *yyp;
@@ -1286,7 +1196,7 @@
   if (! yyres)
     return yystrlen (yystr);
 
-  return yystpcpy (yyres, yystr) - yyres;
+  return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
 }
 # endif
 
@@ -1364,10 +1274,10 @@
                 yyarg[yycount++] = yytname[yyx];
                 {
                   YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
-                  if (! (yysize <= yysize1
-                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                  if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+                    yysize = yysize1;
+                  else
                     return 2;
-                  yysize = yysize1;
                 }
               }
         }
@@ -1379,6 +1289,7 @@
       case N:                               \
         yyformat = S;                       \
       break
+    default: /* Avoid compiler warnings. */
       YYCASE_(0, YY_("syntax error"));
       YYCASE_(1, YY_("syntax error, unexpected %s"));
       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
@@ -1390,9 +1301,10 @@
 
   {
     YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
-    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+    if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+      yysize = yysize1;
+    else
       return 2;
-    yysize = yysize1;
   }
 
   if (*yymsg_alloc < yysize)
@@ -1518,23 +1430,33 @@
   yychar = YYEMPTY; /* Cause a token to be read.  */
   goto yysetstate;
 
+
 /*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate.  |
+| yynewstate -- push a new state, which is found in yystate.  |
 `------------------------------------------------------------*/
- yynewstate:
+yynewstate:
   /* In all cases, when you get here, the value and location stacks
      have just been pushed.  So pushing a state here evens the stacks.  */
   yyssp++;
 
- yysetstate:
-  *yyssp = yystate;
+
+/*--------------------------------------------------------------------.
+| yynewstate -- set current state (the top of the stack) to yystate.  |
+`--------------------------------------------------------------------*/
+yysetstate:
+  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
+  *yyssp = (yytype_int16) yystate;
 
   if (yyss + yystacksize - 1 <= yyssp)
+#if !defined yyoverflow && !defined YYSTACK_RELOCATE
+    goto yyexhaustedlab;
+#else
     {
       /* Get the current used size of the three stacks, in elements.  */
-      YYSIZE_T yysize = yyssp - yyss + 1;
+      YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
 
-#ifdef yyoverflow
+# if defined yyoverflow
       {
         /* Give user a chance to reallocate the stack.  Use copies of
            these so that the &'s don't force the real ones into
@@ -1550,14 +1472,10 @@
                     &yyss1, yysize * sizeof (*yyssp),
                     &yyvs1, yysize * sizeof (*yyvsp),
                     &yystacksize);
-
         yyss = yyss1;
         yyvs = yyvs1;
       }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
-      goto yyexhaustedlab;
-# else
+# else /* defined YYSTACK_RELOCATE */
       /* Extend the stack our own way.  */
       if (YYMAXDEPTH <= yystacksize)
         goto yyexhaustedlab;
@@ -1573,35 +1491,33 @@
           goto yyexhaustedlab;
         YYSTACK_RELOCATE (yyss_alloc, yyss);
         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-#  undef YYSTACK_RELOCATE
+# undef YYSTACK_RELOCATE
         if (yyss1 != yyssa)
           YYSTACK_FREE (yyss1);
       }
 # endif
-#endif /* no yyoverflow */
 
       yyssp = yyss + yysize - 1;
       yyvsp = yyvs + yysize - 1;
 
       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
-                  (unsigned long int) yystacksize));
+                  (unsigned long) yystacksize));
 
       if (yyss + yystacksize - 1 <= yyssp)
         YYABORT;
     }
-
-  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
 
   if (yystate == YYFINAL)
     YYACCEPT;
 
   goto yybackup;
 
+
 /*-----------.
 | yybackup.  |
 `-----------*/
 yybackup:
-
   /* Do appropriate processing given the current state.  Read a
      lookahead token if we need one and don't already have one.  */
 
@@ -1659,7 +1575,6 @@
   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
   YY_IGNORE_MAYBE_UNINITIALIZED_END
-
   goto yynewstate;
 
 
@@ -1674,7 +1589,7 @@
 
 
 /*-----------------------------.
-| yyreduce -- Do a reduction.  |
+| yyreduce -- do a reduction.  |
 `-----------------------------*/
 yyreduce:
   /* yyn is the number of a rule to reduce with.  */
@@ -1694,953 +1609,779 @@
   YY_REDUCE_PRINT (yyn);
   switch (yyn)
     {
-        case 25:
-#line 188 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 1701 "pars0grm.cc" /* yacc.c:1646  */
+  case 23:
+#line 166 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 1616 "pars0grm.cc"
+    break;
+
+  case 24:
+#line 168 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); }
+#line 1622 "pars0grm.cc"
+    break;
+
+  case 25:
+#line 172 "pars0grm.y"
+    { yyval = yyvsp[0];}
+#line 1628 "pars0grm.cc"
     break;
 
   case 26:
-#line 190 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-1]), (yyvsp[0])); }
-#line 1707 "pars0grm.cc" /* yacc.c:1646  */
+#line 174 "pars0grm.y"
+    { yyval = pars_func(yyvsp[-3], yyvsp[-1]); }
+#line 1634 "pars0grm.cc"
     break;
 
   case 27:
-#line 194 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]);}
-#line 1713 "pars0grm.cc" /* yacc.c:1646  */
+#line 175 "pars0grm.y"
+    { yyval = yyvsp[0];}
+#line 1640 "pars0grm.cc"
     break;
 
   case 28:
-#line 196 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_func((yyvsp[-3]), (yyvsp[-1])); }
-#line 1719 "pars0grm.cc" /* yacc.c:1646  */
+#line 176 "pars0grm.y"
+    { yyval = yyvsp[0];}
+#line 1646 "pars0grm.cc"
     break;
 
   case 29:
-#line 197 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]);}
-#line 1725 "pars0grm.cc" /* yacc.c:1646  */
+#line 177 "pars0grm.y"
+    { yyval = yyvsp[0];}
+#line 1652 "pars0grm.cc"
     break;
 
   case 30:
-#line 198 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]);}
-#line 1731 "pars0grm.cc" /* yacc.c:1646  */
+#line 178 "pars0grm.y"
+    { yyval = yyvsp[0];}
+#line 1658 "pars0grm.cc"
     break;
 
   case 31:
-#line 199 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]);}
-#line 1737 "pars0grm.cc" /* yacc.c:1646  */
+#line 179 "pars0grm.y"
+    { yyval = yyvsp[0];}
+#line 1664 "pars0grm.cc"
     break;
 
   case 32:
-#line 200 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]);}
-#line 1743 "pars0grm.cc" /* yacc.c:1646  */
+#line 180 "pars0grm.y"
+    { yyval = pars_op('+', yyvsp[-2], yyvsp[0]); }
+#line 1670 "pars0grm.cc"
     break;
 
   case 33:
-#line 201 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]);}
-#line 1749 "pars0grm.cc" /* yacc.c:1646  */
+#line 181 "pars0grm.y"
+    { yyval = pars_op('-', yyvsp[-2], yyvsp[0]); }
+#line 1676 "pars0grm.cc"
     break;
 
   case 34:
-#line 202 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('+', (yyvsp[-2]), (yyvsp[0])); }
-#line 1755 "pars0grm.cc" /* yacc.c:1646  */
+#line 182 "pars0grm.y"
+    { yyval = pars_op('*', yyvsp[-2], yyvsp[0]); }
+#line 1682 "pars0grm.cc"
     break;
 
   case 35:
-#line 203 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('-', (yyvsp[-2]), (yyvsp[0])); }
-#line 1761 "pars0grm.cc" /* yacc.c:1646  */
+#line 183 "pars0grm.y"
+    { yyval = pars_op('/', yyvsp[-2], yyvsp[0]); }
+#line 1688 "pars0grm.cc"
     break;
 
   case 36:
-#line 204 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('*', (yyvsp[-2]), (yyvsp[0])); }
-#line 1767 "pars0grm.cc" /* yacc.c:1646  */
+#line 184 "pars0grm.y"
+    { yyval = pars_op('-', yyvsp[0], NULL); }
+#line 1694 "pars0grm.cc"
     break;
 
   case 37:
-#line 205 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('/', (yyvsp[-2]), (yyvsp[0])); }
-#line 1773 "pars0grm.cc" /* yacc.c:1646  */
+#line 185 "pars0grm.y"
+    { yyval = yyvsp[-1]; }
+#line 1700 "pars0grm.cc"
     break;
 
   case 38:
-#line 206 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('-', (yyvsp[0]), NULL); }
-#line 1779 "pars0grm.cc" /* yacc.c:1646  */
+#line 186 "pars0grm.y"
+    { yyval = pars_op('=', yyvsp[-2], yyvsp[0]); }
+#line 1706 "pars0grm.cc"
     break;
 
   case 39:
-#line 207 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[-1]); }
-#line 1785 "pars0grm.cc" /* yacc.c:1646  */
+#line 188 "pars0grm.y"
+    { yyval = pars_op(PARS_LIKE_TOKEN, yyvsp[-2], yyvsp[0]); }
+#line 1712 "pars0grm.cc"
     break;
 
   case 40:
-#line 208 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('=', (yyvsp[-2]), (yyvsp[0])); }
-#line 1791 "pars0grm.cc" /* yacc.c:1646  */
+#line 189 "pars0grm.y"
+    { yyval = pars_op('<', yyvsp[-2], yyvsp[0]); }
+#line 1718 "pars0grm.cc"
     break;
 
   case 41:
-#line 210 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_LIKE_TOKEN, (yyvsp[-2]), (yyvsp[0])); }
-#line 1797 "pars0grm.cc" /* yacc.c:1646  */
+#line 190 "pars0grm.y"
+    { yyval = pars_op('>', yyvsp[-2], yyvsp[0]); }
+#line 1724 "pars0grm.cc"
     break;
 
   case 42:
-#line 211 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('<', (yyvsp[-2]), (yyvsp[0])); }
-#line 1803 "pars0grm.cc" /* yacc.c:1646  */
+#line 191 "pars0grm.y"
+    { yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); }
+#line 1730 "pars0grm.cc"
     break;
 
   case 43:
-#line 212 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op('>', (yyvsp[-2]), (yyvsp[0])); }
-#line 1809 "pars0grm.cc" /* yacc.c:1646  */
+#line 192 "pars0grm.y"
+    { yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); }
+#line 1736 "pars0grm.cc"
     break;
 
   case 44:
-#line 213 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_GE_TOKEN, (yyvsp[-2]), (yyvsp[0])); }
-#line 1815 "pars0grm.cc" /* yacc.c:1646  */
+#line 193 "pars0grm.y"
+    { yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); }
+#line 1742 "pars0grm.cc"
     break;
 
   case 45:
-#line 214 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_LE_TOKEN, (yyvsp[-2]), (yyvsp[0])); }
-#line 1821 "pars0grm.cc" /* yacc.c:1646  */
+#line 194 "pars0grm.y"
+    { yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); }
+#line 1748 "pars0grm.cc"
     break;
 
   case 46:
-#line 215 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_NE_TOKEN, (yyvsp[-2]), (yyvsp[0])); }
-#line 1827 "pars0grm.cc" /* yacc.c:1646  */
+#line 195 "pars0grm.y"
+    { yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); }
+#line 1754 "pars0grm.cc"
     break;
 
   case 47:
-#line 216 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_AND_TOKEN, (yyvsp[-2]), (yyvsp[0])); }
-#line 1833 "pars0grm.cc" /* yacc.c:1646  */
+#line 196 "pars0grm.y"
+    { yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); }
+#line 1760 "pars0grm.cc"
     break;
 
   case 48:
-#line 217 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_OR_TOKEN, (yyvsp[-2]), (yyvsp[0])); }
-#line 1839 "pars0grm.cc" /* yacc.c:1646  */
+#line 198 "pars0grm.y"
+    { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); }
+#line 1766 "pars0grm.cc"
     break;
 
   case 49:
-#line 218 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_NOT_TOKEN, (yyvsp[0]), NULL); }
-#line 1845 "pars0grm.cc" /* yacc.c:1646  */
+#line 200 "pars0grm.y"
+    { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); }
+#line 1772 "pars0grm.cc"
     break;
 
   case 50:
-#line 220 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_NOTFOUND_TOKEN, (yyvsp[-2]), NULL); }
-#line 1851 "pars0grm.cc" /* yacc.c:1646  */
+#line 204 "pars0grm.y"
+    { yyval = &pars_to_binary_token; }
+#line 1778 "pars0grm.cc"
     break;
 
   case 51:
-#line 222 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_op(PARS_NOTFOUND_TOKEN, (yyvsp[-2]), NULL); }
-#line 1857 "pars0grm.cc" /* yacc.c:1646  */
+#line 205 "pars0grm.y"
+    { yyval = &pars_substr_token; }
+#line 1784 "pars0grm.cc"
     break;
 
   case 52:
-#line 226 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_to_char_token; }
-#line 1863 "pars0grm.cc" /* yacc.c:1646  */
+#line 206 "pars0grm.y"
+    { yyval = &pars_concat_token; }
+#line 1790 "pars0grm.cc"
     break;
 
   case 53:
-#line 227 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_to_number_token; }
-#line 1869 "pars0grm.cc" /* yacc.c:1646  */
+#line 207 "pars0grm.y"
+    { yyval = &pars_instr_token; }
+#line 1796 "pars0grm.cc"
     break;
 
   case 54:
-#line 228 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_to_binary_token; }
-#line 1875 "pars0grm.cc" /* yacc.c:1646  */
+#line 208 "pars0grm.y"
+    { yyval = &pars_length_token; }
+#line 1802 "pars0grm.cc"
     break;
 
-  case 55:
-#line 230 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_binary_to_number_token; }
-#line 1881 "pars0grm.cc" /* yacc.c:1646  */
+  case 58:
+#line 219 "pars0grm.y"
+    { yyval = pars_stored_procedure_call(
+					static_cast(yyvsp[-4])); }
+#line 1809 "pars0grm.cc"
     break;
 
-  case 56:
-#line 231 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_substr_token; }
-#line 1887 "pars0grm.cc" /* yacc.c:1646  */
+  case 59:
+#line 224 "pars0grm.y"
+    { yyval = yyvsp[-2]; }
+#line 1815 "pars0grm.cc"
     break;
 
-  case 57:
-#line 232 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_concat_token; }
-#line 1893 "pars0grm.cc" /* yacc.c:1646  */
+  case 60:
+#line 228 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 1821 "pars0grm.cc"
     break;
 
-  case 58:
-#line 233 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_instr_token; }
-#line 1899 "pars0grm.cc" /* yacc.c:1646  */
+  case 61:
+#line 230 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 1827 "pars0grm.cc"
     break;
 
-  case 59:
-#line 234 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_length_token; }
-#line 1905 "pars0grm.cc" /* yacc.c:1646  */
+  case 62:
+#line 234 "pars0grm.y"
+    { yyval = NULL; }
+#line 1833 "pars0grm.cc"
     break;
 
-  case 60:
-#line 235 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_sysdate_token; }
-#line 1911 "pars0grm.cc" /* yacc.c:1646  */
+  case 63:
+#line 235 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 1839 "pars0grm.cc"
     break;
 
-  case 61:
-#line 236 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_rnd_token; }
-#line 1917 "pars0grm.cc" /* yacc.c:1646  */
+  case 64:
+#line 237 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 1845 "pars0grm.cc"
     break;
 
-  case 62:
-#line 237 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_rnd_str_token; }
-#line 1923 "pars0grm.cc" /* yacc.c:1646  */
+  case 65:
+#line 241 "pars0grm.y"
+    { yyval = NULL; }
+#line 1851 "pars0grm.cc"
     break;
 
   case 66:
-#line 248 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_stored_procedure_call(
-					static_cast((yyvsp[-4]))); }
-#line 1930 "pars0grm.cc" /* yacc.c:1646  */
+#line 242 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]);}
+#line 1857 "pars0grm.cc"
     break;
 
   case 67:
-#line 254 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_procedure_call((yyvsp[-3]), (yyvsp[-1])); }
-#line 1936 "pars0grm.cc" /* yacc.c:1646  */
+#line 243 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 1863 "pars0grm.cc"
     break;
 
   case 68:
-#line 258 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_replstr_token; }
-#line 1942 "pars0grm.cc" /* yacc.c:1646  */
+#line 247 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 1869 "pars0grm.cc"
     break;
 
   case 69:
-#line 259 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_printf_token; }
-#line 1948 "pars0grm.cc" /* yacc.c:1646  */
+#line 249 "pars0grm.y"
+    { yyval = pars_func(&pars_count_token,
+					  que_node_list_add_last(NULL,
+					    sym_tab_add_int_lit(
+						pars_sym_tab_global, 1))); }
+#line 1878 "pars0grm.cc"
     break;
 
   case 70:
-#line 260 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_assert_token; }
-#line 1954 "pars0grm.cc" /* yacc.c:1646  */
+#line 256 "pars0grm.y"
+    { yyval = NULL; }
+#line 1884 "pars0grm.cc"
     break;
 
   case 71:
-#line 264 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[-2]); }
-#line 1960 "pars0grm.cc" /* yacc.c:1646  */
+#line 257 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 1890 "pars0grm.cc"
     break;
 
   case 72:
-#line 268 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 1966 "pars0grm.cc" /* yacc.c:1646  */
+#line 259 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 1896 "pars0grm.cc"
     break;
 
   case 73:
-#line 270 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 1972 "pars0grm.cc" /* yacc.c:1646  */
+#line 263 "pars0grm.y"
+    { yyval = pars_select_list(&pars_star_denoter,
+								NULL); }
+#line 1903 "pars0grm.cc"
     break;
 
   case 74:
-#line 274 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 1978 "pars0grm.cc" /* yacc.c:1646  */
+#line 266 "pars0grm.y"
+    { yyval = pars_select_list(
+					yyvsp[-2], static_cast(yyvsp[0])); }
+#line 1910 "pars0grm.cc"
     break;
 
   case 75:
-#line 275 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 1984 "pars0grm.cc" /* yacc.c:1646  */
+#line 268 "pars0grm.y"
+    { yyval = pars_select_list(yyvsp[0], NULL); }
+#line 1916 "pars0grm.cc"
     break;
 
   case 76:
-#line 277 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 1990 "pars0grm.cc" /* yacc.c:1646  */
+#line 272 "pars0grm.y"
+    { yyval = NULL; }
+#line 1922 "pars0grm.cc"
     break;
 
   case 77:
-#line 281 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 1996 "pars0grm.cc" /* yacc.c:1646  */
+#line 273 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 1928 "pars0grm.cc"
     break;
 
   case 78:
-#line 282 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0]));}
-#line 2002 "pars0grm.cc" /* yacc.c:1646  */
+#line 277 "pars0grm.y"
+    { yyval = NULL; }
+#line 1934 "pars0grm.cc"
     break;
 
   case 79:
-#line 283 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 2008 "pars0grm.cc" /* yacc.c:1646  */
+#line 279 "pars0grm.y"
+    { yyval = &pars_update_token; }
+#line 1940 "pars0grm.cc"
     break;
 
   case 80:
-#line 287 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2014 "pars0grm.cc" /* yacc.c:1646  */
+#line 283 "pars0grm.y"
+    { yyval = NULL; }
+#line 1946 "pars0grm.cc"
     break;
 
   case 81:
-#line 289 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_func(&pars_count_token,
-				          que_node_list_add_last(NULL,
-					    sym_tab_add_int_lit(
-						pars_sym_tab_global, 1))); }
-#line 2023 "pars0grm.cc" /* yacc.c:1646  */
+#line 285 "pars0grm.y"
+    { yyval = &pars_share_token; }
+#line 1952 "pars0grm.cc"
     break;
 
   case 82:
-#line 294 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_func(&pars_count_token,
-					    que_node_list_add_last(NULL,
-						pars_func(&pars_distinct_token,
-						     que_node_list_add_last(
-								NULL, (yyvsp[-1]))))); }
-#line 2033 "pars0grm.cc" /* yacc.c:1646  */
+#line 289 "pars0grm.y"
+    { yyval = &pars_asc_token; }
+#line 1958 "pars0grm.cc"
     break;
 
   case 83:
-#line 300 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_func(&pars_sum_token,
-						que_node_list_add_last(NULL,
-									(yyvsp[-1]))); }
-#line 2041 "pars0grm.cc" /* yacc.c:1646  */
+#line 290 "pars0grm.y"
+    { yyval = &pars_asc_token; }
+#line 1964 "pars0grm.cc"
     break;
 
   case 84:
-#line 306 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2047 "pars0grm.cc" /* yacc.c:1646  */
+#line 291 "pars0grm.y"
+    { yyval = &pars_desc_token; }
+#line 1970 "pars0grm.cc"
     break;
 
   case 85:
-#line 307 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 2053 "pars0grm.cc" /* yacc.c:1646  */
+#line 295 "pars0grm.y"
+    { yyval = NULL; }
+#line 1976 "pars0grm.cc"
     break;
 
   case 86:
-#line 309 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 2059 "pars0grm.cc" /* yacc.c:1646  */
+#line 297 "pars0grm.y"
+    { yyval = pars_order_by(
+					static_cast(yyvsp[-1]),
+					static_cast(yyvsp[0])); }
+#line 1984 "pars0grm.cc"
     break;
 
   case 87:
-#line 313 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_select_list(&pars_star_denoter,
-								NULL); }
-#line 2066 "pars0grm.cc" /* yacc.c:1646  */
+#line 308 "pars0grm.y"
+    { yyval = pars_select_statement(
+					static_cast(yyvsp[-6]),
+					static_cast(yyvsp[-4]),
+					static_cast(yyvsp[-3]),
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[-1]),
+					static_cast(yyvsp[0])); }
+#line 1996 "pars0grm.cc"
     break;
 
   case 88:
-#line 316 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_select_list(
-					(yyvsp[-2]), static_cast((yyvsp[0]))); }
-#line 2073 "pars0grm.cc" /* yacc.c:1646  */
+#line 319 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 2002 "pars0grm.cc"
     break;
 
   case 89:
-#line 318 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_select_list((yyvsp[0]), NULL); }
-#line 2079 "pars0grm.cc" /* yacc.c:1646  */
+#line 324 "pars0grm.y"
+    { yyval = pars_insert_statement(
+					static_cast(yyvsp[-4]), yyvsp[-1], NULL); }
+#line 2009 "pars0grm.cc"
     break;
 
   case 90:
-#line 322 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2085 "pars0grm.cc" /* yacc.c:1646  */
+#line 327 "pars0grm.y"
+    { yyval = pars_insert_statement(
+					static_cast(yyvsp[-1]),
+					NULL,
+					static_cast(yyvsp[0])); }
+#line 2018 "pars0grm.cc"
     break;
 
   case 91:
-#line 323 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2091 "pars0grm.cc" /* yacc.c:1646  */
+#line 334 "pars0grm.y"
+    { yyval = pars_column_assignment(
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[0])); }
+#line 2026 "pars0grm.cc"
     break;
 
   case 92:
-#line 327 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2097 "pars0grm.cc" /* yacc.c:1646  */
+#line 340 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 2032 "pars0grm.cc"
     break;
 
   case 93:
-#line 329 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_update_token; }
-#line 2103 "pars0grm.cc" /* yacc.c:1646  */
+#line 342 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 2038 "pars0grm.cc"
     break;
 
   case 94:
-#line 333 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2109 "pars0grm.cc" /* yacc.c:1646  */
+#line 348 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 2044 "pars0grm.cc"
     break;
 
   case 95:
-#line 335 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_share_token; }
-#line 2115 "pars0grm.cc" /* yacc.c:1646  */
+#line 354 "pars0grm.y"
+    { yyval = pars_update_statement_start(
+					FALSE,
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[0])); }
+#line 2053 "pars0grm.cc"
     break;
 
   case 96:
-#line 339 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_asc_token; }
-#line 2121 "pars0grm.cc" /* yacc.c:1646  */
+#line 362 "pars0grm.y"
+    { yyval = pars_update_statement(
+					static_cast(yyvsp[-1]),
+					NULL,
+					static_cast(yyvsp[0])); }
+#line 2062 "pars0grm.cc"
     break;
 
   case 97:
-#line 340 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_asc_token; }
-#line 2127 "pars0grm.cc" /* yacc.c:1646  */
+#line 370 "pars0grm.y"
+    { yyval = pars_update_statement(
+					static_cast(yyvsp[-1]),
+					static_cast(yyvsp[0]),
+					NULL); }
+#line 2071 "pars0grm.cc"
     break;
 
   case 98:
-#line 341 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_desc_token; }
-#line 2133 "pars0grm.cc" /* yacc.c:1646  */
+#line 378 "pars0grm.y"
+    { yyval = pars_update_statement_start(
+					TRUE,
+					static_cast(yyvsp[0]), NULL); }
+#line 2079 "pars0grm.cc"
     break;
 
   case 99:
-#line 345 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2139 "pars0grm.cc" /* yacc.c:1646  */
+#line 385 "pars0grm.y"
+    { yyval = pars_update_statement(
+					static_cast(yyvsp[-1]),
+					NULL,
+					static_cast(yyvsp[0])); }
+#line 2088 "pars0grm.cc"
     break;
 
   case 100:
-#line 347 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_order_by(
-					static_cast((yyvsp[-1])),
-					static_cast((yyvsp[0]))); }
-#line 2147 "pars0grm.cc" /* yacc.c:1646  */
+#line 393 "pars0grm.y"
+    { yyval = pars_update_statement(
+					static_cast(yyvsp[-1]),
+					static_cast(yyvsp[0]),
+					NULL); }
+#line 2097 "pars0grm.cc"
     break;
 
   case 101:
-#line 358 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_select_statement(
-					static_cast((yyvsp[-6])),
-					static_cast((yyvsp[-4])),
-					static_cast((yyvsp[-3])),
-					static_cast((yyvsp[-2])),
-					static_cast((yyvsp[-1])),
-					static_cast((yyvsp[0]))); }
-#line 2159 "pars0grm.cc" /* yacc.c:1646  */
+#line 401 "pars0grm.y"
+    { yyval = pars_assignment_statement(
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[0])); }
+#line 2105 "pars0grm.cc"
     break;
 
   case 102:
-#line 369 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2165 "pars0grm.cc" /* yacc.c:1646  */
+#line 409 "pars0grm.y"
+    { yyval = pars_elsif_element(yyvsp[-2], yyvsp[0]); }
+#line 2111 "pars0grm.cc"
     break;
 
   case 103:
-#line 374 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_insert_statement(
-					static_cast((yyvsp[-4])), (yyvsp[-1]), NULL); }
-#line 2172 "pars0grm.cc" /* yacc.c:1646  */
+#line 413 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 2117 "pars0grm.cc"
     break;
 
   case 104:
-#line 377 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_insert_statement(
-					static_cast((yyvsp[-1])),
-					NULL,
-					static_cast((yyvsp[0]))); }
-#line 2181 "pars0grm.cc" /* yacc.c:1646  */
+#line 415 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); }
+#line 2123 "pars0grm.cc"
     break;
 
   case 105:
-#line 384 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_column_assignment(
-					static_cast((yyvsp[-2])),
-					static_cast((yyvsp[0]))); }
-#line 2189 "pars0grm.cc" /* yacc.c:1646  */
+#line 419 "pars0grm.y"
+    { yyval = NULL; }
+#line 2129 "pars0grm.cc"
     break;
 
   case 106:
-#line 390 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 2195 "pars0grm.cc" /* yacc.c:1646  */
+#line 421 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 2135 "pars0grm.cc"
     break;
 
   case 107:
-#line 392 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 2201 "pars0grm.cc" /* yacc.c:1646  */
+#line 422 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 2141 "pars0grm.cc"
     break;
 
   case 108:
-#line 398 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2207 "pars0grm.cc" /* yacc.c:1646  */
+#line 429 "pars0grm.y"
+    { yyval = pars_if_statement(yyvsp[-5], yyvsp[-3], yyvsp[-2]); }
+#line 2147 "pars0grm.cc"
     break;
 
   case 109:
-#line 404 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_update_statement_start(
-					FALSE,
-					static_cast((yyvsp[-2])),
-					static_cast((yyvsp[0]))); }
-#line 2216 "pars0grm.cc" /* yacc.c:1646  */
+#line 435 "pars0grm.y"
+    { yyval = pars_while_statement(yyvsp[-4], yyvsp[-2]); }
+#line 2153 "pars0grm.cc"
     break;
 
   case 110:
-#line 412 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_update_statement(
-					static_cast((yyvsp[-1])),
-					NULL,
-					static_cast((yyvsp[0]))); }
-#line 2225 "pars0grm.cc" /* yacc.c:1646  */
+#line 443 "pars0grm.y"
+    { yyval = pars_for_statement(
+					static_cast(yyvsp[-8]),
+					yyvsp[-6], yyvsp[-4], yyvsp[-2]); }
+#line 2161 "pars0grm.cc"
     break;
 
   case 111:
-#line 420 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_update_statement(
-					static_cast((yyvsp[-1])),
-					static_cast((yyvsp[0])),
-					NULL); }
-#line 2234 "pars0grm.cc" /* yacc.c:1646  */
+#line 449 "pars0grm.y"
+    { yyval = pars_exit_statement(); }
+#line 2167 "pars0grm.cc"
     break;
 
   case 112:
-#line 428 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_update_statement_start(
-					TRUE,
-					static_cast((yyvsp[0])), NULL); }
-#line 2242 "pars0grm.cc" /* yacc.c:1646  */
+#line 453 "pars0grm.y"
+    { yyval = pars_return_statement(); }
+#line 2173 "pars0grm.cc"
     break;
 
   case 113:
-#line 435 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_update_statement(
-					static_cast((yyvsp[-1])),
-					NULL,
-					static_cast((yyvsp[0]))); }
-#line 2251 "pars0grm.cc" /* yacc.c:1646  */
+#line 458 "pars0grm.y"
+    { yyval = pars_open_statement(
+						ROW_SEL_OPEN_CURSOR,
+						static_cast(yyvsp[0])); }
+#line 2181 "pars0grm.cc"
     break;
 
   case 114:
-#line 443 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_update_statement(
-					static_cast((yyvsp[-1])),
-					static_cast((yyvsp[0])),
-					NULL); }
-#line 2260 "pars0grm.cc" /* yacc.c:1646  */
+#line 465 "pars0grm.y"
+    { yyval = pars_open_statement(
+						ROW_SEL_CLOSE_CURSOR,
+						static_cast(yyvsp[0])); }
+#line 2189 "pars0grm.cc"
     break;
 
   case 115:
-#line 451 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_row_printf_statement(
-					static_cast((yyvsp[0]))); }
-#line 2267 "pars0grm.cc" /* yacc.c:1646  */
+#line 472 "pars0grm.y"
+    { yyval = pars_fetch_statement(
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[0]), NULL); }
+#line 2197 "pars0grm.cc"
     break;
 
   case 116:
-#line 457 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_assignment_statement(
-					static_cast((yyvsp[-2])),
-					static_cast((yyvsp[0]))); }
-#line 2275 "pars0grm.cc" /* yacc.c:1646  */
+#line 476 "pars0grm.y"
+    { yyval = pars_fetch_statement(
+					static_cast(yyvsp[-2]),
+					NULL,
+					static_cast(yyvsp[0])); }
+#line 2206 "pars0grm.cc"
     break;
 
   case 117:
-#line 465 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_elsif_element((yyvsp[-2]), (yyvsp[0])); }
-#line 2281 "pars0grm.cc" /* yacc.c:1646  */
+#line 484 "pars0grm.y"
+    { yyval = pars_column_def(
+					static_cast(yyvsp[-3]),
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[-1]),
+					yyvsp[0]); }
+#line 2216 "pars0grm.cc"
     break;
 
   case 118:
-#line 469 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 2287 "pars0grm.cc" /* yacc.c:1646  */
+#line 492 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 2222 "pars0grm.cc"
     break;
 
   case 119:
-#line 471 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-1]), (yyvsp[0])); }
-#line 2293 "pars0grm.cc" /* yacc.c:1646  */
+#line 494 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 2228 "pars0grm.cc"
     break;
 
   case 120:
-#line 475 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2299 "pars0grm.cc" /* yacc.c:1646  */
+#line 498 "pars0grm.y"
+    { yyval = NULL; }
+#line 2234 "pars0grm.cc"
     break;
 
   case 121:
-#line 477 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2305 "pars0grm.cc" /* yacc.c:1646  */
+#line 500 "pars0grm.y"
+    { yyval = yyvsp[-1]; }
+#line 2240 "pars0grm.cc"
     break;
 
   case 122:
-#line 478 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2311 "pars0grm.cc" /* yacc.c:1646  */
+#line 504 "pars0grm.y"
+    { yyval = NULL; }
+#line 2246 "pars0grm.cc"
     break;
 
   case 123:
-#line 485 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_if_statement((yyvsp[-5]), (yyvsp[-3]), (yyvsp[-2])); }
-#line 2317 "pars0grm.cc" /* yacc.c:1646  */
+#line 506 "pars0grm.y"
+    { yyval = &pars_int_token;
+					/* pass any non-NULL pointer */ }
+#line 2253 "pars0grm.cc"
     break;
 
   case 124:
-#line 491 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_while_statement((yyvsp[-4]), (yyvsp[-2])); }
-#line 2323 "pars0grm.cc" /* yacc.c:1646  */
+#line 513 "pars0grm.y"
+    { yyval = pars_create_table(
+					static_cast(yyvsp[-3]),
+					static_cast(yyvsp[-1])); }
+#line 2261 "pars0grm.cc"
     break;
 
   case 125:
-#line 499 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_for_statement(
-					static_cast((yyvsp[-8])),
-					(yyvsp[-6]), (yyvsp[-4]), (yyvsp[-2])); }
-#line 2331 "pars0grm.cc" /* yacc.c:1646  */
+#line 519 "pars0grm.y"
+    { yyval = que_node_list_add_last(NULL, yyvsp[0]); }
+#line 2267 "pars0grm.cc"
     break;
 
   case 126:
-#line 505 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_exit_statement(); }
-#line 2337 "pars0grm.cc" /* yacc.c:1646  */
+#line 521 "pars0grm.y"
+    { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); }
+#line 2273 "pars0grm.cc"
     break;
 
   case 127:
-#line 509 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_return_statement(); }
-#line 2343 "pars0grm.cc" /* yacc.c:1646  */
+#line 525 "pars0grm.y"
+    { yyval = NULL; }
+#line 2279 "pars0grm.cc"
     break;
 
   case 128:
-#line 514 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_open_statement(
-						ROW_SEL_OPEN_CURSOR,
-						static_cast((yyvsp[0]))); }
-#line 2351 "pars0grm.cc" /* yacc.c:1646  */
+#line 526 "pars0grm.y"
+    { yyval = &pars_unique_token; }
+#line 2285 "pars0grm.cc"
     break;
 
   case 129:
-#line 521 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_open_statement(
-						ROW_SEL_CLOSE_CURSOR,
-						static_cast((yyvsp[0]))); }
-#line 2359 "pars0grm.cc" /* yacc.c:1646  */
+#line 530 "pars0grm.y"
+    { yyval = NULL; }
+#line 2291 "pars0grm.cc"
     break;
 
   case 130:
-#line 528 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_fetch_statement(
-					static_cast((yyvsp[-2])),
-					static_cast((yyvsp[0])), NULL); }
-#line 2367 "pars0grm.cc" /* yacc.c:1646  */
+#line 531 "pars0grm.y"
+    { yyval = &pars_clustered_token; }
+#line 2297 "pars0grm.cc"
     break;
 
   case 131:
-#line 532 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_fetch_statement(
-					static_cast((yyvsp[-2])),
-					NULL,
-					static_cast((yyvsp[0]))); }
-#line 2376 "pars0grm.cc" /* yacc.c:1646  */
+#line 540 "pars0grm.y"
+    { yyval = pars_create_index(
+					static_cast(yyvsp[-8]),
+					static_cast(yyvsp[-7]),
+					static_cast(yyvsp[-5]),
+					static_cast(yyvsp[-3]),
+					static_cast(yyvsp[-1])); }
+#line 2308 "pars0grm.cc"
     break;
 
   case 132:
-#line 540 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_column_def(
-					static_cast((yyvsp[-4])),
-					static_cast((yyvsp[-3])),
-					static_cast((yyvsp[-2])),
-					(yyvsp[-1]), (yyvsp[0])); }
-#line 2386 "pars0grm.cc" /* yacc.c:1646  */
+#line 549 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 2314 "pars0grm.cc"
     break;
 
   case 133:
-#line 548 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 2392 "pars0grm.cc" /* yacc.c:1646  */
+#line 550 "pars0grm.y"
+    { yyval = yyvsp[0]; }
+#line 2320 "pars0grm.cc"
     break;
 
   case 134:
-#line 550 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 2398 "pars0grm.cc" /* yacc.c:1646  */
+#line 555 "pars0grm.y"
+    { yyval = pars_commit_statement(); }
+#line 2326 "pars0grm.cc"
     break;
 
   case 135:
-#line 554 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2404 "pars0grm.cc" /* yacc.c:1646  */
+#line 560 "pars0grm.y"
+    { yyval = pars_rollback_statement(); }
+#line 2332 "pars0grm.cc"
     break;
 
   case 136:
-#line 556 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[-1]); }
-#line 2410 "pars0grm.cc" /* yacc.c:1646  */
+#line 564 "pars0grm.y"
+    { yyval = &pars_int_token; }
+#line 2338 "pars0grm.cc"
     break;
 
   case 137:
-#line 560 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2416 "pars0grm.cc" /* yacc.c:1646  */
+#line 565 "pars0grm.y"
+    { yyval = &pars_bigint_token; }
+#line 2344 "pars0grm.cc"
     break;
 
   case 138:
-#line 562 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_int_token;
-					/* pass any non-NULL pointer */ }
-#line 2423 "pars0grm.cc" /* yacc.c:1646  */
+#line 566 "pars0grm.y"
+    { yyval = &pars_char_token; }
+#line 2350 "pars0grm.cc"
     break;
 
   case 139:
-#line 567 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2429 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 140:
-#line 569 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_int_token;
-					/* pass any non-NULL pointer */ }
-#line 2436 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 141:
-#line 574 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2442 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 142:
-#line 575 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_int_token;
-					/* pass any non-NULL pointer */ }
-#line 2449 "pars0grm.cc" /* yacc.c:1646  */
+#line 571 "pars0grm.y"
+    { yyval = pars_variable_declaration(
+					static_cast(yyvsp[-2]),
+					static_cast(yyvsp[-1])); }
+#line 2358 "pars0grm.cc"
     break;
 
   case 143:
-#line 580 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2455 "pars0grm.cc" /* yacc.c:1646  */
+#line 585 "pars0grm.y"
+    { yyval = pars_cursor_declaration(
+					static_cast(yyvsp[-3]),
+					static_cast(yyvsp[-1])); }
+#line 2366 "pars0grm.cc"
     break;
 
   case 144:
-#line 582 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2461 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 145:
-#line 589 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_create_table(
-					static_cast((yyvsp[-5])),
-					static_cast((yyvsp[-3])),
-					static_cast((yyvsp[-1])),
-					static_cast((yyvsp[0]))); }
-#line 2471 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 146:
-#line 597 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 2477 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 147:
-#line 599 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 2483 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 148:
-#line 603 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2489 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 149:
-#line 604 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_unique_token; }
-#line 2495 "pars0grm.cc" /* yacc.c:1646  */
+#line 592 "pars0grm.y"
+    { yyval = pars_function_declaration(
+					static_cast(yyvsp[-1])); }
+#line 2373 "pars0grm.cc"
     break;
 
   case 150:
-#line 608 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2501 "pars0grm.cc" /* yacc.c:1646  */
+#line 614 "pars0grm.y"
+    { yyval = pars_procedure_definition(
+					static_cast(yyvsp[-8]), yyvsp[-1]); }
+#line 2380 "pars0grm.cc"
     break;
 
-  case 151:
-#line 609 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_clustered_token; }
-#line 2507 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 152:
-#line 618 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_create_index(
-					static_cast((yyvsp[-8])),
-					static_cast((yyvsp[-7])),
-					static_cast((yyvsp[-5])),
-					static_cast((yyvsp[-3])),
-					static_cast((yyvsp[-1]))); }
-#line 2518 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 153:
-#line 627 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2524 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 154:
-#line 628 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = (yyvsp[0]); }
-#line 2530 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 155:
-#line 633 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_commit_statement(); }
-#line 2536 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 156:
-#line 638 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_rollback_statement(); }
-#line 2542 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 157:
-#line 642 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_int_token; }
-#line 2548 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 158:
-#line 643 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_bigint_token; }
-#line 2554 "pars0grm.cc" /* yacc.c:1646  */
-    break;
 
-  case 159:
-#line 644 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_char_token; }
-#line 2560 "pars0grm.cc" /* yacc.c:1646  */
-    break;
+#line 2384 "pars0grm.cc"
 
-  case 160:
-#line 645 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_binary_token; }
-#line 2566 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 161:
-#line 646 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = &pars_blob_token; }
-#line 2572 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 162:
-#line 651 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_parameter_declaration(
-					static_cast((yyvsp[-2])),
-					PARS_INPUT,
-					static_cast((yyvsp[0]))); }
-#line 2581 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 163:
-#line 656 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_parameter_declaration(
-					static_cast((yyvsp[-2])),
-					PARS_OUTPUT,
-					static_cast((yyvsp[0]))); }
-#line 2590 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 164:
-#line 663 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = NULL; }
-#line 2596 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 165:
-#line 664 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last(NULL, (yyvsp[0])); }
-#line 2602 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 166:
-#line 666 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = que_node_list_add_last((yyvsp[-2]), (yyvsp[0])); }
-#line 2608 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 167:
-#line 671 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_variable_declaration(
-					static_cast((yyvsp[-2])),
-					static_cast((yyvsp[-1]))); }
-#line 2616 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 171:
-#line 685 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_cursor_declaration(
-					static_cast((yyvsp[-3])),
-					static_cast((yyvsp[-1]))); }
-#line 2624 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 172:
-#line 692 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_function_declaration(
-					static_cast((yyvsp[-1]))); }
-#line 2631 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-  case 178:
-#line 714 "pars0grm.y" /* yacc.c:1646  */
-    { (yyval) = pars_procedure_definition(
-					static_cast((yyvsp[-9])),
-					static_cast((yyvsp[-7])),
-					(yyvsp[-1])); }
-#line 2640 "pars0grm.cc" /* yacc.c:1646  */
-    break;
-
-
-#line 2644 "pars0grm.cc" /* yacc.c:1646  */
       default: break;
     }
   /* User semantic actions sometimes alter yychar, and that requires
@@ -2665,14 +2406,13 @@
   /* Now 'shift' the result of the reduction.  Determine what state
      that goes to, based on the state we popped back to and the rule
      number reduced by.  */
-
-  yyn = yyr1[yyn];
-
-  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
-  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
-    yystate = yytable[yystate];
-  else
-    yystate = yydefgoto[yyn - YYNTOKENS];
+  {
+    const int yylhs = yyr1[yyn] - YYNTOKENS;
+    const int yyi = yypgoto[yylhs] + *yyssp;
+    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
+               ? yytable[yyi]
+               : yydefgoto[yylhs]);
+  }
 
   goto yynewstate;
 
@@ -2755,12 +2495,10 @@
 | yyerrorlab -- error raised explicitly by YYERROR.  |
 `---------------------------------------------------*/
 yyerrorlab:
-
-  /* Pacify compilers like GCC when the user code never invokes
-     YYERROR and the label yyerrorlab therefore never appears in user
-     code.  */
-  if (/*CONSTCOND*/ 0)
-     goto yyerrorlab;
+  /* Pacify compilers when the user code never invokes YYERROR and the
+     label yyerrorlab therefore never appears in user code.  */
+  if (0)
+    YYERROR;
 
   /* Do not reclaim the symbols of the rule whose action triggered
      this YYERROR.  */
@@ -2822,6 +2560,7 @@
   yyresult = 0;
   goto yyreturn;
 
+
 /*-----------------------------------.
 | yyabortlab -- YYABORT comes here.  |
 `-----------------------------------*/
@@ -2829,6 +2568,7 @@
   yyresult = 1;
   goto yyreturn;
 
+
 #if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
@@ -2839,6 +2579,10 @@
   /* Fall through.  */
 #endif
 
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result.  |
+`-----------------------------------------------------*/
 yyreturn:
   if (yychar != YYEMPTY)
     {
@@ -2868,5 +2612,5 @@
 #endif
   return yyresult;
 }
-#line 720 "pars0grm.y" /* yacc.c:1906  */
+#line 618 "pars0grm.y"
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/pars/pars0grm.y mariadb-10.3-10.3.22/storage/innobase/pars/pars0grm.y
--- mariadb-10.3-10.3.18/storage/innobase/pars/pars0grm.y	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/pars/pars0grm.y	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1997, 2014, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -58,11 +58,7 @@
 %token PARS_NE_TOKEN
 %token PARS_PROCEDURE_TOKEN
 %token PARS_IN_TOKEN
-%token PARS_OUT_TOKEN
-%token PARS_BINARY_TOKEN
-%token PARS_BLOB_TOKEN
 %token PARS_INT_TOKEN
-%token PARS_FLOAT_TOKEN
 %token PARS_CHAR_TOKEN
 %token PARS_IS_TOKEN
 %token PARS_BEGIN_TOKEN
@@ -75,14 +71,11 @@
 %token PARS_WHILE_TOKEN
 %token PARS_RETURN_TOKEN
 %token PARS_SELECT_TOKEN
-%token PARS_SUM_TOKEN
 %token PARS_COUNT_TOKEN
-%token PARS_DISTINCT_TOKEN
 %token PARS_FROM_TOKEN
 %token PARS_WHERE_TOKEN
 %token PARS_FOR_TOKEN
 %token PARS_DDOT_TOKEN
-%token PARS_READ_TOKEN
 %token PARS_ORDER_TOKEN
 %token PARS_BY_TOKEN
 %token PARS_ASC_TOKEN
@@ -109,25 +102,14 @@
 %token PARS_FETCH_TOKEN
 %token PARS_CLOSE_TOKEN
 %token PARS_NOTFOUND_TOKEN
-%token PARS_TO_CHAR_TOKEN
-%token PARS_TO_NUMBER_TOKEN
 %token PARS_TO_BINARY_TOKEN
-%token PARS_BINARY_TO_NUMBER_TOKEN
 %token PARS_SUBSTR_TOKEN
-%token PARS_REPLSTR_TOKEN
 %token PARS_CONCAT_TOKEN
 %token PARS_INSTR_TOKEN
 %token PARS_LENGTH_TOKEN
-%token PARS_SYSDATE_TOKEN
-%token PARS_PRINTF_TOKEN
-%token PARS_ASSERT_TOKEN
-%token PARS_RND_TOKEN
-%token PARS_RND_STR_TOKEN
-%token PARS_ROW_PRINTF_TOKEN
 %token PARS_COMMIT_TOKEN
 %token PARS_ROLLBACK_TOKEN
 %token PARS_WORK_TOKEN
-%token PARS_UNSIGNED_TOKEN
 %token PARS_EXIT_TOKEN
 %token PARS_FUNCTION_TOKEN
 %token PARS_LOCK_TOKEN
@@ -139,8 +121,6 @@
 %token PARS_LIKE_TOKEN_SUFFIX
 %token PARS_LIKE_TOKEN_SUBSTR
 %token PARS_TABLE_NAME_TOKEN
-%token PARS_COMPACT_TOKEN
-%token PARS_BLOCK_SIZE_TOKEN
 %token PARS_BIGINT_TOKEN
 
 %left PARS_AND_TOKEN PARS_OR_TOKEN
@@ -161,7 +141,6 @@
 
 statement:
 	stored_procedure_call
-	| predefined_procedure_call ';'
 	| while_statement ';'
 	| for_statement ';'
 	| exit_statement ';'
@@ -170,7 +149,6 @@
 	| assignment_statement ';'
 	| select_statement ';'
 	| insert_statement ';'
-	| row_printf_statement ';'
 	| delete_statement_searched ';'
 	| delete_statement_positioned ';'
 	| update_statement_searched ';'
@@ -223,18 +201,11 @@
 ;
 
 function_name:
-	PARS_TO_CHAR_TOKEN	{ $$ = &pars_to_char_token; }
-	| PARS_TO_NUMBER_TOKEN	{ $$ = &pars_to_number_token; }
-	| PARS_TO_BINARY_TOKEN	{ $$ = &pars_to_binary_token; }
-	| PARS_BINARY_TO_NUMBER_TOKEN
-				{ $$ = &pars_binary_to_number_token; }
+	PARS_TO_BINARY_TOKEN	{ $$ = &pars_to_binary_token; }
 	| PARS_SUBSTR_TOKEN	{ $$ = &pars_substr_token; }
 	| PARS_CONCAT_TOKEN	{ $$ = &pars_concat_token; }
 	| PARS_INSTR_TOKEN	{ $$ = &pars_instr_token; }
 	| PARS_LENGTH_TOKEN	{ $$ = &pars_length_token; }
-	| PARS_SYSDATE_TOKEN	{ $$ = &pars_sysdate_token; }
-	| PARS_RND_TOKEN	{ $$ = &pars_rnd_token; }
-	| PARS_RND_STR_TOKEN	{ $$ = &pars_rnd_str_token; }
 ;
 
 question_mark_list:
@@ -249,17 +220,6 @@
 					static_cast($2)); }
 ;
 
-predefined_procedure_call:
-	predefined_procedure_name '(' exp_list ')'
-				{ $$ = pars_procedure_call($1, $3); }
-;
-
-predefined_procedure_name:
-	PARS_REPLSTR_TOKEN	{ $$ = &pars_replstr_token; }
-	| PARS_PRINTF_TOKEN	{ $$ = &pars_printf_token; }
-	| PARS_ASSERT_TOKEN	{ $$ = &pars_assert_token; }
-;
-
 user_function_call:
 	PARS_ID_TOKEN '(' ')'	{ $$ = $1; }
 ;
@@ -287,19 +247,9 @@
 	exp			{ $$ = $1; }
 	| PARS_COUNT_TOKEN '(' '*' ')'
 				{ $$ = pars_func(&pars_count_token,
-				          que_node_list_add_last(NULL,
+					  que_node_list_add_last(NULL,
 					    sym_tab_add_int_lit(
 						pars_sym_tab_global, 1))); }
-	| PARS_COUNT_TOKEN '(' PARS_DISTINCT_TOKEN PARS_ID_TOKEN ')'
-				{ $$ = pars_func(&pars_count_token,
-					    que_node_list_add_last(NULL,
-						pars_func(&pars_distinct_token,
-						     que_node_list_add_last(
-								NULL, $4)))); }
-	| PARS_SUM_TOKEN '(' exp ')'
-				{ $$ = pars_func(&pars_sum_token,
-						que_node_list_add_last(NULL,
-									$3)); }
 ;
 
 select_item_list:
@@ -446,12 +396,6 @@
 					NULL); }
 ;
 
-row_printf_statement:
-	PARS_ROW_PRINTF_TOKEN select_statement
-				{ $$ = pars_row_printf_statement(
-					static_cast($2)); }
-;
-
 assignment_statement:
 	PARS_ID_TOKEN PARS_ASSIGN_TOKEN exp
 				{ $$ = pars_assignment_statement(
@@ -536,12 +480,12 @@
 ;
 
 column_def:
-	PARS_ID_TOKEN type_name	opt_column_len opt_unsigned opt_not_null
+	PARS_ID_TOKEN type_name	opt_column_len opt_not_null
 				{ $$ = pars_column_def(
 					static_cast($1),
 					static_cast($2),
 					static_cast($3),
-					$4, $5); }
+					$4); }
 ;
 
 column_def_list:
@@ -556,13 +500,6 @@
 				{ $$ = $2; }
 ;
 
-opt_unsigned:
-	/* Nothing */		{ $$ = NULL; }
-	| PARS_UNSIGNED_TOKEN
-				{ $$ = &pars_int_token;
-					/* pass any non-NULL pointer */ }
-;
-
 opt_not_null:
 	/* Nothing */		{ $$ = NULL; }
 	| PARS_NOT_TOKEN PARS_NULL_LIT
@@ -570,27 +507,12 @@
 					/* pass any non-NULL pointer */ }
 ;
 
-compact:
-	/* Nothing */		{ $$ = NULL; }
-	| PARS_COMPACT_TOKEN	{ $$ = &pars_int_token;
-					/* pass any non-NULL pointer */ }
-;
-
-block_size:
-	/* Nothing */		{ $$ = NULL; }
-	| PARS_BLOCK_SIZE_TOKEN	'=' PARS_INT_LIT
-			{ $$ = $3; }
-;
-
 create_table:
 	PARS_CREATE_TOKEN PARS_TABLE_TOKEN
 	table_name '(' column_def_list ')'
-	compact block_size
 				{ $$ = pars_create_table(
 					static_cast($3),
-					static_cast($5),
-					static_cast($7),
-					static_cast($8)); }
+					static_cast($5)); }
 ;
 
 column_list:
@@ -642,28 +564,6 @@
 	PARS_INT_TOKEN		{ $$ = &pars_int_token; }
 	| PARS_BIGINT_TOKEN	{ $$ = &pars_bigint_token; }
 	| PARS_CHAR_TOKEN	{ $$ = &pars_char_token; }
-	| PARS_BINARY_TOKEN	{ $$ = &pars_binary_token; }
-	| PARS_BLOB_TOKEN	{ $$ = &pars_blob_token; }
-;
-
-parameter_declaration:
-	PARS_ID_TOKEN PARS_IN_TOKEN type_name
-				{ $$ = pars_parameter_declaration(
-					static_cast($1),
-					PARS_INPUT,
-					static_cast($3)); }
-	| PARS_ID_TOKEN PARS_OUT_TOKEN type_name
-				{ $$ = pars_parameter_declaration(
-					static_cast($1),
-					PARS_OUTPUT,
-					static_cast($3)); }
-;
-
-parameter_declaration_list:
-	/* Nothing */		{ $$ = NULL; }
-	| parameter_declaration	{ $$ = que_node_list_add_last(NULL, $1); }
-	| parameter_declaration_list ',' parameter_declaration
-				{ $$ = que_node_list_add_last($1, $3); }
 ;
 
 variable_declaration:
@@ -705,16 +605,14 @@
 ;
 
 procedure_definition:
-	PARS_PROCEDURE_TOKEN PARS_ID_TOKEN '(' parameter_declaration_list ')'
+	PARS_PROCEDURE_TOKEN PARS_ID_TOKEN '(' ')'
 	PARS_IS_TOKEN
 	variable_declaration_list
 	declaration_list
 	PARS_BEGIN_TOKEN
 	statement_list
 	PARS_END_TOKEN		{ $$ = pars_procedure_definition(
-					static_cast($2),
-					static_cast($4),
-					$10); }
+					static_cast($2), $9); }
 ;
 
 %%
diff -Nru mariadb-10.3-10.3.18/storage/innobase/pars/pars0lex.l mariadb-10.3-10.3.22/storage/innobase/pars/pars0lex.l
--- mariadb-10.3-10.3.18/storage/innobase/pars/pars0lex.l	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/pars/pars0lex.l	2020-01-26 18:37:29.000000000 +0000
@@ -249,30 +249,10 @@
 			return(PARS_IN_TOKEN);
 }
 
-"OUT"		{
-			return(PARS_OUT_TOKEN);
-}
-
-"BINARY"	{
-			return(PARS_BINARY_TOKEN);
-}
-
-"BLOB"		{
-			return(PARS_BLOB_TOKEN);
-}
-
 "INT"		{
 			return(PARS_INT_TOKEN);
 }
 
-"INTEGER"	{
-			return(PARS_INT_TOKEN);
-}
-
-"FLOAT"		{
-			return(PARS_FLOAT_TOKEN);
-}
-
 "CHAR"		{
 			return(PARS_CHAR_TOKEN);
 }
@@ -321,18 +301,10 @@
 			return(PARS_SELECT_TOKEN);
 }
 
-"SUM"		{
-			return(PARS_SUM_TOKEN);
-}
-
 "COUNT"		{
 			return(PARS_COUNT_TOKEN);
 }
 
-"DISTINCT"	{
-			return(PARS_DISTINCT_TOKEN);
-}
-
 "FROM"		{
 			return(PARS_FROM_TOKEN);
 }
@@ -345,10 +317,6 @@
 			return(PARS_FOR_TOKEN);
 }
 
-"READ"		{
-			return(PARS_READ_TOKEN);
-}
-
 "ORDER"		{
 			return(PARS_ORDER_TOKEN);
 }
@@ -405,14 +373,6 @@
 			return(PARS_TABLE_TOKEN);
 }
 
-"COMPACT"	{
-			return(PARS_COMPACT_TOKEN);
-}
-
-"BLOCK_SIZE"	{
-			return(PARS_BLOCK_SIZE_TOKEN);
-}
-
 "INDEX"		{
 			return(PARS_INDEX_TOKEN);
 }
@@ -453,30 +413,14 @@
 			return(PARS_NOTFOUND_TOKEN);
 }
 
-"TO_CHAR"	{
-			return(PARS_TO_CHAR_TOKEN);
-}
-
-"TO_NUMBER"	{
-			return(PARS_TO_NUMBER_TOKEN);
-}
-
 "TO_BINARY"	{
 			return(PARS_TO_BINARY_TOKEN);
 }
 
-"BINARY_TO_NUMBER" {
-			return(PARS_BINARY_TO_NUMBER_TOKEN);
-}
-
 "SUBSTR"	{
 			return(PARS_SUBSTR_TOKEN);
 }
 
-"REPLSTR"	{
-			return(PARS_REPLSTR_TOKEN);
-}
-
 "CONCAT"	{
 			return(PARS_CONCAT_TOKEN);
 }
@@ -489,30 +433,6 @@
 			return(PARS_LENGTH_TOKEN);
 }
 
-"SYSDATE"	{
-			return(PARS_SYSDATE_TOKEN);
-}
-
-"PRINTF"	{
-			return(PARS_PRINTF_TOKEN);
-}
-
-"ASSERT"	{
-			return(PARS_ASSERT_TOKEN);
-}
-
-"RND"		{
-			return(PARS_RND_TOKEN);
-}
-
-"RND_STR"	{
-			return(PARS_RND_STR_TOKEN);
-}
-
-"ROW_PRINTF"	{
-			return(PARS_ROW_PRINTF_TOKEN);
-}
-
 "COMMIT"	{
 			return(PARS_COMMIT_TOKEN);
 }
@@ -525,10 +445,6 @@
 			return(PARS_WORK_TOKEN);
 }
 
-"UNSIGNED"	{
-			return(PARS_UNSIGNED_TOKEN);
-}
-
 "EXIT"		{
 			return(PARS_EXIT_TOKEN);
 }
diff -Nru mariadb-10.3-10.3.18/storage/innobase/pars/pars0pars.cc mariadb-10.3-10.3.22/storage/innobase/pars/pars0pars.cc
--- mariadb-10.3-10.3.18/storage/innobase/pars/pars0pars.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/pars/pars0pars.cc	2020-01-26 18:37:29.000000000 +0000
@@ -50,29 +50,15 @@
 /* Global variables used to denote certain reserved words, used in
 constructing the parsing tree */
 
-pars_res_word_t	pars_to_char_token = {PARS_TO_CHAR_TOKEN};
-pars_res_word_t	pars_to_number_token = {PARS_TO_NUMBER_TOKEN};
 pars_res_word_t	pars_to_binary_token = {PARS_TO_BINARY_TOKEN};
-pars_res_word_t	pars_binary_to_number_token = {PARS_BINARY_TO_NUMBER_TOKEN};
 pars_res_word_t	pars_substr_token = {PARS_SUBSTR_TOKEN};
-pars_res_word_t	pars_replstr_token = {PARS_REPLSTR_TOKEN};
 pars_res_word_t	pars_concat_token = {PARS_CONCAT_TOKEN};
 pars_res_word_t	pars_instr_token = {PARS_INSTR_TOKEN};
 pars_res_word_t	pars_length_token = {PARS_LENGTH_TOKEN};
-pars_res_word_t	pars_sysdate_token = {PARS_SYSDATE_TOKEN};
-pars_res_word_t	pars_printf_token = {PARS_PRINTF_TOKEN};
-pars_res_word_t	pars_assert_token = {PARS_ASSERT_TOKEN};
-pars_res_word_t	pars_rnd_token = {PARS_RND_TOKEN};
-pars_res_word_t	pars_rnd_str_token = {PARS_RND_STR_TOKEN};
 pars_res_word_t	pars_count_token = {PARS_COUNT_TOKEN};
-pars_res_word_t	pars_sum_token = {PARS_SUM_TOKEN};
-pars_res_word_t	pars_distinct_token = {PARS_DISTINCT_TOKEN};
-pars_res_word_t	pars_binary_token = {PARS_BINARY_TOKEN};
-pars_res_word_t	pars_blob_token = {PARS_BLOB_TOKEN};
 pars_res_word_t	pars_int_token = {PARS_INT_TOKEN};
 pars_res_word_t	pars_bigint_token = {PARS_BIGINT_TOKEN};
 pars_res_word_t	pars_char_token = {PARS_CHAR_TOKEN};
-pars_res_word_t	pars_float_token = {PARS_FLOAT_TOKEN};
 pars_res_word_t	pars_update_token = {PARS_UPDATE_TOKEN};
 pars_res_word_t	pars_asc_token = {PARS_ASC_TOKEN};
 pars_res_word_t	pars_desc_token = {PARS_DESC_TOKEN};
@@ -195,24 +181,15 @@
 	case PARS_AND_TOKEN: case PARS_OR_TOKEN: case PARS_NOT_TOKEN:
 		return(PARS_FUNC_LOGICAL);
 
-	case PARS_COUNT_TOKEN: case PARS_SUM_TOKEN:
+	case PARS_COUNT_TOKEN:
 		return(PARS_FUNC_AGGREGATE);
 
-	case PARS_TO_CHAR_TOKEN:
-	case PARS_TO_NUMBER_TOKEN:
 	case PARS_TO_BINARY_TOKEN:
-	case PARS_BINARY_TO_NUMBER_TOKEN:
 	case PARS_SUBSTR_TOKEN:
 	case PARS_CONCAT_TOKEN:
 	case PARS_LENGTH_TOKEN:
 	case PARS_INSTR_TOKEN:
-	case PARS_SYSDATE_TOKEN:
 	case PARS_NOTFOUND_TOKEN:
-	case PARS_PRINTF_TOKEN:
-	case PARS_ASSERT_TOKEN:
-	case PARS_RND_TOKEN:
-	case PARS_RND_STR_TOKEN:
-	case PARS_REPLSTR_TOKEN:
 		return(PARS_FUNC_PREDEFINED);
 
 	default:
@@ -499,7 +476,6 @@
 	arg = node->args;
 
 	switch (node->func) {
-	case PARS_SUM_TOKEN:
 	case '+': case '-': case '*': case '/':
 		/* Inherit the data type from the first argument (which must
 		not be the SQL null literal whose type is DATA_ERROR) */
@@ -516,13 +492,6 @@
 		dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4);
 		break;
 
-	case PARS_TO_CHAR_TOKEN:
-	case PARS_RND_STR_TOKEN:
-		ut_a(dtype_get_mtype(que_node_get_data_type(arg)) == DATA_INT);
-		dtype_set(que_node_get_data_type(node), DATA_VARCHAR,
-			  DATA_ENGLISH, 0);
-		break;
-
 	case PARS_TO_BINARY_TOKEN:
 		if (dtype_get_mtype(que_node_get_data_type(arg)) == DATA_INT) {
 			dtype_set(que_node_get_data_type(node), DATA_VARCHAR,
@@ -533,19 +502,12 @@
 		}
 		break;
 
-	case PARS_TO_NUMBER_TOKEN:
-	case PARS_BINARY_TO_NUMBER_TOKEN:
 	case PARS_LENGTH_TOKEN:
 	case PARS_INSTR_TOKEN:
 		ut_a(pars_is_string_type(que_node_get_data_type(arg)->mtype));
 		dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4);
 		break;
 
-	case PARS_SYSDATE_TOKEN:
-		ut_a(arg == NULL);
-		dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4);
-		break;
-
 	case PARS_SUBSTR_TOKEN:
 	case PARS_CONCAT_TOKEN:
 		ut_a(pars_is_string_type(que_node_get_data_type(arg)->mtype));
@@ -566,11 +528,6 @@
 		dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4);
 		break;
 
-	case PARS_RND_TOKEN:
-		ut_a(dtype_get_mtype(que_node_get_data_type(arg)) == DATA_INT);
-		dtype_set(que_node_get_data_type(node), DATA_INT, 0, 4);
-		break;
-
 	case PARS_LIKE_TOKEN_EXACT:
 	case PARS_LIKE_TOKEN_PREFIX:
 	case PARS_LIKE_TOKEN_SUFFIX:
@@ -1355,9 +1312,7 @@
 	pars_res_word_t*	type,		/*!< in: pointer to a type
 						token */
 	ulint			len,		/*!< in: length, or 0 */
-	ibool			is_unsigned,	/*!< in: if TRUE, column is
-						UNSIGNED. */
-	ibool			is_not_null)	/*!< in: if TRUE, column is
+	bool			is_not_null)	/*!< in: whether the column is
 						NOT NULL. */
 {
 	ulint flags = 0;
@@ -1366,10 +1321,6 @@
 		flags |= DATA_NOT_NULL;
 	}
 
-	if (is_unsigned) {
-		flags |= DATA_UNSIGNED;
-	}
-
 	if (type == &pars_bigint_token) {
 		ut_a(len == 0);
 
@@ -1384,16 +1335,6 @@
 
 		dtype_set(dfield_get_type(dfield), DATA_VARCHAR,
 			  DATA_ENGLISH | flags, len);
-	} else if (type == &pars_binary_token) {
-		ut_a(len != 0);
-
-		dtype_set(dfield_get_type(dfield), DATA_FIXBINARY,
-			  DATA_BINARY_TYPE | flags, len);
-	} else if (type == &pars_blob_token) {
-		ut_a(len == 0);
-
-		dtype_set(dfield_get_type(dfield), DATA_BLOB,
-			  DATA_BINARY_TYPE | flags, 0);
 	} else {
 		ut_error;
 	}
@@ -1414,28 +1355,7 @@
 
 	node->param_type = PARS_NOT_PARAM;
 
-	pars_set_dfield_type(que_node_get_val(node), type, 0, FALSE, FALSE);
-
-	return(node);
-}
-
-/*********************************************************************//**
-Parses a procedure parameter declaration.
-@return own: symbol table node of type SYM_VAR */
-sym_node_t*
-pars_parameter_declaration(
-/*=======================*/
-	sym_node_t*	node,	/*!< in: symbol table node allocated for the
-				id of the parameter */
-	ulint		param_type,
-				/*!< in: PARS_INPUT or PARS_OUTPUT */
-	pars_res_word_t* type)	/*!< in: pointer to a type token */
-{
-	ut_a((param_type == PARS_INPUT) || (param_type == PARS_OUTPUT));
-
-	pars_variable_declaration(node, type);
-
-	node->param_type = param_type;
+	pars_set_dfield_type(que_node_get_val(node), type, 0, false);
 
 	return(node);
 }
@@ -1821,8 +1741,6 @@
 	pars_res_word_t*	type,		/*!< in: data type */
 	sym_node_t*		len,		/*!< in: length of column, or
 						NULL */
-	void*			is_unsigned,	/*!< in: if not NULL, column
-						is of type UNSIGNED. */
 	void*			is_not_null)	/*!< in: if not NULL, column
 						is of type NOT NULL. */
 {
@@ -1835,7 +1753,7 @@
 	}
 
 	pars_set_dfield_type(que_node_get_val(sym_node), type, len2,
-			     is_unsigned != NULL, is_not_null != NULL);
+			     is_not_null != NULL);
 
 	return(sym_node);
 }
@@ -1848,9 +1766,7 @@
 /*==============*/
 	sym_node_t*	table_sym,	/*!< in: table name node in the symbol
 					table */
-	sym_node_t*	column_defs,	/*!< in: list of column names */
-	sym_node_t*	compact,	/* in: non-NULL if COMPACT table. */
-	sym_node_t*	block_size)	/* in: block size (can be NULL) */
+	sym_node_t*	column_defs)	/*!< in: list of column names */
 {
 	dict_table_t*	table;
 	sym_node_t*	column;
@@ -1858,57 +1774,11 @@
 	const dtype_t*	dtype;
 	ulint		n_cols;
 	ulint		flags = 0;
-	ulint		flags2 = 0;
-
-	if (compact != NULL) {
-
-		/* System tables currently only use the REDUNDANT row
-		format therefore the check for srv_file_per_table should be
-		safe for now. */
-
-		flags |= DICT_TF_COMPACT;
-
-		/* FIXME: Ideally this should be part of the SQL syntax
-		or use some other mechanism. We want to reduce dependency
-		on global variables. There is an inherent race here but
-		that has always existed around this variable. */
-		if (srv_file_per_table) {
-			flags2 |= DICT_TF2_USE_FILE_PER_TABLE;
-		}
-	}
-
-	if (block_size != NULL) {
-		ulint		size;
-		dfield_t*	dfield;
+	ulint		flags2 = DICT_TF2_FTS_AUX_HEX_NAME;
 
-		dfield = que_node_get_val(block_size);
-
-		ut_a(dfield_get_len(dfield) == 4);
-		size = mach_read_from_4(static_cast(
-			dfield_get_data(dfield)));
-
-
-		switch (size) {
-		case 0:
-			break;
-
-		case 1: case 2: case 4: case 8: case 16:
-			flags |= DICT_TF_COMPACT;
-			/* FTS-FIXME: needs the zip changes */
-			/* flags |= size << DICT_TF_COMPRESSED_SHIFT; */
-			break;
-
-		default:
-			ut_error;
-		}
-	}
-
-	/* Set the flags2 when create table or alter tables */
-	flags2 |= DICT_TF2_FTS_AUX_HEX_NAME;
 	DBUG_EXECUTE_IF("innodb_test_wrong_fts_aux_table_name",
 			flags2 &= ~DICT_TF2_FTS_AUX_HEX_NAME;);
 
-
 	n_cols = que_node_list_get_len(column_defs);
 
 	table = dict_mem_table_create(
@@ -2005,7 +1875,6 @@
 /*======================*/
 	sym_node_t*	sym_node,	/*!< in: procedure id node in the symbol
 					table */
-	sym_node_t*	param_list,	/*!< in: parameter declaration list */
 	que_node_t*	stat_list)	/*!< in: statement list */
 {
 	proc_node_t*	node;
@@ -2030,7 +1899,6 @@
 	sym_node->resolved = TRUE;
 
 	node->proc_id = sym_node;
-	node->param_list = param_list;
 	node->stat_list = stat_list;
 
 	pars_set_parent_in_list(stat_list, node);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/rem/rem0cmp.cc mariadb-10.3-10.3.22/storage/innobase/rem/rem0cmp.cc
--- mariadb-10.3-10.3.18/storage/innobase/rem/rem0cmp.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/rem/rem0cmp.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
-Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 1994, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2020, 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
@@ -534,7 +535,7 @@
 
 /** Compare a GIS data tuple to a physical record.
 @param[in] dtuple data tuple
-@param[in] rec B-tree record
+@param[in] rec R-tree record
 @param[in] offsets rec_get_offsets(rec)
 @param[in] mode compare mode
 @retval negative if dtuple is less than rec */
@@ -546,7 +547,7 @@
 				dtuple in some of the common fields, or which
 				has an equal number or more fields than
 				dtuple */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	page_cur_mode_t	mode)	/*!< in: compare mode */
 {
 	const dfield_t*	dtuple_field;	/* current field in logical record */
@@ -579,7 +580,7 @@
 cmp_dtuple_rec_with_gis_internal(
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	const dfield_t*	dtuple_field;	/* current field in logical record */
 	ulint		dtuple_f_len;	/* the length of the current field
@@ -650,7 +651,7 @@
 cmp_dtuple_rec_with_match_low(
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	ulint		n_cmp,
 	ulint*		matched_fields)
 {
@@ -784,7 +785,7 @@
 	const dtuple_t*		dtuple,
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	ulint*			matched_fields,
 	ulint*			matched_bytes)
 {
@@ -952,7 +953,7 @@
 cmp_dtuple_rec(
 	const dtuple_t*	dtuple,
 	const rec_t*	rec,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	ulint	matched_fields	= 0;
 
@@ -970,7 +971,7 @@
 /*========================*/
 	const dtuple_t*	dtuple,	/*!< in: data tuple */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint	n_fields;
 	ulint	matched_fields	= 0;
@@ -998,8 +999,8 @@
 /*=====================*/
 	const rec_t*		rec1,	/*!< in: physical record */
 	const rec_t*		rec2,	/*!< in: physical record */
-	const ulint*		offsets1,/*!< in: rec_get_offsets(rec1, ...) */
-	const ulint*		offsets2,/*!< in: rec_get_offsets(rec2, ...) */
+	const offset_t*		offsets1,/*!< in: rec_get_offsets(rec1, ...) */
+	const offset_t*		offsets2,/*!< in: rec_get_offsets(rec2, ...) */
 	const dict_index_t*	index,	/*!< in: data dictionary index */
 	ulint			n)	/*!< in: field to compare */
 {
@@ -1029,8 +1030,8 @@
 /*===============*/
 	const rec_t*		rec1,	/*!< in: physical record */
 	const rec_t*		rec2,	/*!< in: physical record */
-	const ulint*		offsets1,/*!< in: rec_get_offsets(rec1, ...) */
-	const ulint*		offsets2,/*!< in: rec_get_offsets(rec2, ...) */
+	const offset_t*		offsets1,/*!< in: rec_get_offsets(rec1, ...) */
+	const offset_t*		offsets2,/*!< in: rec_get_offsets(rec2, ...) */
 	const dict_index_t*	index,	/*!< in: data dictionary index */
 	struct TABLE*		table)	/*!< in: MySQL table, for reporting
 					duplicate key value if applicable,
@@ -1096,42 +1097,40 @@
 	return(0);
 }
 
-/** Compare two B-tree records.
-@param[in] rec1 B-tree record
-@param[in] rec2 B-tree record
-@param[in] offsets1 rec_get_offsets(rec1, index)
-@param[in] offsets2 rec_get_offsets(rec2, index)
-@param[in] index B-tree index
-@param[in] nulls_unequal true if this is for index cardinality
-statistics estimation, and innodb_stats_method=nulls_unequal
-or innodb_stats_method=nulls_ignored
-@param[out] matched_fields number of completely matched fields
-within the first field not completely matched
-@return the comparison result
+/** Compare two B-tree or R-tree records.
+Only the common first fields are compared, and externally stored field
+are treated as equal.
+@param[in]	rec1		record (possibly not on an index page)
+@param[in]	rec2		B-tree or R-tree record in an index page
+@param[in]	offsets1	rec_get_offsets(rec1, index)
+@param[in]	offsets2	rec_get_offsets(rec2, index)
+@param[in]	nulls_unequal	true if this is for index cardinality
+				statistics estimation with
+				innodb_stats_method=nulls_unequal
+				or innodb_stats_method=nulls_ignored
+@param[out]	matched_fields	number of completely matched fields
+				within the first field not completely matched
 @retval 0 if rec1 is equal to rec2
 @retval negative if rec1 is less than rec2
-@retval positive if rec2 is greater than rec2 */
+@retval positive if rec1 is greater than rec2 */
 int
-cmp_rec_rec_with_match(
+cmp_rec_rec(
 	const rec_t*		rec1,
 	const rec_t*		rec2,
-	const ulint*		offsets1,
-	const ulint*		offsets2,
+	const offset_t*		offsets1,
+	const offset_t*		offsets2,
 	const dict_index_t*	index,
 	bool			nulls_unequal,
 	ulint*			matched_fields)
 {
-	ulint		rec1_n_fields;	/* the number of fields in rec */
 	ulint		rec1_f_len;	/* length of current field in rec */
 	const byte*	rec1_b_ptr;	/* pointer to the current byte
 					in rec field */
-	ulint		rec2_n_fields;	/* the number of fields in rec */
 	ulint		rec2_f_len;	/* length of current field in rec */
 	const byte*	rec2_b_ptr;	/* pointer to the current byte
 					in rec field */
 	ulint		cur_field = 0;	/* current field number */
 	int		ret = 0;	/* return value */
-	ulint		comp;
 
 	ut_ad(rec1 != NULL);
 	ut_ad(rec2 != NULL);
@@ -1139,10 +1138,12 @@
 	ut_ad(rec_offs_validate(rec1, index, offsets1));
 	ut_ad(rec_offs_validate(rec2, index, offsets2));
 	ut_ad(rec_offs_comp(offsets1) == rec_offs_comp(offsets2));
+	ut_ad(fil_page_index_page_check(page_align(rec2)));
+	ut_ad(!!dict_index_is_spatial(index)
+	      == (fil_page_get_type(page_align(rec2)) == FIL_PAGE_RTREE));
 
-	comp = rec_offs_comp(offsets1);
-	rec1_n_fields = rec_offs_n_fields(offsets1);
-	rec2_n_fields = rec_offs_n_fields(offsets2);
+	ulint comp = rec_offs_comp(offsets1);
+	ulint n_fields;
 
 	/* Test if rec is the predefined minimum record */
 	if (UNIV_UNLIKELY(rec_get_info_bits(rec1, comp)
@@ -1158,37 +1159,41 @@
 		goto order_resolved;
 	}
 
-	/* Match fields in a loop */
-
-	for (; cur_field < rec1_n_fields && cur_field < rec2_n_fields;
-	     cur_field++) {
+	/* For non-leaf spatial index records, the
+	dict_index_get_n_unique_in_tree() does include the child page
+	number, because spatial index node pointers only contain
+	the MBR (minimum bounding rectangle) and the child page number.
+
+	For B-tree node pointers, the key alone (secondary index
+	columns and PRIMARY KEY columns) must be unique, and there is
+	no need to compare the child page number. */
+	n_fields = std::min(rec_offs_n_fields(offsets1),
+			    rec_offs_n_fields(offsets2));
+	n_fields = std::min(n_fields, dict_index_get_n_unique_in_tree(index));
 
+	for (; cur_field < n_fields; cur_field++) {
 		ulint	mtype;
 		ulint	prtype;
 
-		/* If this is node-ptr records then avoid comparing node-ptr
-		field. Only key field needs to be compared. */
-		if (cur_field == dict_index_get_n_unique_in_tree(index)) {
-			break;
-		}
-
-		if (dict_index_is_ibuf(index)) {
+		if (UNIV_UNLIKELY(dict_index_is_ibuf(index))) {
 			/* This is for the insert buffer B-tree. */
 			mtype = DATA_BINARY;
 			prtype = 0;
 		} else {
-			const dict_col_t*	col;
-
-			col	= dict_index_get_nth_col(index, cur_field);
-
+			const dict_col_t* col = dict_index_get_nth_col(
+				index, cur_field);
 			mtype = col->mtype;
 			prtype = col->prtype;
 
-			/* If the index is spatial index, we mark the
-			prtype of the first field as MBR field. */
-			if (cur_field == 0 && dict_index_is_spatial(index)) {
+			if (UNIV_LIKELY(!dict_index_is_spatial(index))) {
+			} else if (cur_field == 0) {
 				ut_ad(DATA_GEOMETRY_MTYPE(mtype));
 				prtype |= DATA_GIS_MBR;
+			} else if (!page_rec_is_leaf(rec2)) {
+				/* Compare the child page number. */
+				ut_ad(cur_field == 1);
+				mtype = DATA_SYS_CHILD;
+				prtype = 0;
 			}
 		}
 
@@ -1226,8 +1231,10 @@
 	to the common fields */
 	ut_ad(ret == 0);
 order_resolved:
-	*matched_fields = cur_field;
-	return(ret);
+	if (matched_fields) {
+		*matched_fields = cur_field;
+	}
+	return ret;
 }
 
 #ifdef UNIV_COMPILE_TEST_FUNCS
diff -Nru mariadb-10.3-10.3.18/storage/innobase/rem/rem0rec.cc mariadb-10.3-10.3.22/storage/innobase/rem/rem0rec.cc
--- mariadb-10.3-10.3.18/storage/innobase/rem/rem0rec.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/rem/rem0rec.cc	2020-01-26 18:37:29.000000000 +0000
@@ -277,13 +277,13 @@
 rec_init_offsets_comp_ordinary(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets,
+	offset_t*		offsets,
 	ulint			n_core,
 	const dict_col_t::def_t*def_val,
 	rec_leaf_format		format)
 {
-	ulint		offs		= 0;
-	ulint		any		= 0;
+	offset_t	offs		= 0;
+	offset_t	any		= 0;
 	const byte*	nulls		= rec;
 	const byte*	lens		= NULL;
 	ulint		n_fields	= n_core;
@@ -337,8 +337,8 @@
 	/* We cannot invoke rec_offs_make_valid() if format==REC_LEAF_TEMP.
 	Similarly, rec_offs_validate() will fail in that case, because
 	it invokes rec_get_status(). */
-	offsets[2] = (ulint) rec;
-	offsets[3] = (ulint) index;
+	memcpy(&offsets[RECORD_OFFSET], &rec, sizeof(rec));
+	memcpy(&offsets[INDEX_OFFSET], &index, sizeof(index));
 #endif /* UNIV_DEBUG */
 
 	/* read the lengths of fields 0..n_fields */
@@ -348,17 +348,17 @@
 			= dict_index_get_nth_field(index, i);
 		const dict_col_t*	col
 			= dict_field_get_col(field);
-		ulint			len;
+		offset_t		len;
 
 		/* set default value flag */
 		if (i < n_fields) {
 		} else if (def_val) {
 			const dict_col_t::def_t& d = def_val[i - n_core];
 			if (!d.data) {
-				len = offs | REC_OFFS_SQL_NULL;
+				len = combine(offs, SQL_NULL);
 				ut_ad(d.len == UNIV_SQL_NULL);
 			} else {
-				len = offs | REC_OFFS_DEFAULT;
+				len = combine(offs, DEFAULT);
 				any |= REC_OFFS_DEFAULT;
 			}
 
@@ -366,10 +366,10 @@
 		} else {
 			ulint dlen;
 			if (!index->instant_field_value(i, &dlen)) {
-				len = offs | REC_OFFS_SQL_NULL;
+				len = combine(offs, SQL_NULL);
 				ut_ad(dlen == UNIV_SQL_NULL);
 			} else {
-				len = offs | REC_OFFS_DEFAULT;
+				len = combine(offs, DEFAULT);
 				any |= REC_OFFS_DEFAULT;
 			}
 
@@ -391,7 +391,7 @@
 				We do not advance offs, and we set
 				the length to zero and enable the
 				SQL NULL flag in offsets[]. */
-				len = offs | REC_OFFS_SQL_NULL;
+				len = combine(offs, SQL_NULL);
 				goto resolved;
 			}
 			null_mask <<= 1;
@@ -414,11 +414,11 @@
 				len <<= 8;
 				len |= *lens--;
 
-				offs += len & 0x3fff;
+				offs += get_value(len);
 				if (UNIV_UNLIKELY(len & 0x4000)) {
 					ut_ad(dict_index_is_clust(index));
 					any |= REC_OFFS_EXTERNAL;
-					len = offs | REC_OFFS_EXTERNAL;
+					len = combine(offs, STORED_OFFPAGE);
 				} else {
 					len = offs;
 				}
@@ -435,7 +435,7 @@
 	} while (++i < rec_offs_n_fields(offsets));
 
 	*rec_offs_base(offsets)
-		= ulint(rec - (lens + 1)) | REC_OFFS_COMPACT | any;
+		= static_cast(rec - (lens + 1)) | REC_OFFS_COMPACT | any;
 }
 
 #ifdef UNIV_DEBUG
@@ -449,7 +449,7 @@
 	const rec_t*		rec,
 	const dict_index_t*	index,
 	bool			leaf,
-	ulint*			offsets)
+	offset_t*		offsets)
 {
 	ut_ad(rec_offs_n_fields(offsets)
 	      <= (leaf
@@ -469,10 +469,10 @@
 	      || n >= rec_offs_n_fields(offsets));
 	for (; n < rec_offs_n_fields(offsets); n++) {
 		ut_ad(leaf);
-		ut_ad(rec_offs_base(offsets)[1 + n] & REC_OFFS_DEFAULT);
+		ut_ad(get_type(rec_offs_base(offsets)[1 + n]) == DEFAULT);
 	}
-	offsets[2] = ulint(rec);
-	offsets[3] = ulint(index);
+	memcpy(&offsets[RECORD_OFFSET], &rec, sizeof(rec));
+	memcpy(&offsets[INDEX_OFFSET], &index, sizeof(index));
 }
 
 /** Validate offsets returned by rec_get_offsets().
@@ -484,14 +484,14 @@
 rec_offs_validate(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets)
+	const offset_t*		offsets)
 {
 	ulint	i	= rec_offs_n_fields(offsets);
 	ulint	last	= ULINT_MAX;
 	ulint	comp	= *rec_offs_base(offsets) & REC_OFFS_COMPACT;
 
 	if (rec) {
-		ut_ad(ulint(rec) == offsets[2]);
+		ut_ad(!memcmp(&rec, &offsets[RECORD_OFFSET], sizeof(rec)));
 		if (!comp) {
 			const bool is_user_rec = rec_get_heap_no_old(rec)
 				>= PAGE_HEAP_NO_USER_LOW;
@@ -503,14 +503,14 @@
 			      || (n + (index->id == DICT_INDEXES_ID))
 			      >= index->n_core_fields);
 			for (; n < i; n++) {
-				ut_ad(rec_offs_base(offsets)[1 + n]
-				      & REC_OFFS_DEFAULT);
+				ut_ad(get_type(rec_offs_base(offsets)[1 + n])
+				      == DEFAULT);
 			}
 		}
 	}
 	if (index) {
 		ulint max_n_fields;
-		ut_ad(ulint(index) == offsets[3]);
+		ut_ad(!memcmp(&index, &offsets[INDEX_OFFSET], sizeof(index)));
 		max_n_fields = ut_max(
 			dict_index_get_n_fields(index),
 			dict_index_get_n_unique_in_tree(index) + 1);
@@ -536,7 +536,7 @@
 		ut_a(!index->n_def || i <= max_n_fields);
 	}
 	while (i--) {
-		ulint	curr = rec_offs_base(offsets)[1 + i] & REC_OFFS_MASK;
+		ulint curr = get_value(rec_offs_base(offsets)[1 + i]);
 		ut_a(curr <= last);
 		last = curr;
 	}
@@ -553,10 +553,9 @@
 new format; if REC_OFFS_EXTERNAL is set, the record contains externally
 stored columns), and rec_offs_base(offsets)[1..n_fields] will be set to
 offsets past the end of fields 0..n_fields, or to the beginning of
-fields 1..n_fields+1.  When the high-order bit of the offset at [i+1]
-is set (REC_OFFS_SQL_NULL), the field i is NULL.  When the second
-high-order bit of the offset at [i+1] is set (REC_OFFS_EXTERNAL), the
-field i is being stored externally.
+fields 1..n_fields+1.  When the type of the offset at [i+1]
+is (SQL_NULL), the field i is NULL. When the type of the offset at [i+1]
+is (STORED_OFFPAGE), the field i is stored externally.
 @param[in]	rec	record
 @param[in]	index	the index that the record belongs in
 @param[in]	leaf	whether the record resides in a leaf page
@@ -567,14 +566,14 @@
 	const rec_t*		rec,
 	const dict_index_t*	index,
 	bool			leaf,
-	ulint*			offsets)
+	offset_t*		offsets)
 {
 	ulint	i	= 0;
-	ulint	offs;
+	offset_t	offs;
 
 	ut_ad(index->n_core_null_bytes <= UT_BITS_IN_BYTES(index->n_nullable));
-	ut_d(offsets[2] = ulint(rec));
-	ut_d(offsets[3] = ulint(index));
+	ut_d(memcpy(&offsets[RECORD_OFFSET], &rec, sizeof(rec)));
+	ut_d(memcpy(&offsets[INDEX_OFFSET], &index, sizeof(index)));
 
 	if (dict_table_is_comp(index->table)) {
 		const byte*	nulls;
@@ -600,6 +599,7 @@
 			break;
 		case REC_STATUS_COLUMNS_ADDED:
 			ut_ad(leaf);
+			ut_ad(index->is_instant());
 			rec_init_offsets_comp_ordinary(rec, index, offsets,
 						       index->n_core_fields,
 						       NULL,
@@ -631,7 +631,7 @@
 
 		/* read the lengths of fields 0..n */
 		do {
-			ulint	len;
+			offset_t len;
 			if (UNIV_UNLIKELY(i == n_node_ptr_field)) {
 				len = offs += REC_NODE_PTR_SIZE;
 				goto resolved;
@@ -653,7 +653,7 @@
 					We do not advance offs, and we set
 					the length to zero and enable the
 					SQL NULL flag in offsets[]. */
-					len = offs | REC_OFFS_SQL_NULL;
+					len = combine(offs, SQL_NULL);
 					goto resolved;
 				}
 				null_mask <<= 1;
@@ -685,7 +685,7 @@
 						stored columns.  Thus
 						the "e" flag must be 0. */
 						ut_a(!(len & 0x4000));
-						offs += len & 0x3fff;
+						offs += get_value(len);
 						len = offs;
 
 						goto resolved;
@@ -701,39 +701,40 @@
 		} while (++i < rec_offs_n_fields(offsets));
 
 		*rec_offs_base(offsets)
-			= ulint(rec - (lens + 1)) | REC_OFFS_COMPACT;
+			= static_cast(rec - (lens + 1))
+			  | REC_OFFS_COMPACT;
 	} else {
 		/* Old-style record: determine extra size and end offsets */
 		offs = REC_N_OLD_EXTRA_BYTES;
 		const ulint n_fields = rec_get_n_fields_old(rec);
 		const ulint n = std::min(n_fields, rec_offs_n_fields(offsets));
-		ulint any;
+		offset_t any;
 
 		if (rec_get_1byte_offs_flag(rec)) {
-			offs += n_fields;
+			offs += static_cast(n_fields);
 			any = offs;
 			/* Determine offsets to fields */
 			do {
 				offs = rec_1_get_field_end_info(rec, i);
 				if (offs & REC_1BYTE_SQL_NULL_MASK) {
 					offs &= ~REC_1BYTE_SQL_NULL_MASK;
-					offs |= REC_OFFS_SQL_NULL;
+					set_type(offs, SQL_NULL);
 				}
 				rec_offs_base(offsets)[1 + i] = offs;
 			} while (++i < n);
 		} else {
-			offs += 2 * n_fields;
+			offs += 2 * static_cast(n_fields);
 			any = offs;
 			/* Determine offsets to fields */
 			do {
 				offs = rec_2_get_field_end_info(rec, i);
 				if (offs & REC_2BYTE_SQL_NULL_MASK) {
 					offs &= ~REC_2BYTE_SQL_NULL_MASK;
-					offs |= REC_OFFS_SQL_NULL;
+					set_type(offs, SQL_NULL);
 				}
 				if (offs & REC_2BYTE_EXTERN_MASK) {
 					offs &= ~REC_2BYTE_EXTERN_MASK;
-					offs |= REC_OFFS_EXTERNAL;
+					set_type(offs, STORED_OFFPAGE);
 					any |= REC_OFFS_EXTERNAL;
 				}
 				rec_offs_base(offsets)[1 + i] = offs;
@@ -741,8 +742,12 @@
 		}
 
 		if (i < rec_offs_n_fields(offsets)) {
-			offs = (rec_offs_base(offsets)[i] & REC_OFFS_MASK)
-				| REC_OFFS_DEFAULT;
+			ut_ad(index->is_instant()
+			      || i + (index->id == DICT_INDEXES_ID)
+			      == rec_offs_n_fields(offsets));
+
+			ut_ad(i != 0);
+			offs = combine(rec_offs_base(offsets)[i], DEFAULT);
 
 			do {
 				rec_offs_base(offsets)[1 + i] = offs;
@@ -765,11 +770,11 @@
 				(ULINT_UNDEFINED to compute all offsets)
 @param[in,out]	heap		memory heap
 @return the new offsets */
-ulint*
+offset_t*
 rec_get_offsets_func(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets,
+	offset_t*		offsets,
 	bool			leaf,
 	ulint			n_fields,
 #ifdef UNIV_DEBUG
@@ -851,11 +856,11 @@
 	if (UNIV_UNLIKELY(!offsets)
 	    || UNIV_UNLIKELY(rec_offs_get_n_alloc(offsets) < size)) {
 		if (UNIV_UNLIKELY(!*heap)) {
-			*heap = mem_heap_create_at(size * sizeof(ulint),
+			*heap = mem_heap_create_at(size * sizeof(*offsets),
 						   file, line);
 		}
-		offsets = static_cast(
-			mem_heap_alloc(*heap, size * sizeof(ulint)));
+		offsets = static_cast(
+			mem_heap_alloc(*heap, size * sizeof(*offsets)));
 
 		rec_offs_set_n_alloc(offsets, size);
 	}
@@ -878,13 +883,13 @@
 	const dict_index_t*	index,	/*!< in: record descriptor */
 	ulint			node_ptr,/*!< in: nonzero=node pointer,
 					0=leaf node */
-	ulint*			offsets)/*!< in/out: array consisting of
+	offset_t*		offsets)/*!< in/out: array consisting of
 					offsets[0] allocated elements */
 {
 	ulint		n;
 	ulint		i;
-	ulint		offs;
-	ulint		any_ext;
+	offset_t	offs;
+	offset_t	any_ext = 0;
 	const byte*	nulls;
 	const byte*	lens;
 	dict_field_t*	field;
@@ -910,11 +915,10 @@
 	lens = nulls + UT_BITS_IN_BYTES(index->n_nullable);
 	i = offs = 0;
 	null_mask = 1;
-	any_ext = 0;
 
 	/* read the lengths of fields 0..n */
 	do {
-		ulint	len;
+		offset_t len;
 		if (UNIV_UNLIKELY(i == n_node_ptr_field)) {
 			len = offs += REC_NODE_PTR_SIZE;
 			goto resolved;
@@ -935,7 +939,7 @@
 				We do not advance offs, and we set
 				the length to zero and enable the
 				SQL NULL flag in offsets[]. */
-				len = offs | REC_OFFS_SQL_NULL;
+				len = combine(offs, SQL_NULL);
 				goto resolved;
 			}
 			null_mask <<= 1;
@@ -959,10 +963,11 @@
 					len <<= 8;
 					len |= *lens++;
 
-					offs += len & 0x3fff;
+					offs += get_value(len);
 					if (UNIV_UNLIKELY(len & 0x4000)) {
 						any_ext = REC_OFFS_EXTERNAL;
-						len = offs | REC_OFFS_EXTERNAL;
+						len = combine(offs,
+							      STORED_OFFPAGE);
 					} else {
 						len = offs;
 					}
@@ -973,15 +978,16 @@
 
 			len = offs += len;
 		} else {
-			len = offs += field->fixed_len;
+			len = offs += static_cast(field->fixed_len);
 		}
 resolved:
 		rec_offs_base(offsets)[i + 1] = len;
 	} while (++i < rec_offs_n_fields(offsets));
 
 	ut_ad(lens >= extra);
-	*rec_offs_base(offsets) = (ulint(lens - extra) + REC_N_NEW_EXTRA_BYTES)
-		| REC_OFFS_COMPACT | any_ext;
+	*rec_offs_base(offsets)
+		= static_cast(lens - extra + REC_N_NEW_EXTRA_BYTES)
+		  | REC_OFFS_COMPACT | any_ext;
 }
 
 /************************************************************//**
@@ -1676,7 +1682,7 @@
 rec_init_offsets_temp(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets,
+	offset_t*		offsets,
 	ulint			n_core,
 	const dict_col_t::def_t*def_val,
 	rec_comp_status_t	status)
@@ -1702,7 +1708,7 @@
 rec_init_offsets_temp(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	ulint*			offsets)
+	offset_t*		offsets)
 {
 	ut_ad(!index->is_instant());
 	rec_init_offsets_comp_ordinary(rec, index, offsets,
@@ -1745,8 +1751,8 @@
 	ulint			n_fields,
 	mem_heap_t*		heap)
 {
-	ulint	offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*	offsets	= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets	= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(is_leaf || n_fields
@@ -2042,7 +2048,7 @@
 rec_validate(
 /*=========*/
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint		len;
 	ulint		n_fields;
@@ -2151,7 +2157,7 @@
 /*===========*/
 	FILE*		file,	/*!< in: file where to print */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ulint	i;
 
@@ -2277,7 +2283,7 @@
 /*==============*/
 	FILE*		file,	/*!< in: file where to print */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ut_ad(rec_offs_validate(rec, NULL, offsets));
 	ut_ad(!rec_offs_any_default(offsets));
@@ -2345,7 +2351,7 @@
 /*==========*/
 	FILE*		file,	/*!< in: file where to print */
 	const rec_t*	rec,	/*!< in: physical record */
-	const ulint*	offsets)/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets)/*!< in: array returned by rec_get_offsets() */
 {
 	ut_ad(rec_offs_validate(rec, NULL, offsets));
 
@@ -2385,7 +2391,7 @@
 		return;
 	} else {
 		mem_heap_t*	heap	= NULL;
-		ulint		offsets_[REC_OFFS_NORMAL_SIZE];
+		offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
 		rec_offs_init(offsets_);
 
 		rec_print_new(file, rec,
@@ -2408,7 +2414,7 @@
 	std::ostream&	o,
 	const rec_t*	rec,
 	ulint		info,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	const ulint	comp	= rec_offs_comp(offsets);
 	const ulint	n	= rec_offs_n_fields(offsets);
@@ -2465,7 +2471,7 @@
 operator<<(std::ostream& o, const rec_index_print& r)
 {
 	mem_heap_t*	heap	= NULL;
-	ulint*		offsets	= rec_get_offsets(
+	offset_t*	offsets	= rec_get_offsets(
 		r.m_rec, r.m_index, NULL, page_rec_is_leaf(r.m_rec),
 		ULINT_UNDEFINED, &heap);
 	rec_print(o, r.m_rec,
@@ -2503,9 +2509,9 @@
 	const byte*	trx_id;
 	ulint		len;
 	mem_heap_t*	heap		= NULL;
-	ulint offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
+	offset_t offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
 	rec_offs_init(offsets_);
-	ulint* offsets = offsets_;
+	offset_t* offsets = offsets_;
 
 	ut_ad(trx_id_col <= MAX_REF_PARTS);
 	ut_ad(dict_index_is_clust(index));
@@ -2532,11 +2538,11 @@
 @param[in]	n		nth field */
 void
 rec_offs_make_nth_extern(
-	ulint*		offsets,
+	offset_t*	offsets,
 	const ulint	n)
 {
 	ut_ad(!rec_offs_nth_sql_null(offsets, n));
-	rec_offs_base(offsets)[1 + n] |= REC_OFFS_EXTERNAL;
+	set_type(rec_offs_base(offsets)[1 + n], STORED_OFFPAGE);
 }
 #ifdef WITH_WSREP
 # include "ha_prototypes.h"
@@ -2556,8 +2562,8 @@
 	ulint		i;
 	uint            key_parts;
 	mem_heap_t*	heap	= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-        const ulint*    offsets;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	const offset_t* offsets;
 
 	ut_ad(index_for);
 	ut_ad(index_ref);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0ftsort.cc mariadb-10.3-10.3.22/storage/innobase/row/row0ftsort.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0ftsort.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0ftsort.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2010, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, 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
@@ -1372,7 +1372,7 @@
 	ulint		propogated,	/*(mem_heap_zalloc(
+		offsets[i] = static_cast(mem_heap_zalloc(
 			heap, num * sizeof *offsets[i]));
-		offsets[i][0] = num;
-		offsets[i][1] = dict_index_get_n_fields(index);
+		rec_offs_set_n_alloc(offsets[i], num);
+		rec_offs_set_n_fields(offsets[i], dict_index_get_n_fields(index));
 		block[i] = psort_info[i].merge_block[id];
 		crypt_block[i] = psort_info[i].crypt_block[id];
 		b[i] = psort_info[i].merge_block[id];
@@ -1722,7 +1722,6 @@
 	corresponding FTS index auxiliary tables */
 	for (;;) {
 		dtuple_t*	dtuple;
-		ulint		n_ext;
 		int		min_rec = 0;
 
 		if (fts_sort_pll_degree <= 2) {
@@ -1765,7 +1764,7 @@
 		}
 
 		dtuple = row_rec_to_index_entry_low(
-			mrec[min_rec], index, offsets[min_rec], &n_ext,
+			mrec[min_rec], index, offsets[min_rec],
 			tuple_heap);
 
 		row_fts_insert_tuple(
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0import.cc mariadb-10.3-10.3.22/storage/innobase/row/row0import.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0import.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0import.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, 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
@@ -264,7 +264,7 @@
 	bool remove(
 		const dict_index_t*	index,
 		page_zip_des_t*		page_zip,
-		ulint*			offsets) UNIV_NOTHROW
+		offset_t*		offsets) UNIV_NOTHROW
 	{
 		/* We can't end up with an empty page unless it is root. */
 		if (page_get_n_recs(m_cur.block->frame) <= 1) {
@@ -846,7 +846,7 @@
 	@return DB_SUCCESS or error code */
 	dberr_t	adjust_cluster_index_blob_column(
 		rec_t*		rec,
-		const ulint*	offsets,
+		const offset_t*	offsets,
 		ulint		i) UNIV_NOTHROW;
 
 	/** Adjusts the BLOB reference in the clustered index row for all
@@ -856,7 +856,7 @@
 	@return DB_SUCCESS or error code */
 	dberr_t	adjust_cluster_index_blob_columns(
 		rec_t*		rec,
-		const ulint*	offsets) UNIV_NOTHROW;
+		const offset_t*	offsets) UNIV_NOTHROW;
 
 	/** In the clustered index, adjist the BLOB pointers as needed.
 	Also update the BLOB reference, write the new space id.
@@ -865,7 +865,7 @@
 	@return DB_SUCCESS or error code */
 	dberr_t	adjust_cluster_index_blob_ref(
 		rec_t*		rec,
-		const ulint*	offsets) UNIV_NOTHROW;
+		const offset_t*	offsets) UNIV_NOTHROW;
 
 	/** Purge delete-marked records, only if it is possible to do
 	so without re-organising the B+tree.
@@ -878,7 +878,7 @@
 	@return DB_SUCCESS or error code. */
 	dberr_t	adjust_cluster_record(
 		rec_t*			rec,
-		const ulint*		offsets) UNIV_NOTHROW;
+		const offset_t*		offsets) UNIV_NOTHROW;
 
 	/** Find an index with the matching id.
 	@return row_index_t* instance or 0 */
@@ -912,10 +912,10 @@
 	RecIterator		m_rec_iter;
 
 	/** Record offset */
-	ulint			m_offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t		m_offsets_[REC_OFFS_NORMAL_SIZE];
 
 	/** Pointer to m_offsets_ */
-	ulint*			m_offsets;
+	offset_t*		m_offsets;
 
 	/** Memory heap for the record offsets */
 	mem_heap_t*		m_heap;
@@ -1152,60 +1152,82 @@
 
 			if (cfg_col->prtype != col->prtype) {
 				ib_errf(thd,
-					 IB_LOG_LEVEL_ERROR,
-					 ER_TABLE_SCHEMA_MISMATCH,
-					 "Column %s precise type mismatch.",
-					 col_name);
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s precise type mismatch,"
+					" it's 0X%X in the table and 0X%X"
+					" in the tablespace meta file",
+					col_name, col->prtype, cfg_col->prtype);
 				err = DB_ERROR;
 			}
 
 			if (cfg_col->mtype != col->mtype) {
 				ib_errf(thd,
-					 IB_LOG_LEVEL_ERROR,
-					 ER_TABLE_SCHEMA_MISMATCH,
-					 "Column %s main type mismatch.",
-					 col_name);
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s main type mismatch,"
+					" it's 0X%X in the table and 0X%X"
+					" in the tablespace meta file",
+					col_name, col->mtype, cfg_col->mtype);
 				err = DB_ERROR;
 			}
 
 			if (cfg_col->len != col->len) {
 				ib_errf(thd,
-					 IB_LOG_LEVEL_ERROR,
-					 ER_TABLE_SCHEMA_MISMATCH,
-					 "Column %s length mismatch.",
-					 col_name);
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s length mismatch,"
+					" it's %u in the table and %u"
+					" in the tablespace meta file",
+					col_name, col->len, cfg_col->len);
 				err = DB_ERROR;
 			}
 
 			if (cfg_col->mbminlen != col->mbminlen
 			    || cfg_col->mbmaxlen != col->mbmaxlen) {
 				ib_errf(thd,
-					 IB_LOG_LEVEL_ERROR,
-					 ER_TABLE_SCHEMA_MISMATCH,
-					 "Column %s multi-byte len mismatch.",
-					 col_name);
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s multi-byte len mismatch,"
+					" it's %u-%u in the table and %u-%u"
+					" in the tablespace meta file",
+					col_name, col->mbminlen, col->mbmaxlen,
+					cfg_col->mbminlen, cfg_col->mbmaxlen);
 				err = DB_ERROR;
 			}
 
 			if (cfg_col->ind != col->ind) {
+				ib_errf(thd,
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s position mismatch,"
+					" it's %u in the table and %u"
+					" in the tablespace meta file",
+					col_name, col->ind, cfg_col->ind);
 				err = DB_ERROR;
 			}
 
 			if (cfg_col->ord_part != col->ord_part) {
 				ib_errf(thd,
-					 IB_LOG_LEVEL_ERROR,
-					 ER_TABLE_SCHEMA_MISMATCH,
-					 "Column %s ordering mismatch.",
-					 col_name);
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s ordering mismatch,"
+					" it's %u in the table and %u"
+					" in the tablespace meta file",
+					col_name, col->ord_part,
+					cfg_col->ord_part);
 				err = DB_ERROR;
 			}
 
 			if (cfg_col->max_prefix != col->max_prefix) {
 				ib_errf(thd,
-					 IB_LOG_LEVEL_ERROR,
-					 ER_TABLE_SCHEMA_MISMATCH,
-					 "Column %s max prefix mismatch.",
-					 col_name);
+					IB_LOG_LEVEL_ERROR,
+					ER_TABLE_SCHEMA_MISMATCH,
+					"Column %s max prefix mismatch"
+					" it's %u in the table and %u"
+					" in the tablespace meta file",
+					col_name, col->max_prefix,
+					cfg_col->max_prefix);
 				err = DB_ERROR;
 			}
 		}
@@ -1504,13 +1526,70 @@
 	mtr_set_log_mode(&m_mtr, MTR_LOG_NO_REDO);
 
 	btr_pcur_restore_position(BTR_MODIFY_LEAF, &m_pcur, &m_mtr);
+	/* The following is based on btr_pcur_move_to_next_user_rec(). */
+	m_pcur.old_stored = false;
+	ut_ad(m_pcur.latch_mode == BTR_MODIFY_LEAF);
+	do {
+		if (btr_pcur_is_after_last_on_page(&m_pcur)) {
+			if (btr_pcur_is_after_last_in_tree(&m_pcur)) {
+				return DB_END_OF_INDEX;
+			}
 
-	if (!btr_pcur_move_to_next_user_rec(&m_pcur, &m_mtr)) {
+			buf_block_t* block = btr_pcur_get_block(&m_pcur);
+			uint32_t next_page = btr_page_get_next(block->frame);
 
-		return(DB_END_OF_INDEX);
-	}
+			/* MDEV-13542 FIXME: Make these checks part of
+			btr_pcur_move_to_next_page(), and introduce a
+			return status that will be checked in all callers! */
+			switch (next_page) {
+			default:
+				if (next_page != block->page.id.page_no()) {
+					break;
+				}
+				/* MDEV-20931 FIXME: Check that
+				next_page is within the tablespace
+				bounds! Also check that it is not a
+				change buffer bitmap page. */
+				/* fall through */
+			case 0:
+			case 1:
+			case FIL_NULL:
+				return DB_CORRUPTION;
+			}
 
-	return(DB_SUCCESS);
+			dict_index_t* index = m_pcur.btr_cur.index;
+			buf_block_t* next_block = btr_block_get(
+				page_id_t(block->page.id.space(), next_page),
+				block->page.size, BTR_MODIFY_LEAF, index,
+				&m_mtr);
+
+			if (UNIV_UNLIKELY(!next_block
+					  || !fil_page_index_page_check(
+						  next_block->frame)
+					  || !!dict_index_is_spatial(index)
+					  != (fil_page_get_type(
+						      next_block->frame)
+					      == FIL_PAGE_RTREE)
+					  || page_is_comp(next_block->frame)
+					  != page_is_comp(block->frame)
+					  || btr_page_get_prev(
+						  next_block->frame)
+					  != block->page.id.page_no())) {
+				return DB_CORRUPTION;
+			}
+
+			btr_leaf_page_release(block, BTR_MODIFY_LEAF, &m_mtr);
+
+			page_cur_set_before_first(next_block,
+						  &m_pcur.btr_cur.page_cur);
+
+			ut_d(page_check_dir(next_block->frame));
+		} else {
+			btr_pcur_move_to_next_on_page(&m_pcur);
+		}
+	} while (!btr_pcur_is_on_user_rec(&m_pcur));
+
+	return DB_SUCCESS;
 }
 
 /**
@@ -1563,7 +1642,7 @@
 dberr_t
 PageConverter::adjust_cluster_index_blob_column(
 	rec_t*		rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	ulint		i) UNIV_NOTHROW
 {
 	ulint		len;
@@ -1607,7 +1686,7 @@
 dberr_t
 PageConverter::adjust_cluster_index_blob_columns(
 	rec_t*		rec,
-	const ulint*	offsets) UNIV_NOTHROW
+	const offset_t*	offsets) UNIV_NOTHROW
 {
 	ut_ad(rec_offs_any_extern(offsets));
 
@@ -1640,7 +1719,7 @@
 dberr_t
 PageConverter::adjust_cluster_index_blob_ref(
 	rec_t*		rec,
-	const ulint*	offsets) UNIV_NOTHROW
+	const offset_t*	offsets) UNIV_NOTHROW
 {
 	if (rec_offs_any_extern(offsets)) {
 		dberr_t	err;
@@ -1683,7 +1762,7 @@
 dberr_t
 PageConverter::adjust_cluster_record(
 	rec_t*			rec,
-	const ulint*		offsets) UNIV_NOTHROW
+	const offset_t*		offsets) UNIV_NOTHROW
 {
 	dberr_t	err;
 
@@ -2094,7 +2173,7 @@
 
 	DBUG_EXECUTE_IF("ib_import_before_checkpoint_crash", DBUG_SUICIDE(););
 
-	log_make_checkpoint_at(LSN_MAX);
+	log_make_checkpoint();
 
 	return(err);
 }
@@ -2281,8 +2360,8 @@
 		ulint		len;
 		const byte*	field;
 		mem_heap_t*	heap = NULL;
-		ulint		offsets_[1 + REC_OFFS_HEADER_SIZE];
-		ulint*		offsets;
+		offset_t	offsets_[1 + REC_OFFS_HEADER_SIZE];
+		offset_t*	offsets;
 
 		rec_offs_init(offsets_);
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0ins.cc mariadb-10.3-10.3.22/storage/innobase/row/row0ins.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0ins.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0ins.cc	2020-01-26 18:37:29.000000000 +0000
@@ -223,7 +223,7 @@
 				depending on whether mtr holds just a leaf
 				latch or also a tree latch */
 	btr_cur_t*	cursor,	/*!< in: B-tree cursor */
-	ulint**		offsets,/*!< in/out: offsets on cursor->page_cur.rec */
+	offset_t**	offsets,/*!< in/out: offsets on cursor->page_cur.rec */
 	mem_heap_t*	offsets_heap,
 				/*!< in/out: memory heap that can be emptied */
 	mem_heap_t*	heap,	/*!< in/out: memory heap */
@@ -318,7 +318,7 @@
 	ulint		mode,	/*!< in: BTR_MODIFY_LEAF or BTR_MODIFY_TREE,
 				depending on whether mtr holds just a leaf
 				latch or also a tree latch */
-	ulint**		offsets,/*!< out: offsets on cursor->page_cur.rec */
+	offset_t**	offsets,/*!< out: offsets on cursor->page_cur.rec */
 	mem_heap_t**	offsets_heap,
 				/*!< in/out: pointer to memory heap that can
 				be emptied, or NULL */
@@ -940,9 +940,9 @@
 {
 	THD*		thd = current_thd;
 	row_ext_t*	ext;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
 	rec_offs_init(offsets_);
-	const ulint*	offsets =
+	const offset_t*	offsets =
 		rec_get_offsets(rec, index, offsets_, true,
 				ULINT_UNDEFINED, &cascade->heap);
 	mem_heap_t*	v_heap = NULL;
@@ -1492,7 +1492,7 @@
 	const buf_block_t*	block,	/*!< in: buffer block of rec */
 	const rec_t*		rec,	/*!< in: record */
 	dict_index_t*		index,	/*!< in: index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	que_thr_t*		thr)	/*!< in: query thread */
 {
 	dberr_t	err;
@@ -1523,7 +1523,7 @@
 	const buf_block_t*	block,	/*!< in: buffer block of rec */
 	const rec_t*		rec,	/*!< in: record */
 	dict_index_t*		index,	/*!< in: index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	que_thr_t*		thr)	/*!< in: query thread */
 {
 	dberr_t	err;
@@ -1570,8 +1570,8 @@
 	mtr_t		mtr;
 	trx_t*		trx		= thr_get_trx(thr);
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 
 	bool		skip_gap_lock;
 
@@ -2074,7 +2074,7 @@
 				the record! */
 	const dtuple_t*	entry,	/*!< in: entry to insert */
 	dict_index_t*	index,	/*!< in: index */
-	const ulint*	offsets)/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets)/*!< in: rec_get_offsets(rec, index) */
 {
 	ulint	matched_fields;
 	ulint	n_unique;
@@ -2133,9 +2133,11 @@
 	btr_pcur_t	pcur;
 	dberr_t		err		= DB_SUCCESS;
 	ulint		allow_duplicates;
-	ulint*		offsets		= NULL;
+	offset_t	offsets_[REC_OFFS_SEC_INDEX_SIZE];
+	offset_t*	offsets		= offsets_;
 	DBUG_ENTER("row_ins_scan_sec_index_for_duplicate");
 
+	rec_offs_init(offsets_);
 
 	ut_ad(s_latch == rw_lock_own_flagged(
 			&index->lock, RW_LOCK_FLAG_S | RW_LOCK_FLAG_SX));
@@ -2265,7 +2267,7 @@
 	ulint		n_uniq,	/*!< in: offset of DB_TRX_ID */
 	const dtuple_t*	entry,	/*!< in: entry that is being inserted */
 	const rec_t*	rec,	/*!< in: clustered index record */
-	ulint*		offsets)/*!< in/out: rec_get_offsets(rec) */
+	offset_t*	offsets)/*!< in/out: rec_get_offsets(rec) */
 {
 	ulint	fields	= 0;
 
@@ -2304,7 +2306,7 @@
 	ulint		n_uniq,	/*!< in: offset of DB_TRX_ID */
 	const dtuple_t*	entry,	/*!< in: entry that is being inserted */
 	const btr_cur_t*cursor,	/*!< in: cursor on insert position */
-	ulint**		offsets,/*!< in/out: rec_get_offsets(rec) */
+	offset_t**	offsets,/*!< in/out: rec_get_offsets(rec) */
 	mem_heap_t**	heap)	/*!< in/out: heap for offsets */
 {
 	dberr_t		err	= DB_SUCCESS;
@@ -2353,8 +2355,8 @@
 	ulint	n_unique;
 	trx_t*	trx		= thr_get_trx(thr);
 	mem_heap_t*heap		= NULL;
-	ulint	offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*	offsets		= offsets_;
+	offset_t offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t* offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(dict_index_is_clust(cursor->index));
@@ -2527,7 +2529,7 @@
 row_ins_index_entry_big_rec(
 	const dtuple_t*		entry,
 	const big_rec_t*	big_rec,
-	ulint*			offsets,
+	offset_t*		offsets,
 	mem_heap_t**		heap,
 	dict_index_t*		index,
 	const void*		thd __attribute__((unused)))
@@ -2593,10 +2595,7 @@
 	ulint		n_uniq,	/*!< in: 0 or index->n_uniq */
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	ulint		n_ext,	/*!< in: number of externally stored columns */
-	que_thr_t*	thr,	/*!< in: query thread */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	que_thr_t*	thr)	/*!< in: query thread */
 {
 	btr_pcur_t	pcur;
 	btr_cur_t*	cursor;
@@ -2605,8 +2604,8 @@
 	mtr_t		mtr;
 	ib_uint64_t	auto_inc	= 0;
 	mem_heap_t*	offsets_heap	= NULL;
-	ulint           offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*          offsets         = offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets         = offsets_;
 	rec_offs_init(offsets_);
 
 	DBUG_ENTER("row_ins_clust_index_entry_low");
@@ -2636,7 +2635,7 @@
 		if (mode == BTR_MODIFY_LEAF
 		    && dict_index_is_online_ddl(index)) {
 			mode = BTR_MODIFY_LEAF_ALREADY_S_LATCHED;
-			mtr_s_lock(dict_index_get_lock(index), &mtr);
+			mtr_s_lock_index(index, &mtr);
 		}
 
 		if (unsigned ai = index->table->persistent_autoinc) {
@@ -2685,7 +2684,6 @@
 		ut_ad(flags == BTR_NO_LOCKING_FLAG);
 		ut_ad(index->is_instant());
 		ut_ad(!dict_index_is_online_ddl(index));
-		ut_ad(!dup_chk_only);
 
 		const rec_t* rec = btr_cur_get_rec(cursor);
 
@@ -2751,11 +2749,6 @@
 		}
 	}
 
-	if (dup_chk_only) {
-		mtr_commit(&mtr);
-		goto func_exit;
-	}
-
 	/* Note: Allowing duplicates would qualify for modification of
 	an existing record as the new entry is exactly same as old entry. */
 	if (row_ins_must_modify_rec(cursor)) {
@@ -2875,9 +2868,9 @@
 	}
 
 	if (search_mode & BTR_ALREADY_S_LATCHED) {
-		mtr_s_lock(dict_index_get_lock(index), mtr);
+		mtr_s_lock_index(index, mtr);
 	} else {
-		mtr_sx_lock(dict_index_get_lock(index), mtr);
+		mtr_sx_lock_index(index, mtr);
 	}
 
 	switch (index->online_status) {
@@ -2917,10 +2910,7 @@
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	trx_id_t	trx_id,	/*!< in: PAGE_MAX_TRX_ID during
 				row_log_table_apply(), or 0 */
-	que_thr_t*	thr,	/*!< in: query thread */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	que_thr_t*	thr)	/*!< in: query thread */
 {
 	DBUG_ENTER("row_ins_sec_index_entry_low");
 
@@ -2929,8 +2919,8 @@
 	dberr_t		err		= DB_SUCCESS;
 	ulint		n_unique;
 	mtr_t		mtr;
-	ulint           offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*          offsets         = offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets         = offsets_;
 	rec_offs_init(offsets_);
 	rtr_info_t	rtr_info;
 
@@ -2966,9 +2956,9 @@
 		DEBUG_SYNC_C("row_ins_sec_index_enter");
 		if (mode == BTR_MODIFY_LEAF) {
 			search_mode |= BTR_ALREADY_S_LATCHED;
-			mtr_s_lock(dict_index_get_lock(index), &mtr);
+			mtr_s_lock_index(index, &mtr);
 		} else {
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 		}
 
 		if (row_log_online_op_try(
@@ -3117,10 +3107,6 @@
 			&cursor, 0, __FILE__, __LINE__, &mtr);
 	}
 
-	if (dup_chk_only) {
-		goto func_exit;
-	}
-
 	if (row_ins_must_modify_rec(&cursor)) {
 		/* There is already an index entry with a long enough common
 		prefix, we must convert the insert into a modify of an
@@ -3209,10 +3195,7 @@
 	dict_index_t*	index,	/*!< in: clustered index */
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	que_thr_t*	thr,	/*!< in: query thread */
-	ulint		n_ext,	/*!< in: number of externally stored columns */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	ulint		n_ext)	/*!< in: number of externally stored columns */
 {
 	dberr_t	err;
 	ulint	n_uniq;
@@ -3251,7 +3234,7 @@
 
 	err = row_ins_clust_index_entry_low(
 		flags, BTR_MODIFY_LEAF, index, n_uniq, entry,
-		n_ext, thr, dup_chk_only);
+		n_ext, thr);
 
 	entry->n_fields = orig_n_fields;
 
@@ -3268,7 +3251,7 @@
 
 	err = row_ins_clust_index_entry_low(
 		flags, BTR_MODIFY_TREE, index, n_uniq, entry,
-		n_ext, thr, dup_chk_only);
+		n_ext, thr);
 
 	entry->n_fields = orig_n_fields;
 
@@ -3287,9 +3270,8 @@
 	dict_index_t*	index,	/*!< in: secondary index */
 	dtuple_t*	entry,	/*!< in/out: index entry to insert */
 	que_thr_t*	thr,	/*!< in: query thread */
-	bool		dup_chk_only)
-				/*!< in: if true, just do duplicate check
-				and return. don't execute actual insert. */
+	bool		check_foreign) /*!< in: true if check
+				foreign table is needed, false otherwise */
 {
 	dberr_t		err;
 	mem_heap_t*	offsets_heap;
@@ -3300,7 +3282,7 @@
 			DBUG_SET("-d,row_ins_sec_index_entry_timeout");
 			return(DB_LOCK_WAIT);});
 
-	if (!index->table->foreign_set.empty()) {
+	if (check_foreign && !index->table->foreign_set.empty()) {
 		err = row_ins_check_foreign_constraints(index->table, index,
 							false, entry, thr);
 		if (err != DB_SUCCESS) {
@@ -3332,7 +3314,7 @@
 
 	err = row_ins_sec_index_entry_low(
 		flags, BTR_MODIFY_LEAF, index, offsets_heap, heap, entry,
-		trx_id, thr, dup_chk_only);
+		trx_id, thr);
 	if (err == DB_FAIL) {
 		mem_heap_empty(heap);
 
@@ -3346,8 +3328,7 @@
 
 		err = row_ins_sec_index_entry_low(
 			flags, BTR_MODIFY_TREE, index,
-			offsets_heap, heap, entry, 0, thr,
-			dup_chk_only);
+			offsets_heap, heap, entry, 0, thr);
 	}
 
 	mem_heap_free(heap);
@@ -3376,9 +3357,9 @@
 			return(DB_LOCK_WAIT);});
 
 	if (index->is_primary()) {
-		return(row_ins_clust_index_entry(index, entry, thr, 0, false));
+		return row_ins_clust_index_entry(index, entry, thr, 0);
 	} else {
-		return(row_ins_sec_index_entry(index, entry, thr, false));
+		return row_ins_sec_index_entry(index, entry, thr);
 	}
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0log.cc mariadb-10.3-10.3.22/storage/innobase/row/row0log.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0log.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0log.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, 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
@@ -643,7 +643,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index) */
 	const byte*	sys)	/*!< in: DB_TRX_ID,DB_ROLL_PTR that should
 				be logged, or NULL to use those in rec */
 {
@@ -934,7 +934,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index) */
 	bool		insert,	/*!< in: true if insert, false if update */
 	const dtuple_t*	old_pk)	/*!< in: old PRIMARY KEY value (if !insert
 				and a PRIMARY KEY is being created) */
@@ -1103,7 +1103,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index) */
 	const dtuple_t*	old_pk)	/*!< in: row_log_table_get_pk()
 				before the update */
 {
@@ -1153,7 +1153,7 @@
 	dfield_t*		dfield,
 	mem_heap_t*		heap,
 	const rec_t*		rec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	ulint			i,
 	const page_size_t&	page_size,
 	ulint			max_len,
@@ -1164,6 +1164,10 @@
 
 	field = rec_get_nth_field(rec, offsets, i, &len);
 
+	if (len == UNIV_SQL_DEFAULT) {
+		field = log->instant_field_value(i, &len);
+	}
+
 	if (len == UNIV_SQL_NULL) {
 		if (!log->allow_not_null) {
 			return(DB_INVALID_NULL);
@@ -1219,7 +1223,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec,index) */
 	byte*		sys,	/*!< out: DB_TRX_ID,DB_ROLL_PTR for
 				row_log_table_delete(), or NULL */
 	mem_heap_t**	heap)	/*!< in/out: memory heap where allocated */
@@ -1426,7 +1430,7 @@
 				page X-latched */
 	dict_index_t*	index,	/*!< in/out: clustered index, S-latched
 				or X-latched */
-	const ulint*	offsets)/*!< in: rec_get_offsets(rec,index) */
+	const offset_t*	offsets)/*!< in: rec_get_offsets(rec,index) */
 {
 	row_log_table_low(rec, index, offsets, true, NULL);
 }
@@ -1517,7 +1521,7 @@
 /*=============================*/
 	const mrec_t*		mrec,		/*!< in: merge record */
 	dict_index_t*		index,		/*!< in: index of mrec */
-	const ulint*		offsets,	/*!< in: offsets of mrec */
+	const offset_t*		offsets,	/*!< in: offsets of mrec */
 	row_log_t*		log,		/*!< in: rebuild context */
 	mem_heap_t*		heap,		/*!< in/out: memory heap */
 	dberr_t*		error)		/*!< out: DB_SUCCESS or
@@ -1717,7 +1721,7 @@
 
 	error = row_ins_clust_index_entry_low(
 		flags, BTR_MODIFY_TREE, index, index->n_uniq,
-		entry, 0, thr, false);
+		entry, 0, thr);
 
 	switch (error) {
 	case DB_SUCCESS:
@@ -1741,7 +1745,7 @@
 		error = row_ins_sec_index_entry_low(
 			flags, BTR_MODIFY_TREE,
 			index, offsets_heap, heap, entry,
-			thr_get_trx(thr)->id, thr, false);
+			thr_get_trx(thr)->id, thr);
 
 		if (error != DB_SUCCESS) {
 			if (error == DB_DUPLICATE_KEY) {
@@ -1763,7 +1767,7 @@
 /*=======================*/
 	que_thr_t*		thr,		/*!< in: query graph */
 	const mrec_t*		mrec,		/*!< in: record to insert */
-	const ulint*		offsets,	/*!< in: offsets of mrec */
+	const offset_t*		offsets,	/*!< in: offsets of mrec */
 	mem_heap_t*		offsets_heap,	/*!< in/out: memory heap
 						that can be emptied */
 	mem_heap_t*		heap,		/*!< in/out: memory heap */
@@ -1815,7 +1819,7 @@
 /*===========================*/
 	btr_pcur_t*		pcur,		/*!< in/out: B-tree cursor,
 						will be trashed */
-	const ulint*		offsets,	/*!< in: offsets on pcur */
+	const offset_t*		offsets,	/*!< in: offsets on pcur */
 	mem_heap_t*		heap,		/*!< in/out: memory heap */
 	mtr_t*			mtr)		/*!< in/out: mini-transaction,
 						will be committed */
@@ -1908,7 +1912,7 @@
 						DB_TRX_ID in the new
 						clustered index */
 	const mrec_t*		mrec,		/*!< in: merge record */
-	const ulint*		moffsets,	/*!< in: offsets of mrec */
+	const offset_t*		moffsets,	/*!< in: offsets of mrec */
 	mem_heap_t*		offsets_heap,	/*!< in/out: memory heap
 						that can be emptied */
 	mem_heap_t*		heap,		/*!< in/out: memory heap */
@@ -1919,7 +1923,7 @@
 	dtuple_t*	old_pk;
 	mtr_t		mtr;
 	btr_pcur_t	pcur;
-	ulint*		offsets;
+	offset_t*	offsets;
 
 	ut_ad(rec_offs_n_fields(moffsets)
 	      == dict_index_get_n_unique(index) + 2);
@@ -2031,7 +2035,7 @@
 						DB_TRX_ID in the new
 						clustered index */
 	const mrec_t*		mrec,		/*!< in: new value */
-	const ulint*		offsets,	/*!< in: offsets of mrec */
+	const offset_t*		offsets,	/*!< in: offsets of mrec */
 	mem_heap_t*		offsets_heap,	/*!< in/out: memory heap
 						that can be emptied */
 	mem_heap_t*		heap,		/*!< in/out: memory heap */
@@ -2169,7 +2173,7 @@
 	}
 
 	/* Prepare to update (or delete) the record. */
-	ulint*		cur_offsets	= rec_get_offsets(
+	offset_t*		cur_offsets	= rec_get_offsets(
 		btr_pcur_get_rec(&pcur), index, NULL, true,
 		ULINT_UNDEFINED, &offsets_heap);
 
@@ -2373,7 +2377,7 @@
 			BTR_CREATE_FLAG | BTR_NO_LOCKING_FLAG
 			| BTR_NO_UNDO_LOG_FLAG | BTR_KEEP_SYS_FLAG,
 			BTR_MODIFY_TREE, index, offsets_heap, heap,
-			entry, thr_get_trx(thr)->id, thr, false);
+			entry, thr_get_trx(thr)->id, thr);
 
 		/* Report correct index name for duplicate key error. */
 		if (error == DB_DUPLICATE_KEY) {
@@ -2407,7 +2411,7 @@
 	mem_heap_t*		heap,		/*!< in/out: memory heap */
 	const mrec_t*		mrec,		/*!< in: merge record */
 	const mrec_t*		mrec_end,	/*!< in: end of buffer */
-	ulint*			offsets)	/*!< in/out: work area
+	offset_t*		offsets)	/*!< in/out: work area
 						for parsing mrec */
 {
 	row_log_t*	log	= dup->index->online_log;
@@ -2741,7 +2745,7 @@
 	const mrec_t*	next_mrec_end;
 	mem_heap_t*	heap;
 	mem_heap_t*	offsets_heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 	bool		has_index_lock;
 	dict_index_t*	index		= const_cast(
 		dup->index);
@@ -2768,9 +2772,9 @@
 
 	UNIV_MEM_INVALID(&mrec_end, sizeof mrec_end);
 
-	offsets = static_cast(ut_malloc_nokey(i * sizeof *offsets));
-	offsets[0] = i;
-	offsets[1] = dict_index_get_n_fields(index);
+	offsets = static_cast(ut_malloc_nokey(i * sizeof *offsets));
+	rec_offs_set_n_alloc(offsets, i);
+	rec_offs_set_n_fields(offsets, dict_index_get_n_fields(index));
 
 	heap = mem_heap_create(srv_page_size);
 	offsets_heap = mem_heap_create(srv_page_size);
@@ -3314,7 +3318,7 @@
 {
 	mtr_t		mtr;
 	btr_cur_t	cursor;
-	ulint*		offsets = NULL;
+	offset_t*	offsets = NULL;
 
 	ut_ad(!dict_index_is_clust(index));
 
@@ -3548,14 +3552,13 @@
 					in exclusive mode */
 	const mrec_t*	mrec,		/*!< in: merge record */
 	const mrec_t*	mrec_end,	/*!< in: end of buffer */
-	ulint*		offsets)	/*!< in/out: work area for
+	offset_t*	offsets)	/*!< in/out: work area for
 					rec_init_offsets_temp() */
 
 {
 	enum row_op	op;
 	ulint		extra_size;
 	ulint		data_size;
-	ulint		n_ext;
 	dtuple_t*	entry;
 	trx_id_t	trx_id;
 
@@ -3633,10 +3636,10 @@
 	}
 
 	entry = row_rec_to_index_entry_low(
-		mrec - data_size, index, offsets, &n_ext, heap);
+		mrec - data_size, index, offsets, heap);
 	/* Online index creation is only implemented for secondary
 	indexes, which never contain off-page columns. */
-	ut_ad(n_ext == 0);
+	ut_ad(dtuple_get_n_ext(entry) == 0);
 
 	row_log_apply_op_low(index, dup, error, offsets_heap,
 			     has_index_lock, op, trx_id, entry);
@@ -3667,7 +3670,7 @@
 	const mrec_t*	next_mrec_end;
 	mem_heap_t*	offsets_heap;
 	mem_heap_t*	heap;
-	ulint*		offsets;
+	offset_t*	offsets;
 	bool		has_index_lock;
 	const ulint	i	= 1 + REC_OFFS_HEADER_SIZE
 		+ dict_index_get_n_fields(index);
@@ -3678,9 +3681,9 @@
 	ut_ad(index->online_log);
 	UNIV_MEM_INVALID(&mrec_end, sizeof mrec_end);
 
-	offsets = static_cast(ut_malloc_nokey(i * sizeof *offsets));
-	offsets[0] = i;
-	offsets[1] = dict_index_get_n_fields(index);
+	offsets = static_cast(ut_malloc_nokey(i * sizeof *offsets));
+	rec_offs_set_n_alloc(offsets, i);
+	rec_offs_set_n_fields(offsets, dict_index_get_n_fields(index));
 
 	offsets_heap = mem_heap_create(srv_page_size);
 	heap = mem_heap_create(srv_page_size);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0merge.cc mariadb-10.3-10.3.22/storage/innobase/row/row0merge.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0merge.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0merge.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 2005, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2019, MariaDB Corporation.
+Copyright (c) 2014, 2020, 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
@@ -120,7 +120,7 @@
 		btr_cur_t       ins_cur;
 		mtr_t           mtr;
 		rtr_info_t      rtr_info;
-		ulint*		ins_offsets = NULL;
+		offset_t*	ins_offsets = NULL;
 		dberr_t		error = DB_SUCCESS;
 		dtuple_t*	dtuple;
 		ulint		count = 0;
@@ -1046,8 +1046,8 @@
 /*==================*/
 	const dict_index_t*	index,		/*!< in: record descriptor */
 	mrec_buf_t**		buf,		/*!< out: 3 buffers */
-	ulint**			offsets1,	/*!< out: offsets */
-	ulint**			offsets2)	/*!< out: offsets */
+	offset_t**		offsets1,	/*!< out: offsets */
+	offset_t**		offsets2)	/*!< out: offsets */
 {
 	ulint		i	= 1 + REC_OFFS_HEADER_SIZE
 		+ dict_index_get_n_fields(index);
@@ -1056,13 +1056,15 @@
 
 	*buf = static_cast(
 		mem_heap_alloc(heap, 3 * sizeof **buf));
-	*offsets1 = static_cast(
+	*offsets1 = static_cast(
 		mem_heap_alloc(heap, i * sizeof **offsets1));
-	*offsets2 = static_cast(
+	*offsets2 = static_cast(
 		mem_heap_alloc(heap, i * sizeof **offsets2));
 
-	(*offsets1)[0] = (*offsets2)[0] = i;
-	(*offsets1)[1] = (*offsets2)[1] = dict_index_get_n_fields(index);
+	rec_offs_set_n_alloc(*offsets1, i);
+	rec_offs_set_n_alloc(*offsets2, i);
+	rec_offs_set_n_fields(*offsets1, dict_index_get_n_fields(index));
+	rec_offs_set_n_fields(*offsets2, dict_index_get_n_fields(index));
 
 	return(heap);
 }
@@ -1178,7 +1180,7 @@
 	const mrec_t**		mrec,	/*!< out: pointer to merge record,
 					or NULL on end of list
 					(non-NULL on I/O error) */
-	ulint*			offsets,/*!< out: offsets of mrec */
+	offset_t*		offsets,/*!< out: offsets of mrec */
 	row_merge_block_t*	crypt_block, /*!< in: crypt buf or NULL */
 	ulint			space) /*!< in: space id */
 {
@@ -1189,7 +1191,7 @@
 	ut_ad(b >= &block[0]);
 	ut_ad(b < &block[srv_sort_buf_size]);
 
-	ut_ad(*offsets == 1 + REC_OFFS_HEADER_SIZE
+	ut_ad(rec_offs_get_n_alloc(offsets) == 1 + REC_OFFS_HEADER_SIZE
 	      + dict_index_get_n_fields(index));
 
 	DBUG_ENTER("row_merge_read_rec");
@@ -1296,12 +1298,7 @@
 	memcpy(*buf, b, avail_size);
 	*mrec = *buf + extra_size;
 
-	/* We cannot invoke rec_offs_make_valid() here, because there
-	are no REC_N_NEW_EXTRA_BYTES between extra_size and data_size.
-	Similarly, rec_offs_validate() would fail, because it invokes
-	rec_get_status(). */
-	ut_d(offsets[2] = (ulint) *mrec);
-	ut_d(offsets[3] = (ulint) index);
+	rec_init_offsets_temp(*mrec, index, offsets);
 
 	if (!row_merge_read(fd, ++(*foffs), block,
 			    crypt_block,
@@ -1340,7 +1337,7 @@
 	ulint		foffs,	/*!< in: file offset */
 #endif /* !DBUG_OFF */
 	const mrec_t*	mrec,	/*!< in: record to write */
-	const ulint*	offsets)/*!< in: offsets of mrec */
+	const offset_t*	offsets)/*!< in: offsets of mrec */
 #ifdef DBUG_OFF
 # define row_merge_write_rec_low(b, e, size, fd, foffs, mrec, offsets)	\
 	row_merge_write_rec_low(b, e, mrec, offsets)
@@ -1382,7 +1379,7 @@
 	const pfs_os_file_t&	fd,	/*!< in: file descriptor */
 	ulint*			foffs,	/*!< in/out: file offset */
 	const mrec_t*		mrec,	/*!< in: record to write */
-	const ulint*            offsets,/*!< in: offsets of mrec */
+	const offset_t*         offsets,/*!< in: offsets of mrec */
 	row_merge_block_t*	crypt_block, /*!< in: crypt buf or NULL */
 	ulint			space)	   /*!< in: space id */
 {
@@ -1929,7 +1926,7 @@
 
 		const rec_t*	rec;
 		trx_id_t	rec_trx_id;
-		ulint*		offsets;
+		offset_t*	offsets;
 		dtuple_t*	row;
 		row_ext_t*	ext;
 		page_cur_t*	cur	= btr_pcur_get_page_cur(&pcur);
@@ -2020,7 +2017,7 @@
 				buf_block_t*	block;
 
 				next_page_no = btr_page_get_next(
-					page_cur_get_page(cur), &mtr);
+					page_cur_get_page(cur));
 
 				if (next_page_no == FIL_NULL) {
 					goto end_of_index;
@@ -2697,7 +2694,7 @@
 						buf, fts_index, old_table,
 						new_table, psort_info, row, ext,
 						&doc_id, conv_heap,
-						&err, &v_heap, table, trx)))) {
+						&err, &v_heap, eval_table, trx)))) {
 					/* An empty buffer should have enough
 					room for at least one record. */
 					ut_error;
@@ -2963,8 +2960,8 @@
 	const mrec_t*	mrec0;	/*!< merge rec, points to block[0] or buf[0] */
 	const mrec_t*	mrec1;	/*!< merge rec, points to
 				block[srv_sort_buf_size] or buf[1] */
-	ulint*		offsets0;/* offsets of mrec0 */
-	ulint*		offsets1;/* offsets of mrec1 */
+	offset_t*	offsets0;/* offsets of mrec0 */
+	offset_t*	offsets1;/* offsets of mrec1 */
 
 	DBUG_ENTER("row_merge_blocks");
 	DBUG_LOG("ib_merge_sort",
@@ -3081,8 +3078,8 @@
 	const byte*	b0;	/*!< pointer to block[0] */
 	byte*		b2;	/*!< pointer to block[2 * srv_sort_buf_size] */
 	const mrec_t*	mrec0;	/*!< merge rec, points to block[0] */
-	ulint*		offsets0;/* offsets of mrec0 */
-	ulint*		offsets1;/* dummy offsets */
+	offset_t*	offsets0;/* offsets of mrec0 */
+	offset_t*	offsets1;/* dummy offsets */
 
 	DBUG_ENTER("row_merge_blocks_copy");
 	DBUG_LOG("ib_merge_sort",
@@ -3421,7 +3418,7 @@
 void
 row_merge_copy_blobs(
 	const mrec_t*		mrec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	const page_size_t&	page_size,
 	dtuple_t*		tuple,
 	mem_heap_t*		heap)
@@ -3530,7 +3527,7 @@
 	mem_heap_t*		tuple_heap;
 	dberr_t			error = DB_SUCCESS;
 	ulint			foffs = 0;
-	ulint*			offsets;
+	offset_t*		offsets;
 	mrec_buf_t*		buf;
 	ulint			n_rows = 0;
 	dtuple_t*		dtuple;
@@ -3538,7 +3535,6 @@
 	double			curr_progress = 0;
 	dict_index_t*		old_index = NULL;
 	const mrec_t*		mrec  = NULL;
-	ulint			n_ext = 0;
 	mtr_t			mtr;
 
 
@@ -3558,10 +3554,10 @@
 		ulint i	= 1 + REC_OFFS_HEADER_SIZE
 			+ dict_index_get_n_fields(index);
 		heap = mem_heap_create(sizeof *buf + i * sizeof *offsets);
-		offsets = static_cast(
+		offsets = static_cast(
 			mem_heap_alloc(heap, i * sizeof *offsets));
-		offsets[0] = i;
-		offsets[1] = dict_index_get_n_fields(index);
+		rec_offs_set_n_alloc(offsets, i);
+		rec_offs_set_n_fields(offsets, dict_index_get_n_fields(index));
 	}
 
 	if (row_buf != NULL) {
@@ -3604,8 +3600,6 @@
 			row buffer to data tuple record */
 			row_merge_mtuple_to_dtuple(
 				index, dtuple, &row_buf->tuples[n_rows]);
-
-			n_ext = dtuple_get_n_ext(dtuple);
 			n_rows++;
 			/* BLOB pointers must be copied from dtuple */
 			mrec = NULL;
@@ -3624,7 +3618,7 @@
 			}
 
 			dtuple = row_rec_to_index_entry_low(
-				mrec, index, offsets, &n_ext, tuple_heap);
+				mrec, index, offsets, tuple_heap);
 		}
 
 		old_index	= dict_table_get_first_index(old_table);
@@ -3637,10 +3631,7 @@
 			}
 		}
 
-		if (!n_ext) {
-			/* There are no externally stored columns. */
-		} else {
-			ut_ad(dict_index_is_clust(index));
+		if (dict_index_is_clust(index) && dtuple_get_n_ext(dtuple)) {
 			/* Off-page columns can be fetched safely
 			when concurrent modifications to the table
 			are disabled. (Purge can process delete-marked
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0mysql.cc mariadb-10.3-10.3.22/storage/innobase/row/row0mysql.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0mysql.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0mysql.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2063,8 +2063,8 @@
 						     + index->trx_id_offset);
 		} else {
 			mem_heap_t*	heap			= NULL;
-			ulint	offsets_[REC_OFFS_NORMAL_SIZE];
-			ulint*	offsets				= offsets_;
+			offset_t offsets_[REC_OFFS_NORMAL_SIZE];
+			offset_t* offsets				= offsets_;
 
 			rec_offs_init(offsets_);
 			offsets = rec_get_offsets(rec, index, offsets, true,
@@ -2580,10 +2580,9 @@
 	} else {
 		dict_build_index_def(table, index, trx);
 
-		/* add index to dictionary cache and also free index object. */
-		index = dict_index_add_to_cache(
-			index, FIL_NULL, trx_is_strict(trx), &err);
-		if (index) {
+		err = dict_index_add_to_cache(index, FIL_NULL);
+		ut_ad((index == NULL) == (err != DB_SUCCESS));
+		if (UNIV_LIKELY(err == DB_SUCCESS)) {
 			ut_ad(!index->is_instant());
 			index->n_core_null_bytes = UT_BITS_IN_BYTES(
 				unsigned(index->n_nullable));
@@ -2777,7 +2776,7 @@
 			btr_pcur_store_position(&pcur, &mtr);
 			btr_pcur_commit_specify_mtr(&pcur, &mtr);
 
-			if (dict_load_table(table_name, true,
+			if (dict_load_table(table_name,
 					    DICT_ERR_IGNORE_DROP)) {
 				row_drop_table_for_mysql(table_name, trx,
 							 SQLCOM_DROP_TABLE);
@@ -3246,10 +3245,9 @@
 	DICT_TF2_FTS flag set. So keep this out of above
 	dict_table_has_fts_index condition */
 	if (table->fts != NULL) {
-		/* Need to set TABLE_DICT_LOCKED bit, since
-		fts_que_graph_free_check_lock would try to acquire
+		/* fts_que_graph_free_check_lock would try to acquire
 		dict mutex lock */
-		table->fts->fts_status |= TABLE_DICT_LOCKED;
+		table->fts->dict_locked = true;
 
 		fts_free(table);
 	}
@@ -3279,7 +3277,7 @@
 
 	dict_table_remove_from_cache(table);
 
-	if (dict_load_table(tablename, true, DICT_ERR_IGNORE_FK_NOKEY)) {
+	if (dict_load_table(tablename, DICT_ERR_IGNORE_FK_NOKEY)) {
 		ib::error() << "Not able to remove table "
 			<< ut_get_name(trx, tablename)
 			<< " from the dictionary cache!";
@@ -4600,7 +4598,7 @@
 		dict_mem_table_fill_foreign_vcol_set(table);
 
 		while (!fk_tables.empty()) {
-			dict_load_table(fk_tables.front(), true,
+			dict_load_table(fk_tables.front(),
 					DICT_ERR_IGNORE_NONE);
 			fk_tables.pop_front();
 		}
@@ -4683,9 +4681,8 @@
 	ulint		i;
 	ulint		cnt;
 	mem_heap_t*	heap		= NULL;
-	ulint		n_ext;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets;
 	rec_offs_init(offsets_);
 
 	*n_rows = 0;
@@ -4818,14 +4815,14 @@
 
 			tmp_heap = mem_heap_create(size);
 
-			offsets = static_cast(
+			offsets = static_cast(
 				mem_heap_dup(tmp_heap, offsets, size));
 		}
 
 		mem_heap_empty(heap);
 
 		prev_entry = row_rec_to_index_entry(
-			rec, index, offsets, &n_ext, heap);
+			rec, index, offsets, heap);
 
 		if (UNIV_LIKELY_NULL(tmp_heap)) {
 			mem_heap_free(tmp_heap);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0purge.cc mariadb-10.3-10.3.22/storage/innobase/row/row0purge.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0purge.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0purge.cc	2020-01-26 18:37:29.000000000 +0000
@@ -46,6 +46,7 @@
 #include "handler.h"
 #include "ha_innodb.h"
 #include "fil0fil.h"
+#include "debug_sync.h"
 
 /*************************************************************************
 IMPORTANT NOTE: Any operation that generates redo MUST check that there
@@ -107,8 +108,8 @@
 	mtr_t			mtr;
 	rec_t*			rec;
 	mem_heap_t*		heap		= NULL;
-	ulint*			offsets;
-	ulint			offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*		offsets;
+	offset_t		offsets_[REC_OFFS_NORMAL_SIZE];
 	rec_offs_init(offsets_);
 
 	ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_S)
@@ -384,14 +385,14 @@
 	enum row_search_result	search_result;
 
 	log_free_check();
-	mtr_start(&mtr);
+	mtr.start();
 	index->set_modified(mtr);
 
 	if (!index->is_committed()) {
 		/* The index->online_status may change if the index is
 		or was being created online, but not committed yet. It
 		is protected by index->lock. */
-		mtr_sx_lock(dict_index_get_lock(index), &mtr);
+		mtr_sx_lock_index(index, &mtr);
 
 		if (dict_index_is_online_ddl(index)) {
 			/* Online secondary index creation will not
@@ -486,9 +487,9 @@
 	}
 
 func_exit:
-	btr_pcur_close(&pcur);
+	btr_pcur_close(&pcur); // FIXME: need this?
 func_exit_no_pcur:
-	mtr_commit(&mtr);
+	mtr.commit();
 
 	return(success);
 }
@@ -515,7 +516,7 @@
 	log_free_check();
 	ut_ad(index->table == node->table);
 	ut_ad(!index->table->is_temporary());
-	mtr_start(&mtr);
+	mtr.start();
 	index->set_modified(mtr);
 
 	if (!index->is_committed()) {
@@ -527,7 +528,7 @@
 		/* The index->online_status may change if the the
 		index is or was being created online, but not
 		committed yet. It is protected by index->lock. */
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
+		mtr_s_lock_index(index, &mtr);
 
 		if (dict_index_is_online_ddl(index)) {
 			/* Online secondary index creation will not
@@ -631,7 +632,7 @@
 						 ->page.id);
 
 					btr_pcur_close(&pcur);
-					mtr_commit(&mtr);
+					mtr.commit();
 					return(success);
 				}
 			}
@@ -657,9 +658,9 @@
 		/* The deletion was buffered. */
 	case ROW_NOT_FOUND:
 		/* The index entry does not exist, nothing to do. */
-		btr_pcur_close(&pcur);
+		btr_pcur_close(&pcur); // FIXME: do we need these? when is btr_cur->rtr_info set?
 func_exit_no_pcur:
-		mtr_commit(&mtr);
+		mtr.commit();
 		return(success);
 	}
 
@@ -800,9 +801,9 @@
 		mem_heap_t*	heap = NULL;
 		/* Reserve enough offsets for the PRIMARY KEY and 2 columns
 		so that we can access DB_TRX_ID, DB_ROLL_PTR. */
-		ulint	offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
+		offset_t offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
 		rec_offs_init(offsets_);
-		ulint*	offsets = rec_get_offsets(
+		offset_t*	offsets = rec_get_offsets(
 			rec, index, offsets_, true, trx_id_pos + 2, &heap);
 		ut_ad(heap == NULL);
 
@@ -949,12 +950,12 @@
 			ut_ad(rseg->id == rseg_id);
 			ut_ad(rseg->is_persistent());
 
-			mtr_start(&mtr);
+			mtr.start();
 
 			/* We have to acquire an SX-latch to the clustered
 			index tree (exclude other tree changes) */
 
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 
 			index->set_modified(mtr);
 
@@ -985,7 +986,7 @@
 				data_field + dfield_get_len(&ufield->new_val)
 				- BTR_EXTERN_FIELD_REF_SIZE,
 				NULL, NULL, NULL, 0, false, &mtr);
-			mtr_commit(&mtr);
+			mtr.commit();
 		}
 	}
 
@@ -1306,6 +1307,26 @@
 
 	node->start();
 
+#ifdef UNIV_DEBUG
+	srv_slot_t *slot = thr->thread_slot;
+	ut_ad(slot);
+
+	rw_lock_x_lock(&slot->debug_sync_lock);
+	while (UT_LIST_GET_LEN(slot->debug_sync)) {
+		srv_slot_t::debug_sync_t *sync =
+					UT_LIST_GET_FIRST(slot->debug_sync);
+		const char* sync_str = reinterpret_cast(&sync[1]);
+		bool result = debug_sync_set_action(current_thd,
+						    sync_str,
+						    strlen(sync_str));
+		ut_a(!result);
+
+		UT_LIST_REMOVE(slot->debug_sync, sync);
+		ut_free(sync);
+	}
+	rw_lock_x_unlock(&slot->debug_sync_lock);
+#endif
+
 	if (!(node->undo_recs == NULL || ib_vector_is_empty(node->undo_recs))) {
 		trx_purge_rec_t*purge_rec;
 
@@ -1360,7 +1381,7 @@
 
 	dict_index_t*	clust_index = pcur.btr_cur.index;
 
-	ulint*	offsets = rec_get_offsets(
+	offset_t* offsets = rec_get_offsets(
 		pcur.old_rec, clust_index, NULL, true,
 		pcur.old_n_fields, &heap);
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0row.cc mariadb-10.3-10.3.22/storage/innobase/row/row0row.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0row.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0row.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2018, 2019, MariaDB Corporation.
+Copyright (c) 2018, 2020, 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
@@ -393,7 +393,7 @@
 	ulint			type,
 	const dict_index_t*	index,
 	const rec_t*		rec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	const dict_table_t*	col_table,
 	const dtuple_t*		defaults,
 	const dict_add_v_col_t*	add_v,
@@ -409,7 +409,7 @@
 	byte*			buf;
 	ulint			j;
 	mem_heap_t*		tmp_heap	= NULL;
-	ulint			offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t		offsets_[REC_OFFS_NORMAL_SIZE];
 	rec_offs_init(offsets_);
 
 	ut_ad(index != NULL);
@@ -457,7 +457,7 @@
 	}
 
 	/* Avoid a debug assertion in rec_offs_validate(). */
-	rec_offs_make_valid(copy, index, true, const_cast(offsets));
+	rec_offs_make_valid(copy, index, true, const_cast(offsets));
 
 	if (!col_table) {
 		ut_ad(!col_map);
@@ -551,7 +551,7 @@
 		}
 	}
 
-	rec_offs_make_valid(rec, index, true, const_cast(offsets));
+	rec_offs_make_valid(rec, index, true, const_cast(offsets));
 
 	ut_ad(dtuple_check_typed(row));
 
@@ -604,7 +604,7 @@
 					this record must be at least
 					s-latched and the latch held
 					as long as the row dtuple is used! */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec,index)
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec,index)
 					or NULL, in which case this function
 					will invoke rec_get_offsets() */
 	const dict_table_t*	col_table,
@@ -657,7 +657,7 @@
 	ulint			type,
 	const dict_index_t*	index,
 	const rec_t*		rec,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	const dict_table_t*	col_table,
 	const dtuple_t*		defaults,
 	const dict_add_v_col_t*	add_v,
@@ -684,8 +684,7 @@
 row_rec_to_index_entry_impl(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets,
-	ulint*			n_ext,
+	const offset_t*		offsets,
 	mem_heap_t*		heap)
 {
 	dtuple_t*	entry;
@@ -703,8 +702,6 @@
 	/* Because this function may be invoked by row0merge.cc
 	on a record whose header is in different format, the check
 	rec_offs_validate(rec, index, offsets) must be avoided here. */
-	ut_ad(n_ext);
-	*n_ext = 0;
 
 	rec_len = rec_offs_n_fields(offsets);
 
@@ -731,7 +728,6 @@
 
 		if (rec_offs_nth_extern(offsets, i)) {
 			dfield_set_ext(dfield);
-			(*n_ext)++;
 		}
 	}
 
@@ -743,18 +739,15 @@
 @param[in]	rec	index record
 @param[in]	index	index
 @param[in]	offsets	rec_get_offsets(rec, index)
-@param[out]	n_ext	number of externally stored columns
 @param[in,out]	heap	memory heap for allocations */
 dtuple_t*
 row_rec_to_index_entry_low(
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets,
-	ulint*			n_ext,
+	const offset_t*		offsets,
 	mem_heap_t*		heap)
 {
-	return row_rec_to_index_entry_impl(
-		rec, index, offsets, n_ext, heap);
+	return row_rec_to_index_entry_impl(rec, index, offsets, heap);
 }
 
 /*******************************************************************//**
@@ -766,9 +759,7 @@
 /*===================*/
 	const rec_t*		rec,	/*!< in: record in the index */
 	const dict_index_t*	index,	/*!< in: index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec) */
-	ulint*			n_ext,	/*!< out: number of externally
-					stored columns */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec) */
 	mem_heap_t*		heap)	/*!< in: memory heap from which
 					the memory needed is allocated */
 {
@@ -788,11 +779,11 @@
 	copy_rec = rec_copy(buf, rec, offsets);
 
 	rec_offs_make_valid(copy_rec, index, true,
-			    const_cast(offsets));
+			    const_cast(offsets));
 	entry = row_rec_to_index_entry_impl(
-		copy_rec, index, offsets, n_ext, heap);
+		copy_rec, index, offsets, heap);
 	rec_offs_make_valid(rec, index, true,
-			    const_cast(offsets));
+			    const_cast(offsets));
 
 	dtuple_set_info_bits(entry,
 			     rec_get_info_bits(rec, rec_offs_comp(offsets)));
@@ -834,8 +825,8 @@
 	ulint		clust_col_prefix_len;
 	ulint		i;
 	mem_heap_t*	tmp_heap	= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(index != NULL);
@@ -930,7 +921,7 @@
 					held as long as the row
 					reference is used! */
 	const dict_index_t*	index,	/*!< in: secondary index */
-	ulint*			offsets)/*!< in: rec_get_offsets(rec, index)
+	offset_t*		offsets)/*!< in: rec_get_offsets(rec, index)
 					or NULL */
 {
 	const dict_index_t*	clust_index;
@@ -942,7 +933,7 @@
 	ulint			clust_col_prefix_len;
 	ulint			i;
 	mem_heap_t*		heap		= NULL;
-	ulint			offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t		offsets_[REC_OFFS_NORMAL_SIZE];
 	rec_offs_init(offsets_);
 
 	ut_ad(!dict_index_is_clust(index));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0sel.cc mariadb-10.3-10.3.22/storage/innobase/row/row0sel.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0sel.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0sel.cc	2020-01-26 18:37:29.000000000 +0000
@@ -171,10 +171,10 @@
 	ulint		n;
 	ulint		i;
 	mem_heap_t*	heap		= NULL;
-	ulint		clust_offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint		sec_offsets_[REC_OFFS_SMALL_SIZE];
-	ulint*		clust_offs	= clust_offsets_;
-	ulint*		sec_offs	= sec_offsets_;
+	offset_t	clust_offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t	sec_offsets_[REC_OFFS_SMALL_SIZE];
+	offset_t*	clust_offs	= clust_offsets_;
+	offset_t*	sec_offs	= sec_offsets_;
 	ibool		is_equal	= TRUE;
 	VCOL_STORAGE*	vcol_storage= 0;
 	byte*		record;
@@ -493,7 +493,7 @@
 	dict_index_t*	index,	/*!< in: record index */
 	const rec_t*	rec,	/*!< in: record in a clustered or non-clustered
 				index; must be protected by a page latch */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	sym_node_t*	column)	/*!< in: first column in a column list, or
 				NULL */
 {
@@ -759,7 +759,7 @@
 	ReadView*	read_view,	/*!< in: read view */
 	dict_index_t*	index,		/*!< in: plan node for table */
 	rec_t*		rec,		/*!< in: record in a clustered index */
-	ulint**		offsets,	/*!< in/out: offsets returned by
+	offset_t**	offsets,	/*!< in/out: offsets returned by
 					rec_get_offsets(rec, plan->index) */
 	mem_heap_t**	offset_heap,	/*!< in/out: memory heap from which
 					the offsets are allocated */
@@ -794,7 +794,7 @@
 	dict_index_t*	clust_index,	/*!< in: clustered index */
 	row_prebuilt_t*	prebuilt,	/*!< in: prebuilt struct */
 	const rec_t*	rec,		/*!< in: record in a clustered index */
-	ulint**		offsets,	/*!< in/out: offsets returned by
+	offset_t**	offsets,	/*!< in/out: offsets returned by
 					rec_get_offsets(rec, clust_index) */
 	mem_heap_t**	offset_heap,	/*!< in/out: memory heap from which
 					the offsets are allocated */
@@ -908,8 +908,8 @@
 	rec_t*		old_vers;
 	dberr_t		err;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	*out_rec = NULL;
@@ -1068,7 +1068,7 @@
 	btr_pcur_t*		pcur,	/*!< in: cursor */
 	const rec_t*		first_rec,/*!< in: record */
 	dict_index_t*		index,	/*!< in: index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	ulint			mode,	/*!< in: lock mode */
 	ulint			type,	/*!< in: LOCK_ORDINARY, LOCK_GAP, or
 					LOC_REC_NOT_GAP */
@@ -1080,8 +1080,8 @@
 	dberr_t		err = DB_SUCCESS;
 	trx_t*		trx = thr_get_trx(thr);
 	buf_block_t*	cur_block = btr_pcur_get_block(pcur);
-	ulint           offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*          my_offsets = const_cast(offsets);
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	my_offsets = const_cast(offsets);
 	rec_t*		rec = const_cast(first_rec);
 	rtr_rec_vector*	match_rec;
 	rtr_rec_vector::iterator end;
@@ -1234,7 +1234,7 @@
 	btr_pcur_t*		pcur,	/*!< in: cursor */
 	const rec_t*		rec,	/*!< in: record */
 	dict_index_t*		index,	/*!< in: index */
-	const ulint*		offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*		offsets,/*!< in: rec_get_offsets(rec, index) */
 	ulint			mode,	/*!< in: lock mode */
 	ulint			type,	/*!< in: LOCK_ORDINARY, LOCK_GAP, or
 					LOC_REC_NOT_GAP */
@@ -1509,8 +1509,8 @@
 	a previous version of the record */
 
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 	offsets = rec_get_offsets(rec, index, offsets, true,
 				  ULINT_UNDEFINED, &heap);
@@ -1593,8 +1593,8 @@
 	to the next non-clustered record */
 	dberr_t		err;
 	mem_heap_t*	heap				= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets				= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets				= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(thr->run_node == node);
@@ -2701,7 +2701,7 @@
 	row_prebuilt_t*		prebuilt,	/*!< in/out: prebuilt */
 	const rec_t*		index_rec,	/*!< in: record */
 	const dict_index_t*	index,		/*!< in: index of the record */
-	const ulint*		offsets)	/*!< in: rec_get_offsets
+	const offset_t*		offsets)	/*!< in: rec_get_offsets
 						(index_rec, index) */
 {
 	const byte*	data;
@@ -2927,7 +2927,7 @@
 	row_prebuilt_t*		prebuilt,
 	const rec_t*		rec,
 	const dict_index_t*	index,
-	const ulint*		offsets,
+	const offset_t*		offsets,
 	ulint			field_no,
 	const mysql_row_templ_t*templ)
 {
@@ -3083,7 +3083,7 @@
 	const dtuple_t*	vrow,
 	bool		rec_clust,
 	const dict_index_t* index,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	DBUG_ENTER("row_sel_store_mysql_rec");
 
@@ -3214,7 +3214,7 @@
 	dict_index_t*	clust_index,	/*!< in: clustered index */
 	row_prebuilt_t*	prebuilt,	/*!< in: prebuilt struct */
 	const rec_t*	rec,		/*!< in: record in a clustered index */
-	ulint**		offsets,	/*!< in/out: offsets returned by
+	offset_t**	offsets,	/*!< in/out: offsets returned by
 					rec_get_offsets(rec, clust_index) */
 	mem_heap_t**	offset_heap,	/*!< in/out: memory heap from which
 					the offsets are allocated */
@@ -3252,7 +3252,7 @@
 
 	dberr_t operator()(row_prebuilt_t *prebuilt, dict_index_t *sec_index,
 			const rec_t *rec, que_thr_t *thr, const rec_t **out_rec,
-			ulint **offsets, mem_heap_t **offset_heap,
+			offset_t **offsets, mem_heap_t **offset_heap,
 			dtuple_t **vrow, mtr_t *mtr);
 };
 
@@ -3275,7 +3275,7 @@
 				it, NULL if the old version did not exist
 				in the read view, i.e., it was a fresh
 				inserted version */
-	ulint**		offsets,/*!< in: offsets returned by
+	offset_t**	offsets,/*!< in: offsets returned by
 				rec_get_offsets(rec, sec_index);
 				out: offsets returned by
 				rec_get_offsets(out_rec, clust_index) */
@@ -3856,7 +3856,7 @@
 /*==================================*/
 	const rec_t**	out_rec,/*!< out: record if found */
 	row_prebuilt_t*	prebuilt,/*!< in: prebuilt struct */
-	ulint**		offsets,/*!< in/out: for rec_get_offsets(*out_rec) */
+	offset_t**	offsets,/*!< in/out: for rec_get_offsets(*out_rec) */
 	mem_heap_t**	heap,	/*!< in/out: heap for rec_get_offsets() */
 	mtr_t*		mtr)	/*!< in: started mtr */
 {
@@ -3930,7 +3930,7 @@
 	row_prebuilt_t*		prebuilt,	/*!< in/out: prebuilt struct
 						for the table handle */
 	const rec_t*		rec,		/*!< in: InnoDB record */
-	const ulint*		offsets)	/*!< in: rec_get_offsets() */
+	const offset_t*		offsets)	/*!< in: rec_get_offsets() */
 {
 	ICP_RESULT	result;
 	ulint		i;
@@ -4018,8 +4018,8 @@
 	dtuple_t**		vrow,
 	mem_heap_t*		heap)
 {
-	ulint           offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets	= offsets_;
+	offset_t offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t* offsets	= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(!(*vrow));
@@ -4073,7 +4073,7 @@
 	const dict_col_t*	col,
 	const ulint		field_no,
 	const rec_t*		rec,
-	const ulint*		offsets)
+	const offset_t*		offsets)
 {
 	const ulint cset = dtype_get_charset_coll(col->prtype);
 	const CHARSET_INFO* cs = all_charsets[cset];
@@ -4100,7 +4100,7 @@
 bool row_search_with_covering_prefix(
 	row_prebuilt_t*	prebuilt,
 	const rec_t*	rec,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	const dict_index_t*	index = prebuilt->index;
 	ut_ad(!dict_index_is_clust(index));
@@ -4230,8 +4230,8 @@
 	ibool		same_user_rec;
 	mtr_t		mtr;
 	mem_heap_t*	heap				= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets				= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets				= offsets_;
 	ibool		table_lock_waited		= FALSE;
 	byte*		next_buf			= 0;
 	bool		spatial_search			= false;
@@ -4272,7 +4272,7 @@
 		    || prebuilt->m_read_virtual_key);
 
 	/* Reset the new record lock info if srv_locks_unsafe_for_binlog
-	is set or session is using a READ COMMITED isolation level. Then
+	is set or session is using a READ COMMITTED isolation level. Then
 	we are able to remove the record locks set here on an individual
 	row. */
 	prebuilt->new_rec_locks = 0;
@@ -4979,7 +4979,7 @@
 		existence with LOCK_REC_NOT_GAP. */
 
 		/* If innodb_locks_unsafe_for_binlog option is used
-		or this session is using a READ COMMITED isolation
+		or this session is using a READ COMMITTED isolation
 		level we lock only the record, i.e., next-key locking is
 		not used. */
 
@@ -5931,8 +5931,8 @@
 	const byte*	data;
 	ib_uint64_t	value;
 	mem_heap_t*	heap = NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets	= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets	= offsets_;
 
 	rec_offs_init(offsets_);
 	ut_ad(page_rec_is_leaf(rec));
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0trunc.cc mariadb-10.3-10.3.22/storage/innobase/row/row0trunc.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0trunc.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0trunc.cc	2020-01-26 18:37:29.000000000 +0000
@@ -440,70 +440,6 @@
 	return(err);
 }
 
-/** Callback to drop indexes during TRUNCATE */
-class DropIndex : public Callback {
-
-public:
-	/**
-	Constructor
-
-	@param[in,out]	table	Table to truncate
-	@param[in]	noredo	whether to disable redo logging */
-	DropIndex(dict_table_t* table, bool noredo)
-		:
-		Callback(table->id, noredo),
-		m_table(table)
-	{
-		/* No op */
-	}
-
-	/**
-	@param mtr	mini-transaction covering the read
-	@param pcur	persistent cursor used for reading
-	@return DB_SUCCESS or error code */
-	dberr_t operator()(mtr_t* mtr, btr_pcur_t* pcur) const;
-
-private:
-	/** Table to be truncated */
-	dict_table_t*		m_table;
-};
-
-/** Callback to create the indexes during TRUNCATE */
-class CreateIndex : public Callback {
-
-public:
-	/**
-	Constructor
-
-	@param[in,out]	table	Table to truncate
-	@param[in]	noredo	whether to disable redo logging */
-	CreateIndex(dict_table_t* table, bool noredo)
-		:
-		Callback(table->id, noredo),
-		m_table(table)
-	{
-		/* No op */
-	}
-
-	/**
-	Create the new index and update the root page number in the
-	SysIndex table.
-
-	@param mtr	mini-transaction covering the read
-	@param pcur	persistent cursor used for reading
-	@return DB_SUCCESS or error code */
-	dberr_t operator()(mtr_t* mtr, btr_pcur_t* pcur) const;
-
-private:
-	// Disably copying
-	CreateIndex(const CreateIndex&);
-	CreateIndex& operator=(const CreateIndex&);
-
-private:
-	/** Table to be truncated */
-	dict_table_t*		m_table;
-};
-
 /** Check for presence of table-id in SYS_XXXX tables. */
 class TableLocator : public Callback {
 
@@ -543,161 +479,6 @@
 };
 
 /**
-Drop an index in the table.
-
-@param mtr	mini-transaction covering the read
-@param pcur	persistent cursor used for reading
-@return DB_SUCCESS or error code */
-dberr_t
-DropIndex::operator()(mtr_t* mtr, btr_pcur_t* pcur) const
-{
-	rec_t*	rec = btr_pcur_get_rec(pcur);
-
-	bool	freed = dict_drop_index_tree(rec, pcur, mtr);
-
-#ifdef UNIV_DEBUG
-	{
-		ulint		len;
-		const byte*	field;
-		ulint		index_type;
-
-		field = rec_get_nth_field_old(
-			btr_pcur_get_rec(pcur), DICT_FLD__SYS_INDEXES__TYPE,
-			&len);
-		ut_ad(len == 4);
-
-		index_type = mach_read_from_4(field);
-
-		if (index_type & DICT_CLUSTERED) {
-			/* Clustered index */
-			DBUG_EXECUTE_IF("ib_trunc_crash_on_drop_of_clust_index",
-					log_buffer_flush_to_disk();
-					os_thread_sleep(2000000);
-					DBUG_SUICIDE(););
-		} else if (index_type & DICT_UNIQUE) {
-			/* Unique index */
-			DBUG_EXECUTE_IF("ib_trunc_crash_on_drop_of_uniq_index",
-					log_buffer_flush_to_disk();
-					os_thread_sleep(2000000);
-					DBUG_SUICIDE(););
-		} else if (index_type == 0) {
-			/* Secondary index */
-			DBUG_EXECUTE_IF("ib_trunc_crash_on_drop_of_sec_index",
-					log_buffer_flush_to_disk();
-					os_thread_sleep(2000000);
-					DBUG_SUICIDE(););
-		}
-	}
-#endif /* UNIV_DEBUG */
-
-	DBUG_EXECUTE_IF("ib_err_trunc_drop_index", return DB_ERROR;);
-
-	if (freed) {
-
-		/* We will need to commit and restart the
-		mini-transaction in order to avoid deadlocks.
-		The dict_drop_index_tree() call has freed
-		a page in this mini-transaction, and the rest
-		of this loop could latch another index page.*/
-		const mtr_log_t log_mode = mtr->get_log_mode();
-		mtr_commit(mtr);
-
-		mtr_start(mtr);
-		mtr->set_log_mode(log_mode);
-
-		btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr);
-	} else {
-		if (!m_table->space) {
-			return DB_ERROR;
-		}
-	}
-
-	return(DB_SUCCESS);
-}
-
-/**
-Create the new index and update the root page number in the
-SysIndex table.
-
-@param mtr	mini-transaction covering the read
-@param pcur	persistent cursor used for reading
-@return DB_SUCCESS or error code */
-dberr_t
-CreateIndex::operator()(mtr_t* mtr, btr_pcur_t* pcur) const
-{
-	ulint	root_page_no;
-
-	root_page_no = dict_recreate_index_tree(m_table, pcur, mtr);
-
-#ifdef UNIV_DEBUG
-	{
-		ulint		len;
-		const byte*	field;
-		ulint		index_type;
-
-		field = rec_get_nth_field_old(
-			btr_pcur_get_rec(pcur), DICT_FLD__SYS_INDEXES__TYPE,
-			&len);
-		ut_ad(len == 4);
-
-		index_type = mach_read_from_4(field);
-
-		if (index_type & DICT_CLUSTERED) {
-			/* Clustered index */
-			DBUG_EXECUTE_IF(
-				"ib_trunc_crash_on_create_of_clust_index",
-				log_buffer_flush_to_disk();
-				os_thread_sleep(2000000);
-				DBUG_SUICIDE(););
-		} else if (index_type & DICT_UNIQUE) {
-			/* Unique index */
-			DBUG_EXECUTE_IF(
-				"ib_trunc_crash_on_create_of_uniq_index",
-				log_buffer_flush_to_disk();
-				os_thread_sleep(2000000);
-				DBUG_SUICIDE(););
-		} else if (index_type == 0) {
-			/* Secondary index */
-			DBUG_EXECUTE_IF(
-				"ib_trunc_crash_on_create_of_sec_index",
-				log_buffer_flush_to_disk();
-				os_thread_sleep(2000000);
-				DBUG_SUICIDE(););
-		}
-	}
-#endif /* UNIV_DEBUG */
-
-	DBUG_EXECUTE_IF("ib_err_trunc_create_index", return DB_ERROR;);
-
-	if (root_page_no != FIL_NULL) {
-
-		rec_t*	rec = btr_pcur_get_rec(pcur);
-
-		page_rec_write_field(
-			rec, DICT_FLD__SYS_INDEXES__PAGE_NO,
-			root_page_no, mtr);
-
-		/* We will need to commit and restart the
-		mini-transaction in order to avoid deadlocks.
-		The dict_create_index_tree() call has allocated
-		a page in this mini-transaction, and the rest of
-		this loop could latch another index page. */
-		mtr_commit(mtr);
-
-		mtr_start(mtr);
-
-		btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, mtr);
-
-	} else {
-		if (!m_table->space) {
-			return(DB_ERROR);
-		}
-	}
-
-	return(DB_SUCCESS);
-}
-
-/**
 Update system table to reflect new table id.
 @param old_table_id		old table id
 @param new_table_id		new table id
@@ -1189,7 +970,7 @@
 
 	if (err == DB_SUCCESS && s_tables.size() > 0) {
 
-		log_make_checkpoint_at(LSN_MAX);
+		log_make_checkpoint();
 	}
 
 	for (ulint i = 0; i < s_tables.size(); ++i) {
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0uins.cc mariadb-10.3-10.3.22/storage/innobase/row/row0uins.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0uins.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0uins.cc	2020-01-26 18:37:29.000000000 +0000
@@ -95,7 +95,7 @@
 		ut_ad(node->trx->dict_operation_lock_mode
 		      != RW_X_LATCH);
 		ut_ad(node->table->id != DICT_INDEXES_ID);
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
+		mtr_s_lock_index(index, &mtr);
 	}
 
 	success = btr_pcur_restore_position(
@@ -115,7 +115,7 @@
 	if (online && dict_index_is_online_ddl(index)) {
 		const rec_t*	rec	= btr_cur_get_rec(btr_cur);
 		mem_heap_t*	heap	= NULL;
-		const ulint*	offsets	= rec_get_offsets(
+		const offset_t*	offsets	= rec_get_offsets(
 			rec, index, NULL, true, ULINT_UNDEFINED, &heap);
 		row_log_table_delete(rec, index, offsets, NULL);
 		mem_heap_free(heap);
@@ -128,7 +128,8 @@
 		ut_ad(node->rec_type == TRX_UNDO_INSERT_REC);
 
 		dict_drop_index_tree(
-			btr_pcur_get_rec(&node->pcur), &(node->pcur), &mtr);
+			btr_pcur_get_rec(&node->pcur), &node->pcur, node->trx,
+			&mtr);
 
 		mtr.commit();
 
@@ -267,20 +268,18 @@
 	que_thr_t*	thr)	/*!< in: query thread */
 {
 	btr_pcur_t		pcur;
-	btr_cur_t*		btr_cur;
 	dberr_t			err	= DB_SUCCESS;
 	mtr_t			mtr;
-	enum row_search_result	search_result;
 	const bool		modify_leaf = mode == BTR_MODIFY_LEAF;
 
 	row_mtr_start(&mtr, index, !modify_leaf);
 
 	if (modify_leaf) {
 		mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED;
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
+		mtr_s_lock_index(index, &mtr);
 	} else {
 		ut_ad(mode == (BTR_MODIFY_TREE | BTR_LATCH_FOR_DELETE));
-		mtr_sx_lock(dict_index_get_lock(index), &mtr);
+		mtr_sx_lock_index(index, &mtr);
 	}
 
 	if (row_log_online_op_try(index, entry, 0)) {
@@ -295,12 +294,15 @@
 		mode |= BTR_RTREE_UNDO_INS;
 	}
 
-	search_result = row_search_index_entry(index, entry, mode,
-					       &pcur, &mtr);
-
-	switch (search_result) {
+	switch (row_search_index_entry(index, entry, mode, &pcur, &mtr)) {
+	case ROW_BUFFERED:
+	case ROW_NOT_DELETED_REF:
+		/* These are invalid outcomes, because the mode passed
+		to row_search_index_entry() did not include any of the
+		flags BTR_INSERT, BTR_DELETE, or BTR_DELETE_MARK. */
+		ut_error;
 	case ROW_NOT_FOUND:
-		goto func_exit;
+		break;
 	case ROW_FOUND:
 		if (dict_index_is_spatial(index)
 		    && rec_get_deleted_flag(
@@ -310,31 +312,22 @@
 				<< " is deleted marked on insert rollback.";
 			ut_ad(0);
 		}
-		break;
-
-	case ROW_BUFFERED:
-	case ROW_NOT_DELETED_REF:
-		/* These are invalid outcomes, because the mode passed
-		to row_search_index_entry() did not include any of the
-		flags BTR_INSERT, BTR_DELETE, or BTR_DELETE_MARK. */
-		ut_error;
-	}
 
-	btr_cur = btr_pcur_get_btr_cur(&pcur);
+		btr_cur_t* btr_cur = btr_pcur_get_btr_cur(&pcur);
 
-	if (modify_leaf) {
-		err = btr_cur_optimistic_delete(btr_cur, 0, &mtr)
-			? DB_SUCCESS : DB_FAIL;
-	} else {
-		/* Passing rollback=false here, because we are
-		deleting a secondary index record: the distinction
-		only matters when deleting a record that contains
-		externally stored columns. */
-		ut_ad(!dict_index_is_clust(index));
-		btr_cur_pessimistic_delete(&err, FALSE, btr_cur, 0,
-					   false, &mtr);
+		if (modify_leaf) {
+			err = btr_cur_optimistic_delete(btr_cur, 0, &mtr)
+				? DB_SUCCESS : DB_FAIL;
+		} else {
+			/* Passing rollback=false here, because we are
+			deleting a secondary index record: the distinction
+			only matters when deleting a record that contains
+			externally stored columns. */
+			btr_cur_pessimistic_delete(&err, FALSE, btr_cur, 0,
+						   false, &mtr);
+		}
 	}
-func_exit:
+
 	btr_pcur_close(&pcur);
 func_exit_no_pcur:
 	mtr_commit(&mtr);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0umod.cc mariadb-10.3-10.3.22/storage/innobase/row/row0umod.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0umod.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0umod.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, 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
@@ -76,7 +76,7 @@
 row_undo_mod_clust_low(
 /*===================*/
 	undo_node_t*	node,	/*!< in: row undo node */
-	ulint**		offsets,/*!< out: rec_get_offsets() on the record */
+	offset_t**	offsets,/*!< out: rec_get_offsets() on the record */
 	mem_heap_t**	offsets_heap,
 				/*!< in/out: memory heap that can be emptied */
 	mem_heap_t*	heap,	/*!< in/out: memory heap */
@@ -159,11 +159,11 @@
 	if (!trx_id_offset) {
 		/* Reserve enough offsets for the PRIMARY KEY and 2 columns
 		so that we can access DB_TRX_ID, DB_ROLL_PTR. */
-		ulint	offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
+		offset_t offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
 		rec_offs_init(offsets_);
 		mem_heap_t* heap = NULL;
 		const ulint trx_id_pos = index->n_uniq ? index->n_uniq : 1;
-		ulint* offsets = rec_get_offsets(rec, index, offsets_, true,
+		offset_t* offsets = rec_get_offsets(rec, index, offsets_, true,
 						 trx_id_pos + 1, &heap);
 		ut_ad(!heap);
 		ulint len;
@@ -186,8 +186,9 @@
 
 	btr_cur_t* btr_cur = btr_pcur_get_btr_cur(&node->pcur);
 	ut_ad(btr_cur->index->is_primary());
+	DEBUG_SYNC_C("rollback_purge_clust");
 
-	mtr_s_lock(&purge_sys.latch, mtr);
+	mtr->s_lock(&purge_sys.latch, __FILE__, __LINE__);
 
 	if (!purge_sys.view.changes_visible(node->new_trx_id,
 					    node->table->name)) {
@@ -238,12 +239,12 @@
 	online = dict_index_is_online_ddl(index);
 	if (online) {
 		ut_ad(node->trx->dict_operation_lock_mode != RW_X_LATCH);
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
+		mtr_s_lock_index(index, &mtr);
 	}
 
 	mem_heap_t*	heap		= mem_heap_create(1024);
 	mem_heap_t*	offsets_heap	= NULL;
-	ulint*		offsets		= NULL;
+	offset_t*	offsets		= NULL;
 	const dtuple_t*	rebuilt_old_pk;
 	byte		sys[DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN];
 
@@ -319,6 +320,7 @@
 	      == node->new_trx_id);
 
 	btr_pcur_commit_specify_mtr(pcur, &mtr);
+	DEBUG_SYNC_C("rollback_undo_pk");
 
 	if (err != DB_SUCCESS) {
 		goto func_exit;
@@ -393,7 +395,7 @@
 			goto mtr_commit_exit;
 		}
 		rec_t* rec = btr_pcur_get_rec(pcur);
-		mtr_s_lock(&purge_sys.latch, &mtr);
+		mtr.s_lock(&purge_sys.latch, __FILE__, __LINE__);
 		if (!purge_sys.view.changes_visible(node->new_trx_id,
 						   node->table->name)) {
 			goto mtr_commit_exit;
@@ -403,7 +405,7 @@
 		ut_ad(index->n_uniq <= MAX_REF_PARTS);
 		/* Reserve enough offsets for the PRIMARY KEY and 2 columns
 		so that we can access DB_TRX_ID, DB_ROLL_PTR. */
-		ulint	offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
+		offset_t offsets_[REC_OFFS_HEADER_SIZE + MAX_REF_PARTS + 2];
 		rec_offs_init(offsets_);
 		offsets = rec_get_offsets(
 			rec, index, offsets_, true, trx_id_pos + 2, &heap);
@@ -476,10 +478,10 @@
 		is protected by index->lock. */
 		if (modify_leaf) {
 			mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED;
-			mtr_s_lock(dict_index_get_lock(index), &mtr);
+			mtr_s_lock_index(index, &mtr);
 		} else {
 			ut_ad(mode == (BTR_MODIFY_TREE | BTR_LATCH_FOR_DELETE));
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 		}
 
 		if (row_log_online_op_try(index, entry, 0)) {
@@ -672,10 +674,10 @@
 		is protected by index->lock. */
 		if (mode == BTR_MODIFY_LEAF) {
 			mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED;
-			mtr_s_lock(dict_index_get_lock(index), &mtr);
+			mtr_s_lock_index(index, &mtr);
 		} else {
 			ut_ad(mode == BTR_MODIFY_TREE);
-			mtr_sx_lock(dict_index_get_lock(index), &mtr);
+			mtr_sx_lock_index(index, &mtr);
 		}
 
 		if (row_log_online_op_try(index, entry, trx->id)) {
@@ -696,7 +698,7 @@
 	switch (search_result) {
 		mem_heap_t*	heap;
 		mem_heap_t*	offsets_heap;
-		ulint*		offsets;
+		offset_t*	offsets;
 	case ROW_BUFFERED:
 	case ROW_NOT_DELETED_REF:
 		/* These are invalid outcomes, because the mode passed
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0undo.cc mariadb-10.3-10.3.22/storage/innobase/row/row0undo.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0undo.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0undo.cc	2020-01-26 18:37:29.000000000 +0000
@@ -168,8 +168,8 @@
 	row_ext_t**	ext;
 	const rec_t*	rec;
 	mem_heap_t*	heap		= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets		= offsets_;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets		= offsets_;
 	rec_offs_init(offsets_);
 
 	ut_ad(!node->table->skip_alter_undo);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0upd.cc mariadb-10.3-10.3.22/storage/innobase/row/row0upd.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0upd.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0upd.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2019, MariaDB Corporation.
+Copyright (c) 2015, 2020, 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
@@ -214,7 +214,7 @@
 				cursor position is lost in this function! */
 	dict_table_t*	table,	/*!< in: table in question */
 	dict_index_t*	index,	/*!< in: index of the cursor */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(pcur.rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(pcur.rec, index) */
 	que_thr_t*	thr,	/*!< in: query thread */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
@@ -223,7 +223,6 @@
 	dtuple_t*	entry;
 	trx_t*		trx;
 	const rec_t*	rec;
-	ulint		n_ext;
 	dberr_t		err;
 	ibool		got_s_lock	= FALSE;
 
@@ -240,7 +239,7 @@
 
 	heap = mem_heap_create(500);
 
-	entry = row_rec_to_index_entry(rec, index, offsets, &n_ext, heap);
+	entry = row_rec_to_index_entry(rec, index, offsets, heap);
 
 	mtr_commit(mtr);
 
@@ -332,7 +331,7 @@
 				cursor position is lost in this function! */
 	dict_table_t*	table,	/*!< in: table in question */
 	dict_index_t*	index,	/*!< in: index of the cursor */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(pcur.rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(pcur.rec, index) */
 	que_thr_t*	thr,	/*!< in: query thread */
 	mtr_t*		mtr)	/*!< in: mtr */
 {
@@ -341,7 +340,6 @@
 	dtuple_t*	entry;
 	trx_t*		trx;
 	const rec_t*	rec;
-	ulint		n_ext;
 	dberr_t		err;
 	ibool		got_s_lock	= FALSE;
 	ibool		opened     	= FALSE;
@@ -359,8 +357,7 @@
 
 	heap = mem_heap_create(500);
 
-	entry = row_rec_to_index_entry(rec, index, offsets,
-				       &n_ext, heap);
+	entry = row_rec_to_index_entry(rec, index, offsets, heap);
 
 	mtr_commit(mtr);
 
@@ -473,7 +470,7 @@
 /*===============================*/
 	rec_t*		rec,	/*!< in/out: record */
 	page_zip_des_t*	page_zip,/*!< in/out: compressed page, or NULL */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	ulint		pos,	/*!< in: TRX_ID position in rec */
 	trx_id_t	trx_id,	/*!< in: transaction id */
 	roll_ptr_t	roll_ptr)/*!< in: roll ptr of the undo log record */
@@ -537,7 +534,7 @@
 row_upd_changes_field_size_or_external(
 /*===================================*/
 	dict_index_t*	index,	/*!< in: index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const upd_t*	update)	/*!< in: update vector */
 {
 	const upd_field_t*	upd_field;
@@ -662,7 +659,7 @@
 /*=================*/
 	rec_t*		rec,	/*!< in/out: record where replaced */
 	dict_index_t*	index,	/*!< in: the index the record belongs to */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	const upd_t*	update,	/*!< in: update vector */
 	page_zip_des_t*	page_zip)/*!< in: compressed page with enough space
 				available, or NULL */
@@ -961,7 +958,7 @@
 /*====================================*/
 	const rec_t*	rec,	/*!< in: secondary index record */
 	dict_index_t*	index,	/*!< in: index */
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec, index) */
 	const dtuple_t*	entry,	/*!< in: entry to insert */
 	mem_heap_t*	heap)	/*!< in: memory heap from which allocated */
 {
@@ -1042,7 +1039,7 @@
 	dict_index_t*	index,
 	const dtuple_t*	entry,
 	const rec_t*	rec,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	bool		no_sys,
 	trx_t*		trx,
 	mem_heap_t*	heap,
@@ -1053,7 +1050,7 @@
 	upd_t*		update;
 	ulint		n_diff;
 	ulint		trx_id_pos;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
 	const ulint	n_v_fld = dtuple_get_n_v_fields(entry);
 	rec_offs_init(offsets_);
 
@@ -2072,7 +2069,7 @@
 row_upd_copy_columns(
 /*=================*/
 	rec_t*		rec,	/*!< in: record in a clustered index */
-	const ulint*	offsets,/*!< in: array returned by rec_get_offsets() */
+	const offset_t*	offsets,/*!< in: array returned by rec_get_offsets() */
 	const dict_index_t*	index, /*!< in: index of rec */
 	sym_node_t*	column)	/*!< in: first column in a column list, or
 				NULL */
@@ -2224,8 +2221,8 @@
 	rec_t*		rec;
 	mem_heap_t*	heap		= NULL;
 	row_ext_t**	ext;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	const ulint*	offsets;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	const offset_t*	offsets;
 	rec_offs_init(offsets_);
 
 	ut_ad(node->pcur->latch_mode != BTR_NO_LATCHES);
@@ -2341,7 +2338,7 @@
 		or was being created online, but not committed yet. It
 		is protected by index->lock. */
 
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
+		mtr_s_lock_index(index, &mtr);
 
 		switch (dict_index_get_online_status(index)) {
 		case ONLINE_INDEX_COMPLETE:
@@ -2464,7 +2461,7 @@
 			    && wsrep_must_process_fk(node, trx)
 			    && !wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
 
-				ulint*	offsets = rec_get_offsets(
+				offset_t* offsets = rec_get_offsets(
 					rec, index, NULL, true,
 					ULINT_UNDEFINED, &heap);
 
@@ -2477,17 +2474,27 @@
 				case DB_NO_REFERENCED_ROW:
 					err = DB_SUCCESS;
 					break;
+				case DB_LOCK_WAIT:
+					if (wsrep_debug) {
+						ib::warn() << "WSREP: sec index FK lock wait"
+							   << " index " << index->name
+							   << " table " << index->table->name
+							   << " query " << wsrep_thd_query(trx->mysql_thd);
+					}
+					break;
 				case DB_DEADLOCK:
 					if (wsrep_debug) {
 						ib::warn() << "WSREP: sec index FK check fail for deadlock"
 							   << " index " << index->name
-							   << " table " << index->table->name;
+							   << " table " << index->table->name
+							   << " query " << wsrep_thd_query(trx->mysql_thd);
 					}
 					break;
 				default:
 					ib::error() << "WSREP: referenced FK check fail: " << ut_strerr(err)
 						    << " index " << index->name
-						    << " table " << index->table->name;
+						    << " table " << index->table->name
+						    << " query " << wsrep_thd_query(trx->mysql_thd);
 
 					break;
 				}
@@ -2499,7 +2506,7 @@
 
 		if (referenced) {
 
-			ulint*	offsets;
+			offset_t* offsets;
 
 			offsets = rec_get_offsets(
 				rec, index, NULL, true, ULINT_UNDEFINED,
@@ -2529,7 +2536,7 @@
 	ut_a(entry);
 
 	/* Insert new index entry */
-	err = row_ins_sec_index_entry(index, entry, thr, false);
+	err = row_ins_sec_index_entry(index, entry, thr, !node->is_delete);
 
 func_exit:
 	mem_heap_free(heap);
@@ -2581,7 +2588,7 @@
 /*=====================================*/
 	const rec_t*	rec,	/*!< in: old record, or NULL */
 #ifdef UNIV_DEBUG
-	const ulint*	offsets,/*!< in: rec_get_offsets(rec), or NULL */
+	const offset_t*	offsets,/*!< in: rec_get_offsets(rec), or NULL */
 #endif /* UNIV_DEBUG */
 	dtuple_t*	entry,	/*!< in/out: updated entry to be
 				inserted into the clustered index */
@@ -2682,10 +2689,13 @@
 	dtuple_t*	entry;
 	dberr_t		err;
 	rec_t*		rec;
-	ulint*		offsets			= NULL;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets			= offsets_;
 
 	ut_ad(dict_index_is_clust(index));
 
+	rec_offs_init(offsets_);
+
 	trx = thr_get_trx(thr);
 	table = node->table;
 	pcur = node->pcur;
@@ -2714,7 +2724,7 @@
 		we update the primary key.  Delete-mark the old record
 		in the clustered index and prepare to insert a new entry. */
 		rec = btr_cur_get_rec(btr_cur);
-		offsets = rec_get_offsets(rec, index, NULL, true,
+		offsets = rec_get_offsets(rec, index, offsets, true,
 					  ULINT_UNDEFINED, &heap);
 		ut_ad(page_rec_is_user_rec(rec));
 
@@ -2799,9 +2809,9 @@
 
 	mtr_commit(mtr);
 
-	err = row_ins_clust_index_entry(
-		index, entry, thr,
-		node->upd_ext ? node->upd_ext->n_ext : 0, false);
+	err = row_ins_clust_index_entry(index, entry, thr, node->upd_ext
+					? node->upd_ext->n_ext
+					: dtuple_get_n_ext(entry));
 	node->state = UPD_NODE_INSERT_CLUSTERED;
 
 	mem_heap_free(heap);
@@ -2821,7 +2831,7 @@
 	ulint		flags,  /*!< in: undo logging and locking flags */
 	upd_node_t*	node,	/*!< in: row update node */
 	dict_index_t*	index,	/*!< in: clustered index */
-	ulint*		offsets,/*!< in: rec_get_offsets() on node->pcur */
+	offset_t*	offsets,/*!< in: rec_get_offsets() on node->pcur */
 	mem_heap_t**	offsets_heap,
 				/*!< in/out: memory heap, can be emptied */
 	que_thr_t*	thr,	/*!< in: query thread */
@@ -2952,7 +2962,7 @@
 /*=======================*/
 	upd_node_t*	node,	/*!< in: row update node */
 	dict_index_t*	index,	/*!< in: clustered index */
-	ulint*		offsets,/*!< in/out: rec_get_offsets() for the
+	offset_t*	offsets,/*!< in/out: rec_get_offsets() for the
 				record under the cursor */
 	que_thr_t*	thr,	/*!< in: query thread */
 	ibool		referenced,
@@ -3047,8 +3057,8 @@
 	mtr_t		mtr;
 	rec_t*		rec;
 	mem_heap_t*	heap	= NULL;
-	ulint		offsets_[REC_OFFS_NORMAL_SIZE];
-	ulint*		offsets;
+	offset_t	offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	offsets;
 	ibool		referenced;
 	ulint		flags;
 	trx_t*		trx = thr_get_trx(thr);
@@ -3099,7 +3109,7 @@
 	if (dict_index_is_online_ddl(index)) {
 		ut_ad(node->table->id != DICT_INDEXES_ID);
 		mode = BTR_MODIFY_LEAF | BTR_ALREADY_S_LATCHED;
-		mtr_s_lock(dict_index_get_lock(index), &mtr);
+		mtr_s_lock_index(index, &mtr);
 	} else {
 		mode = BTR_MODIFY_LEAF;
 	}
@@ -3124,7 +3134,7 @@
 		ut_ad(!dict_index_is_online_ddl(index));
 
 		dict_drop_index_tree(
-			btr_pcur_get_rec(pcur), pcur, &mtr);
+			btr_pcur_get_rec(pcur), pcur, trx, &mtr);
 
 		mtr.commit();
 
@@ -3191,9 +3201,8 @@
 		row_upd_eval_new_vals(node->update);
 	}
 
-	if (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE) {
+	if (!node->is_delete && node->cmpl_info & UPD_NODE_NO_ORD_CHANGE) {
 
-		node->index = NULL;
 		err = row_upd_clust_rec(
 			flags, node, index, offsets, &heap, thr, &mtr);
 		goto exit_func;
@@ -3237,7 +3246,10 @@
 			goto exit_func;
 		}
 
-		node->state = UPD_NODE_UPDATE_SOME_SEC;
+		ut_ad(node->is_delete != PLAIN_DELETE);
+		node->state = node->is_delete ?
+			UPD_NODE_UPDATE_ALL_SEC :
+			UPD_NODE_UPDATE_SOME_SEC;
 	}
 
 	node->index = dict_table_get_next_index(index);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/row/row0vers.cc mariadb-10.3-10.3.22/storage/innobase/row/row0vers.cc
--- mariadb-10.3-10.3.18/storage/innobase/row/row0vers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/row/row0vers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 2017, 2020, 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
@@ -87,17 +87,20 @@
 	dict_index_t*	clust_index,
 	const rec_t*	rec,
 	dict_index_t*	index,
-	const ulint*	offsets,
+	const offset_t*	offsets,
 	mtr_t*		mtr)
 {
 	trx_id_t	trx_id;
 	rec_t*		prev_version = NULL;
-	ulint*		clust_offsets;
+	offset_t	clust_offsets_[REC_OFFS_NORMAL_SIZE];
+	offset_t*	clust_offsets = clust_offsets_;
 	mem_heap_t*	heap;
 	dtuple_t*	ientry = NULL;
 	mem_heap_t*	v_heap = NULL;
 	dtuple_t*	cur_vrow = NULL;
 
+	rec_offs_init(clust_offsets_);
+
 	DBUG_ENTER("row_vers_impl_x_locked_low");
 
 	ut_ad(rec_offs_validate(rec, index, offsets));
@@ -112,8 +115,8 @@
 
 	heap = mem_heap_create(1024);
 
-	clust_offsets = rec_get_offsets(
-		clust_rec, clust_index, NULL, true, ULINT_UNDEFINED, &heap);
+	clust_offsets = rec_get_offsets(clust_rec, clust_index, clust_offsets,
+					true, ULINT_UNDEFINED, &heap);
 
 	trx_id = row_get_rec_trx_id(clust_rec, clust_index, clust_offsets);
 	if (trx_id == 0) {
@@ -150,15 +153,13 @@
 	const ulint rec_del = rec_get_deleted_flag(rec, comp);
 
 	if (dict_index_has_virtual(index)) {
-		ulint	n_ext;
 		ulint	est_size = DTUPLE_EST_ALLOC(index->n_fields);
 
 		/* Allocate the dtuple for virtual columns extracted from undo
 		log with its own heap, so to avoid it being freed as we
 		iterating in the version loop below. */
 		v_heap = mem_heap_create(est_size);
-		ientry = row_rec_to_index_entry(
-			rec, index, offsets, &n_ext, v_heap);
+		ientry = row_rec_to_index_entry(rec, index, offsets, v_heap);
 	}
 
 	/* We look up if some earlier version, which was modified by
@@ -203,7 +204,7 @@
 		ut_ad(committed || prev_version
 		      || !rec_get_deleted_flag(version, comp));
 
-		/* Free version and clust_offsets. */
+		/* Free version. */
 		mem_heap_free(old_heap);
 
 		if (committed) {
@@ -238,7 +239,7 @@
 		}
 
 		clust_offsets = rec_get_offsets(
-			prev_version, clust_index, NULL, true,
+			prev_version, clust_index, clust_offsets, true,
 			ULINT_UNDEFINED, &heap);
 
 		vers_del = rec_get_deleted_flag(prev_version, comp);
@@ -387,7 +388,7 @@
 	trx_t*		caller_trx,
 	const rec_t*	rec,
 	dict_index_t*	index,
-	const ulint*	offsets)
+	const offset_t*	offsets)
 {
 	mtr_t		mtr;
 	trx_t*		trx;
@@ -464,6 +465,7 @@
 		vcol_info->set_used();
 		maria_table = vcol_info->table();
 	}
+	DEBUG_SYNC(current_thd, "ib_clust_v_col_before_row_allocated");
 
 	innobase_allocate_row_for_vcol(thd, index,
 				       &local_heap,
@@ -518,7 +520,7 @@
 	bool			in_purge,
 	const rec_t*		rec,
 	dict_index_t*		clust_index,
-	ulint*			clust_offsets,
+	offset_t*		clust_offsets,
 	dict_index_t*		index,
 	roll_ptr_t		roll_ptr,
 	trx_id_t		trx_id,
@@ -634,7 +636,7 @@
 	const rec_t*	rec,
 	const dtuple_t* icentry,
 	dict_index_t*	clust_index,
-	ulint*		clust_offsets,
+	offset_t*	clust_offsets,
 	dict_index_t*	index,
 	const dtuple_t* ientry,
 	roll_ptr_t	roll_ptr,
@@ -809,7 +811,7 @@
 	bool			in_purge,
 	const rec_t*		rec,
 	dict_index_t*		clust_index,
-	ulint**			clust_offsets,
+	offset_t**		clust_offsets,
 	dict_index_t*		index,
 	roll_ptr_t		roll_ptr,
 	trx_id_t		trx_id,
@@ -893,7 +895,7 @@
 	const rec_t*	version;
 	rec_t*		prev_version;
 	dict_index_t*	clust_index;
-	ulint*		clust_offsets;
+	offset_t*	clust_offsets;
 	mem_heap_t*	heap;
 	mem_heap_t*	heap2;
 	dtuple_t*	row;
@@ -1150,7 +1152,7 @@
 				of this records */
 	mtr_t*		mtr,	/*!< in: mtr holding the latch on rec */
 	dict_index_t*	index,	/*!< in: the clustered index */
-	ulint**		offsets,/*!< in/out: offsets returned by
+	offset_t**	offsets,/*!< in/out: offsets returned by
 				rec_get_offsets(rec, index) */
 	ReadView*	view,	/*!< in: the consistent read view */
 	mem_heap_t**	offset_heap,/*!< in/out: memory heap from which
@@ -1266,7 +1268,7 @@
 				of this records */
 	mtr_t*		mtr,	/*!< in: mtr holding the latch on rec */
 	dict_index_t*	index,	/*!< in: the clustered index */
-	ulint**		offsets,/*!< in/out: offsets returned by
+	offset_t**	offsets,/*!< in/out: offsets returned by
 				rec_get_offsets(rec, index) */
 	mem_heap_t**	offset_heap,/*!< in/out: memory heap from which
 				the offsets are allocated */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/srv/srv0mon.cc mariadb-10.3-10.3.22/storage/innobase/srv/srv0mon.cc
--- mariadb-10.3-10.3.18/storage/innobase/srv/srv0mon.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/srv/srv0mon.cc	2020-01-26 18:37:29.000000000 +0000
@@ -423,7 +423,7 @@
 	 MONITOR_DEFAULT_START, MONITOR_FLUSH_AVG_TIME},
 
 	{"buffer_flush_adaptive_avg_pass", "buffer",
-	 "Numner of adaptive flushes passed during the recent Avg period.",
+	 "Number of adaptive flushes passed during the recent Avg period.",
 	 MONITOR_NONE,
 	 MONITOR_DEFAULT_START, MONITOR_FLUSH_ADAPTIVE_AVG_PASS},
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/srv/srv0srv.cc mariadb-10.3-10.3.22/storage/innobase/srv/srv0srv.cc
--- mariadb-10.3-10.3.18/storage/innobase/srv/srv0srv.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/srv/srv0srv.cc	2020-01-26 18:37:29.000000000 +0000
@@ -594,7 +594,8 @@
 	ulint		n_sys_threads;		/*!< size of the sys_threads
 						array */
 
-	srv_slot_t	sys_threads[32 + 1];	/*!< server thread table;
+	srv_slot_t
+	sys_threads[srv_max_purge_threads + 1];	/*!< server thread table;
 						os_event_set() and
 						os_event_reset() on
 						sys_threads[]->event are
@@ -642,20 +643,24 @@
 char	srv_buffer_pool_dump_at_shutdown = TRUE;
 char	srv_buffer_pool_load_at_startup = TRUE;
 
+/** Slot index in the srv_sys.sys_threads array for the master thread. */
+#define SRV_MASTER_SLOT 0
+
 /** Slot index in the srv_sys.sys_threads array for the purge thread. */
-static const ulint	SRV_PURGE_SLOT	= 1;
+#define SRV_PURGE_SLOT 1
 
-/** Slot index in the srv_sys.sys_threads array for the master thread. */
-static const ulint	SRV_MASTER_SLOT = 0;
+/** Slot index in the srv_sys.sys_threads array from which purge workers start.
+  */
+#define SRV_WORKER_SLOTS_START 2
 
 #ifdef HAVE_PSI_STAGE_INTERFACE
 /** Performance schema stage event for monitoring ALTER TABLE progress
-everything after flush log_make_checkpoint_at(). */
+everything after flush log_make_checkpoint(). */
 PSI_stage_info	srv_stage_alter_table_end
 	= {0, "alter table (end)", PSI_FLAG_STAGE_PROGRESS};
 
 /** Performance schema stage event for monitoring ALTER TABLE progress
-log_make_checkpoint_at(). */
+log_make_checkpoint(). */
 PSI_stage_info	srv_stage_alter_table_flush
 	= {0, "alter table (flush)", PSI_FLAG_STAGE_PROGRESS};
 
@@ -794,7 +799,7 @@
 
 	case SRV_WORKER:
 		/* Find an empty slot, skip the master and purge slots. */
-		for (slot = &srv_sys.sys_threads[2];
+		for (slot = &srv_sys.sys_threads[SRV_WORKER_SLOTS_START];
 		     slot->in_use;
 		     ++slot) {
 
@@ -2458,8 +2463,9 @@
 
 /*********************************************************************//**
 Fetch and execute a task from the work queue.
+@param [in,out]	slot	purge worker thread slot
 @return true if a task was executed */
-static bool srv_task_execute()
+static bool srv_task_execute(ut_d(srv_slot_t *slot))
 {
 	ut_ad(!srv_read_only_mode);
 	ut_ad(srv_force_recovery < SRV_FORCE_NO_BACKGROUND);
@@ -2470,6 +2476,7 @@
 		ut_a(que_node_get_type(thr->child) == QUE_NODE_PURGE);
 		UT_LIST_REMOVE(srv_sys.tasks, thr);
 		mutex_exit(&srv_sys.tasks_mutex);
+		ut_d(thr->thread_slot = slot);
 		que_run_threads(thr);
 		my_atomic_addlint(&purge_sys.n_completed, 1);
 		return true;
@@ -2506,6 +2513,13 @@
 
 	slot = srv_reserve_slot(SRV_WORKER);
 
+#ifdef UNIV_DEBUG
+	UT_LIST_INIT(slot->debug_sync,
+		     &srv_slot_t::debug_sync_t::debug_sync_list);
+	rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock,
+		       SYNC_NO_ORDER_CHECK);
+#endif
+
 	ut_a(srv_n_purge_threads > 1);
 	ut_a(ulong(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER]))
 	     < srv_n_purge_threads);
@@ -2518,7 +2532,7 @@
 		srv_suspend_thread(slot);
 		srv_resume_thread(slot);
 
-		if (srv_task_execute()) {
+		if (srv_task_execute(ut_d(slot))) {
 
 			/* If there are tasks in the queue, wakeup
 			the purge coordinator thread. */
@@ -2548,9 +2562,11 @@
 /** Do the actual purge operation.
 @param[in,out]	n_total_purged	total number of purged pages
 @return length of history list before the last purge batch. */
-static
-ulint
-srv_do_purge(ulint* n_total_purged)
+static ulint srv_do_purge(ulint* n_total_purged
+#ifdef UNIV_DEBUG
+			  , srv_slot_t* slot /*!< purge coordinator */
+#endif
+			  )
 {
 	ulint		n_pages_purged;
 
@@ -2616,7 +2632,11 @@
 
 		n_pages_purged = trx_purge(
 			n_use_threads,
-			(++count % rseg_truncate_frequency) == 0);
+			(++count % rseg_truncate_frequency) == 0
+#ifdef UNIV_DEBUG
+			, slot
+#endif
+					   );
 
 		*n_total_purged += n_pages_purged;
 	} while (n_pages_purged > 0 && !purge_sys.paused()
@@ -2624,6 +2644,9 @@
 
 	return(rseg_history_len);
 }
+#ifndef UNIV_DEBUG
+# define srv_do_purge(n_total_purged, slot) srv_do_purge(n_total_purged)
+#endif
 
 /*********************************************************************//**
 Suspend the purge coordinator thread. */
@@ -2718,6 +2741,12 @@
 
 	slot = srv_reserve_slot(SRV_PURGE);
 
+#ifdef UNIV_DEBUG
+	UT_LIST_INIT(slot->debug_sync,
+		     &srv_slot_t::debug_sync_t::debug_sync_list);
+	rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock,
+		       SYNC_NO_ORDER_CHECK);
+#endif
 	ulint	rseg_history_len = trx_sys.history_size();
 
 	do {
@@ -2739,7 +2768,7 @@
 
 		n_total_purged = 0;
 
-		rseg_history_len = srv_do_purge(&n_total_purged);
+		rseg_history_len = srv_do_purge(&n_total_purged, slot);
 	} while (!srv_purge_should_exit());
 
 	/* The task queue should always be empty, independent of fast
@@ -2897,3 +2926,33 @@
 	return (!is_system_tablespace(space->id)
 		&& truncate_t::was_tablespace_truncated(space->id));
 }
+
+#ifdef UNIV_DEBUG
+static ulint get_first_slot(srv_thread_type type)
+{
+	switch (type) {
+	case SRV_MASTER:
+		return SRV_MASTER_SLOT;
+	case SRV_PURGE:
+		return SRV_PURGE_SLOT;
+	case SRV_WORKER:
+		/* Find an empty slot, skip the master and purge slots. */
+		return SRV_WORKER_SLOTS_START;
+	default:
+		ut_error;
+	}
+}
+
+void srv_for_each_thread(srv_thread_type type,
+			 srv_slot_callback_t callback,
+			 const void *arg)
+{
+	for (ulint slot_idx= get_first_slot(type);
+	     slot_idx < srv_sys.n_sys_threads
+		     && srv_sys.sys_threads[slot_idx].in_use
+		     && srv_sys.sys_threads[slot_idx].type == type;
+	     slot_idx++) {
+		callback(&srv_sys.sys_threads[slot_idx], arg);
+	}
+}
+#endif
diff -Nru mariadb-10.3-10.3.18/storage/innobase/srv/srv0start.cc mariadb-10.3-10.3.22/storage/innobase/srv/srv0start.cc
--- mariadb-10.3-10.3.18/storage/innobase/srv/srv0start.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/srv/srv0start.cc	2020-01-26 18:37:29.000000000 +0000
@@ -510,7 +510,7 @@
 		    (log_sys.lsn - log_sys.last_checkpoint_lsn));
 	log_mutex_exit();
 
-	log_make_checkpoint_at(LSN_MAX);
+	log_make_checkpoint();
 
 	return(DB_SUCCESS);
 }
diff -Nru mariadb-10.3-10.3.18/storage/innobase/sync/sync0debug.cc mariadb-10.3-10.3.22/storage/innobase/sync/sync0debug.cc
--- mariadb-10.3-10.3.18/storage/innobase/sync/sync0debug.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/sync/sync0debug.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1562,7 +1562,7 @@
 	~CreateTracker()
 		UNIV_NOTHROW
 	{
-		ut_d(m_files.empty());
+		ut_ad(m_files.empty());
 
 		m_mutex.destroy();
 	}
diff -Nru mariadb-10.3-10.3.18/storage/innobase/sync/sync0rw.cc mariadb-10.3-10.3.22/storage/innobase/sync/sync0rw.cc
--- mariadb-10.3-10.3.18/storage/innobase/sync/sync0rw.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/sync/sync0rw.cc	2020-01-26 18:37:29.000000000 +0000
@@ -994,13 +994,22 @@
 	ut_ad(lock);
 	ut_ad(rw_lock_validate(lock));
 
+	const os_thread_id_t thread_id = os_thread_get_curr_id();
+
+	if (!os_thread_eq(lock->writer_thread, thread_id)) {
+	} else if (lock_type == RW_LOCK_X && rw_lock_get_x_lock_count(lock)) {
+		return TRUE;
+	} else if (lock_type == RW_LOCK_SX && rw_lock_get_sx_lock_count(lock)) {
+		return TRUE;
+	}
+
 	rw_lock_debug_mutex_enter();
 
 	for (const rw_lock_debug_t* info = UT_LIST_GET_FIRST(lock->debug_list);
 	     info != NULL;
 	     info = UT_LIST_GET_NEXT(list, info)) {
 
-		if (os_thread_eq(info->thread_id, os_thread_get_curr_id())
+		if (os_thread_eq(info->thread_id, thread_id)
 		    && info->pass == 0
 		    && info->lock_type == lock_type) {
 
@@ -1025,12 +1034,23 @@
 {
 	ut_ad(rw_lock_validate(lock));
 
+	const os_thread_id_t thread_id = os_thread_get_curr_id();
+
+	if (!os_thread_eq(lock->writer_thread, thread_id)) {
+	} else if ((flags & RW_LOCK_FLAG_X)
+		   && rw_lock_get_x_lock_count(lock)) {
+		return true;
+	} else if ((flags & RW_LOCK_FLAG_SX)
+		   && rw_lock_get_sx_lock_count(lock)) {
+		return true;
+	}
+
 	rw_lock_debug_mutex_enter();
 
 	for (rw_lock_debug_t* info = UT_LIST_GET_FIRST(lock->debug_list);
 	     info != NULL;
 	     info = UT_LIST_GET_NEXT(list, info)) {
-		if (!os_thread_eq(info->thread_id, os_thread_get_curr_id())
+		if (!os_thread_eq(info->thread_id, thread_id)
 		    || info->pass) {
 			continue;
 		}
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0i_s.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0i_s.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0i_s.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0i_s.cc	2020-01-26 18:37:29.000000000 +0000
@@ -599,7 +599,7 @@
 	ulint			n,	/*!< in: number of field */
 	const dict_index_t*	index,	/*!< in: index */
 	const rec_t*		rec,	/*!< in: record */
-	const ulint*		offsets)/*!< in: record offsets, returned
+	const offset_t*		offsets)/*!< in: record offsets, returned
 					by rec_get_offsets() */
 {
 	const byte*	data;
@@ -680,8 +680,8 @@
 	const dict_index_t*	index;
 	ulint			n_fields;
 	mem_heap_t*		heap;
-	ulint			offsets_onstack[REC_OFFS_NORMAL_SIZE];
-	ulint*			offsets;
+	offset_t		offsets_onstack[REC_OFFS_NORMAL_SIZE];
+	offset_t*		offsets;
 	char			buf[TRX_I_S_LOCK_DATA_MAX_LEN];
 	ulint			buf_used;
 	ulint			i;
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0purge.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0purge.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0purge.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0purge.cc	2020-01-26 18:37:29.000000000 +0000
@@ -968,7 +968,7 @@
 	mtr_t mtr;
 	const ulint size = SRV_UNDO_TABLESPACE_SIZE_IN_PAGES;
 	mtr.start();
-	mtr_x_lock(&space->latch, &mtr);
+	mtr_x_lock_space(space, &mtr);
 	fil_truncate_log(space, size, &mtr);
 	fsp_header_init(space, size, &mtr);
 	mutex_enter(&fil_system.mutex);
@@ -1561,7 +1561,12 @@
 /*======*/
 	ulint	n_purge_threads,	/*!< in: number of purge tasks
 					to submit to the work queue */
-	bool	truncate)		/*!< in: truncate history if true */
+	bool	truncate		/*!< in: truncate history if true */
+#ifdef UNIV_DEBUG
+	, srv_slot_t *slot		/*!< in/out: purge coordinator
+					thread slot */
+#endif
+)
 {
 	que_thr_t*	thr = NULL;
 	ulint		n_pages_handled;
@@ -1597,6 +1602,7 @@
 
 	thr = que_fork_scheduler_round_robin(purge_sys.query, thr);
 
+	ut_d(thr->thread_slot = slot);
 	que_run_threads(thr);
 
 	my_atomic_addlint(&purge_sys.n_completed, 1);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0rec.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0rec.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0rec.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0rec.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
-Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2019, MariaDB Corporation.
+Copyright (c) 1996, 2019, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, 2020, 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
@@ -421,9 +421,15 @@
 
 			const dfield_t* vfield = dtuple_get_nth_v_field(
 				row, col->v_pos);
-			ulint	flen = vfield->len;
+			switch (ulint flen = vfield->len) {
+			case 0: case UNIV_SQL_NULL:
+				if (trx_undo_left(undo_block, *ptr) < 5) {
+					return(false);
+				}
 
-			if (flen != UNIV_SQL_NULL) {
+				*ptr += mach_write_compressed(*ptr, flen);
+				break;
+			default:
 				ulint	max_len
 					= dict_max_v_field_len_store_undo(
 						table, col_no);
@@ -438,14 +444,8 @@
 				}
 				*ptr += mach_write_compressed(*ptr, flen);
 
-				ut_memcpy(*ptr, vfield->data, flen);
+				memcpy(*ptr, vfield->data, flen);
 				*ptr += flen;
-			} else {
-				if (trx_undo_left(undo_block, *ptr) < 5) {
-					return(false);
-				}
-
-				*ptr += mach_write_compressed(*ptr, flen);
 			}
 		}
 	}
@@ -524,13 +524,16 @@
 
 		ptr += mach_write_compressed(ptr, flen);
 
-		if (flen != UNIV_SQL_NULL) {
+		switch (flen) {
+		case 0: case UNIV_SQL_NULL:
+			break;
+		default:
 			if (trx_undo_left(undo_block, ptr) < flen) {
 
 				return(0);
 			}
 
-			ut_memcpy(ptr, dfield_get_data(field), flen);
+			memcpy(ptr, dfield_get_data(field), flen);
 			ptr += flen;
 		}
 	}
@@ -865,7 +868,7 @@
 					delete marking is done */
 	const rec_t*	rec,		/*!< in: clustered index record which
 					has NOT yet been modified */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec, index) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec, index) */
 	const upd_t*	update,		/*!< in: update vector which tells the
 					columns to be updated; in the case of
 					a delete, this should be set to NULL */
@@ -998,7 +1001,7 @@
 				return(0);
 			}
 
-			ut_memcpy(ptr, field, flen);
+			memcpy(ptr, field, flen);
 			ptr += flen;
 		}
 	}
@@ -1129,7 +1132,7 @@
 					return(0);
 				}
 
-				ut_memcpy(ptr, field, flen);
+				memcpy(ptr, field, flen);
 				ptr += flen;
 			}
 
@@ -1154,7 +1157,7 @@
 						return(0);
 					}
 
-					ut_memcpy(ptr, field, flen);
+					memcpy(ptr, field, flen);
 					ptr += flen;
 				}
 			}
@@ -1303,7 +1306,7 @@
 						return(0);
 					}
 
-					ut_memcpy(ptr, field, flen);
+					memcpy(ptr, field, flen);
 					ptr += flen;
 				}
 
@@ -1388,13 +1391,16 @@
 
 				ptr += mach_write_compressed(ptr, flen);
 
-				if (flen != UNIV_SQL_NULL) {
+				switch (flen) {
+				case 0: case UNIV_SQL_NULL:
+					break;
+				default:
 					if (trx_undo_left(undo_block, ptr)
 					    < flen) {
 						return(0);
 					}
 
-					ut_memcpy(ptr, field, flen);
+					memcpy(ptr, field, flen);
 					ptr += flen;
 				}
 			}
@@ -1905,7 +1911,7 @@
 		ut_ad(err == DB_SUCCESS);
 		ut_ad(undo);
 		for (ut_d(int loop_count = 0);;) {
-			ut_ad(++loop_count < 2);
+			ut_ad(loop_count++ < 2);
 			ut_ad(undo->last_page_no == block->page.id.page_no());
 
 			if (ulint offset = trx_undo_page_report_rename(
@@ -1961,7 +1967,7 @@
 	const rec_t*	rec,		/*!< in: case of an update or delete
 					marking, the record in the clustered
 					index; NULL if insert */
-	const ulint*	offsets,	/*!< in: rec_get_offsets(rec) */
+	const offset_t*	offsets,	/*!< in: rec_get_offsets(rec) */
 	roll_ptr_t*	roll_ptr)	/*!< out: DB_ROLL_PTR to the
 					undo log record */
 {
@@ -2219,7 +2225,7 @@
 				index_rec page and purge_view */
 	const rec_t*	rec,	/*!< in: version of a clustered index record */
 	dict_index_t*	index,	/*!< in: clustered index */
-	ulint*		offsets,/*!< in/out: rec_get_offsets(rec, index) */
+	offset_t*	offsets,/*!< in/out: rec_get_offsets(rec, index) */
 	mem_heap_t*	heap,	/*!< in: memory heap from which the memory
 				needed is allocated */
 	rec_t**		old_vers,/*!< out, own: previous version, or NULL if
@@ -2329,8 +2335,6 @@
 	ut_a(ptr);
 
 	if (row_upd_changes_field_size_or_external(index, offsets, update)) {
-		ulint	n_ext;
-
 		/* We should confirm the existence of disowned external data,
 		if the previous version record is delete marked. If the trx_id
 		of the previous record is seen by purge view, we should treat
@@ -2371,14 +2375,15 @@
 		those fields that update updates to become externally stored
 		fields. Store the info: */
 
-		entry = row_rec_to_index_entry(
-			rec, index, offsets, &n_ext, heap);
-		n_ext += btr_push_update_extern_fields(entry, update, heap);
+		entry = row_rec_to_index_entry(rec, index, offsets, heap);
 		/* The page containing the clustered index record
 		corresponding to entry is latched in mtr.  Thus the
 		following call is safe. */
 		row_upd_index_replace_new_col_vals(entry, index, update, heap);
 
+		/* Get number of externally stored columns in updated record */
+		const ulint n_ext = dtuple_get_n_ext(entry);
+
 		buf = static_cast(mem_heap_alloc(
 			heap, rec_get_converted_size(index, entry, n_ext)));
 
@@ -2401,8 +2406,10 @@
 	}
 
 #if defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
+	offset_t offsets_dbg[REC_OFFS_NORMAL_SIZE];
+	rec_offs_init(offsets_dbg);
 	ut_a(!rec_offs_any_null_extern(
-		*old_vers, rec_get_offsets(*old_vers, index, NULL, true,
+		*old_vers, rec_get_offsets(*old_vers, index, offsets_dbg, true,
 					   ULINT_UNDEFINED, &heap)));
 #endif // defined UNIV_DEBUG || defined UNIV_BLOB_LIGHT_DEBUG
 
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0rseg.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0rseg.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0rseg.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0rseg.cc	2020-01-26 18:37:29.000000000 +0000
@@ -694,7 +694,7 @@
 	for (ulong i = 0; i < TRX_SYS_N_RSEGS; i++) {
 		mtr.start();
 		mtr.set_log_mode(MTR_LOG_NO_REDO);
-		mtr_x_lock(&fil_system.temp_space->latch, &mtr);
+		mtr_x_lock_space(fil_system.temp_space, &mtr);
 
 		buf_block_t* rblock = trx_rseg_header_create(
 			fil_system.temp_space, i, NULL, &mtr);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0sys.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0sys.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0sys.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0sys.cc	2020-01-26 18:37:29.000000000 +0000
@@ -156,7 +156,7 @@
 	then enter the kernel: we must do it in this order to conform
 	to the latching order rules. */
 
-	mtr_x_lock(&fil_system.sys_space->latch, mtr);
+	mtr_x_lock_space(fil_system.sys_space, mtr);
 	compile_time_assert(TRX_SYS_SPACE == 0);
 
 	/* Create the trx sys file block in a new allocated file segment */
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0trx.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0trx.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0trx.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0trx.cc	2020-01-26 18:37:29.000000000 +0000
@@ -79,7 +79,8 @@
 	trx_t*		trx,	/*!< in: transaction struct */
 	const char*	msg)	/*!< in: detailed error message */
 {
-	ut_strlcpy(trx->detailed_error, msg, MAX_DETAILED_ERROR_LEN);
+	strncpy(trx->detailed_error, msg, MAX_DETAILED_ERROR_LEN - 1);
+	trx->detailed_error[MAX_DETAILED_ERROR_LEN - 1] = '\0';
 }
 
 /*************************************************************//**
@@ -499,7 +500,7 @@
     mem_heap_empty(lock.lock_heap);
   }
 
-  lock.table_locks.clear(); /* outside "if" to work around MDEV-20483 */
+  lock.table_locks.clear();
 }
 
 /** At shutdown, frees a transaction object. */
@@ -1147,26 +1148,14 @@
 	fts_t*		  fts = ftt->table->fts;
 	fts_doc_ids_t*	  doc_ids = ftt->added_doc_ids;
 
-	mutex_enter(&fts->bg_threads_mutex);
+	ut_a(fts->add_wq);
 
-	if (fts->fts_status & BG_THREAD_STOP) {
-		/* The table is about to be dropped, no use
-		adding anything to its work queue. */
+	mem_heap_t* heap = static_cast(doc_ids->self_heap->arg);
 
-		mutex_exit(&fts->bg_threads_mutex);
-	} else {
-		mem_heap_t*     heap;
-		mutex_exit(&fts->bg_threads_mutex);
-
-		ut_a(fts->add_wq);
-
-		heap = static_cast(doc_ids->self_heap->arg);
+	ib_wqueue_add(fts->add_wq, doc_ids, heap);
 
-		ib_wqueue_add(fts->add_wq, doc_ids, heap);
-
-		/* fts_trx_table_t no longer owns the list. */
-		ftt->added_doc_ids = NULL;
-	}
+	/* fts_trx_table_t no longer owns the list. */
+	ftt->added_doc_ids = NULL;
 }
 
 /******************************************************************//**
@@ -1363,6 +1352,16 @@
 		DBUG_LOG("trx", "Autocommit in memory: " << trx);
 		trx->state = TRX_STATE_NOT_STARTED;
 	} else {
+#ifdef UNIV_DEBUG
+		if (!UT_LIST_GET_LEN(trx->lock.trx_locks)) {
+			for (lock_list::iterator it
+				= trx->lock.table_locks.begin();
+			     it != trx->lock.table_locks.end();
+			     it++) {
+				ut_ad(!*it);
+			}
+		}
+#endif /* UNIV_DEBUG */
 		trx->commit_state();
 
 		if (trx->id) {
diff -Nru mariadb-10.3-10.3.18/storage/innobase/trx/trx0undo.cc mariadb-10.3-10.3.22/storage/innobase/trx/trx0undo.cc
--- mariadb-10.3-10.3.18/storage/innobase/trx/trx0undo.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/trx/trx0undo.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,7 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2014, 2018, MariaDB Corporation.
+Copyright (c) 2014, 2019, 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
@@ -1607,7 +1607,7 @@
 
 		/* Delete first the undo log segment in the file */
 		mutex_exit(&rseg->mutex);
-		trx_undo_seg_free(undo, true);
+		trx_undo_seg_free(undo, is_temp);
 		mutex_enter(&rseg->mutex);
 
 		ut_ad(rseg->curr_size > undo->size);
diff -Nru mariadb-10.3-10.3.18/storage/innobase/ut/ut0mem.cc mariadb-10.3-10.3.22/storage/innobase/ut/ut0mem.cc
--- mariadb-10.3-10.3.18/storage/innobase/ut/ut0mem.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/ut/ut0mem.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -24,55 +25,6 @@
 *************************************************************************/
 
 #include "ut0mem.h"
-#include "os0thread.h"
-#include "srv0srv.h"
-#include 
-
-/**********************************************************************//**
-Copies up to size - 1 characters from the NUL-terminated string src to
-dst, NUL-terminating the result. Returns strlen(src), so truncation
-occurred if the return value >= size.
-@return strlen(src) */
-ulint
-ut_strlcpy(
-/*=======*/
-	char*		dst,	/*!< in: destination buffer */
-	const char*	src,	/*!< in: source buffer */
-	ulint		size)	/*!< in: size of destination buffer */
-{
-	ulint	src_size = strlen(src);
-
-	if (size != 0) {
-		ulint	n = ut_min(src_size, size - 1);
-
-		memcpy(dst, src, n);
-		dst[n] = '\0';
-	}
-
-	return(src_size);
-}
-
-/**********************************************************************//**
-Like ut_strlcpy, but if src doesn't fit in dst completely, copies the last
-(size - 1) bytes of src, not the first.
-@return strlen(src) */
-ulint
-ut_strlcpy_rev(
-/*===========*/
-	char*		dst,	/*!< in: destination buffer */
-	const char*	src,	/*!< in: source buffer */
-	ulint		size)	/*!< in: size of destination buffer */
-{
-	ulint	src_size = strlen(src);
-
-	if (size != 0) {
-		ulint	n = ut_min(src_size, size - 1);
-
-		memcpy(dst, src + src_size - n, n + 1);
-	}
-
-	return(src_size);
-}
 
 /********************************************************************
 Concatenate 3 strings.*/
diff -Nru mariadb-10.3-10.3.18/storage/innobase/ut/ut0rnd.cc mariadb-10.3-10.3.22/storage/innobase/ut/ut0rnd.cc
--- mariadb-10.3-10.3.18/storage/innobase/ut/ut0rnd.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/ut/ut0rnd.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,6 +1,7 @@
 /*****************************************************************************
 
 Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2019, 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
@@ -25,6 +26,9 @@
 
 #include "ut0rnd.h"
 
+/** Seed value of ut_rnd_gen() */
+int32 ut_rnd_current;
+
 /** These random numbers are used in ut_find_prime */
 /*@{*/
 #define	UT_RANDOM_1	1.0412321
@@ -32,9 +36,6 @@
 #define UT_RANDOM_3	1.0132677
 /*@}*/
 
-/** Seed value of ut_rnd_gen_ulint(). */
-ulint	ut_rnd_ulint_counter = 65654363;
-
 /***********************************************************//**
 Looks for a prime number slightly greater than the given argument.
 The prime is chosen so that it is not near any power of 2.
diff -Nru mariadb-10.3-10.3.18/storage/innobase/ut/ut0wqueue.cc mariadb-10.3-10.3.22/storage/innobase/ut/ut0wqueue.cc
--- mariadb-10.3-10.3.18/storage/innobase/ut/ut0wqueue.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/innobase/ut/ut0wqueue.cc	2020-01-26 18:37:29.000000000 +0000
@@ -28,15 +28,6 @@
 Created 4/26/2006 Osku Salerma
 ************************************************************************/
 
-/* Work queue. */
-struct ib_wqueue_t {
-	ib_mutex_t	mutex;	/*!< mutex protecting everything */
-	ib_list_t*	items;	/*!< work item list */
-	os_event_t	event;	/*!< event we use to signal additions to list;
-				os_event_set() and os_event_reset() are
-				protected by ib_wqueue_t::mutex */
-};
-
 /****************************************************************//**
 Create a new work queue.
 @return work queue */
@@ -72,22 +63,24 @@
 	ut_free(wq);
 }
 
-/****************************************************************//**
-Add a work item to the queue. */
+/** Add a work item to the queue.
+@param[in,out]	wq		work queue
+@param[in]	item		work item
+@param[in,out]	heap		memory heap to use for allocating list node
+@param[in]	wq_locked	work queue mutex locked */
 void
-ib_wqueue_add(
-/*==========*/
-	ib_wqueue_t*	wq,	/*!< in: work queue */
-	void*		item,	/*!< in: work item */
-	mem_heap_t*	heap)	/*!< in: memory heap to use for allocating the
-				list node */
+ib_wqueue_add(ib_wqueue_t* wq, void* item, mem_heap_t* heap, bool wq_locked)
 {
-	mutex_enter(&wq->mutex);
+	if (!wq_locked) {
+		mutex_enter(&wq->mutex);
+	}
 
 	ib_list_add_last(wq->items, item, heap);
 	os_event_set(wq->event);
 
-	mutex_exit(&wq->mutex);
+	if (!wq_locked) {
+		mutex_exit(&wq->mutex);
+	}
 }
 
 /****************************************************************//**
diff -Nru mariadb-10.3-10.3.18/storage/maria/ha_maria.cc mariadb-10.3-10.3.22/storage/maria/ha_maria.cc
--- mariadb-10.3-10.3.18/storage/maria/ha_maria.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ha_maria.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1000,10 +1000,12 @@
 {}
 
 
-handler *ha_maria::clone(const char *name, MEM_ROOT *mem_root)
+handler *ha_maria::clone(const char *name __attribute__((unused)),
+                         MEM_ROOT *mem_root)
 {
-  ha_maria *new_handler= static_cast (handler::clone(name,
-                                                                 mem_root));
+  ha_maria *new_handler=
+    static_cast (handler::clone(file->s->open_file_name.str,
+                                            mem_root));
   if (new_handler)
   {
     new_handler->file->state= file->state;
@@ -1155,7 +1157,7 @@
 
   /*
     For static size rows, tell MariaDB that we will access all bytes
-    in the record when writing it.  This signals MariaDB to initalize
+    in the record when writing it.  This signals MariaDB to initialize
     the full row to ensure we don't get any errors from valgrind and
     that all bytes in the row is properly reset.
   */
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_blockrec.c mariadb-10.3-10.3.22/storage/maria/ma_blockrec.c
--- mariadb-10.3-10.3.18/storage/maria/ma_blockrec.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_blockrec.c	2020-01-26 18:37:29.000000000 +0000
@@ -6394,6 +6394,7 @@
     }
     else if (lsn_korr(buff) >= lsn)           /* Test if already applied */
     {
+      check_skipped_lsn(info, lsn_korr(buff), 1, page);
       /* Fix bitmap, just in case */
       empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET);
       if (!enough_free_entries_on_page(share, buff))
@@ -6561,6 +6562,7 @@
       Note that in case the page is not anymore a head or tail page
       a future redo will fix the bitmap.
     */
+    check_skipped_lsn(info, lsn_korr(buff), 1, page);
     if ((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type)
     {
       empty_space= uint2korr(buff+EMPTY_SPACE_OFFSET);
@@ -6731,6 +6733,7 @@
   if (lsn_korr(buff) >= lsn)
   {
     /* Already applied */
+    check_skipped_lsn(info, lsn_korr(buff), 1, page);
     pagecache_unlock_by_link(share->pagecache, page_link.link,
                              PAGECACHE_LOCK_WRITE_UNLOCK,
                              PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
@@ -6908,8 +6911,7 @@
             if (lsn_korr(buff) >= lsn)
             {
               /* Already applied */
-              DBUG_PRINT("info", ("already applied %llu >= %llu",
-                                  lsn_korr(buff), lsn));
+              check_skipped_lsn(info, lsn_korr(buff), 1, page);
               pagecache_unlock_by_link(share->pagecache, page_link.link,
                                        PAGECACHE_LOCK_WRITE_UNLOCK,
                                        PAGECACHE_UNPIN, LSN_IMPOSSIBLE,
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_check.c mariadb-10.3-10.3.22/storage/maria/ma_check.c
--- mariadb-10.3-10.3.18/storage/maria/ma_check.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_check.c	2020-01-26 18:37:29.000000000 +0000
@@ -52,9 +52,6 @@
 #ifdef HAVE_SYS_VADVISE_H
 #include 
 #endif
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 
 /* Functions defined in this file */
 
@@ -6186,7 +6183,7 @@
 }
 
 
-	/* write suffix to data file if neaded */
+/* Write suffix to data file if needed */
 
 int maria_write_data_suffix(MARIA_SORT_INFO *sort_info, my_bool fix_datafile)
 {
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_close.c mariadb-10.3-10.3.22/storage/maria/ma_close.c
--- mariadb-10.3-10.3.18/storage/maria/ma_close.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_close.c	2020-01-26 18:37:29.000000000 +0000
@@ -37,7 +37,7 @@
 
   /* Check that we have unlocked key delete-links properly */
   DBUG_ASSERT(info->key_del_used == 0);
-  /* Check that file is not part of any uncommited transactions */
+  /* Check that file is not part of any uncommitted transactions */
   DBUG_ASSERT(info->trn == 0 || info->trn == &dummy_transaction_object);
 
   if (share->reopen == 1)
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_extra.c mariadb-10.3-10.3.22/storage/maria/ma_extra.c
--- mariadb-10.3-10.3.18/storage/maria/ma_extra.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_extra.c	2020-01-26 18:37:29.000000000 +0000
@@ -14,9 +14,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
 
 #include "maria_def.h"
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 #include "ma_blockrec.h"
 
 static void maria_extra_keyflag(MARIA_HA *info,
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_key_recover.c mariadb-10.3-10.3.22/storage/maria/ma_key_recover.c
--- mariadb-10.3-10.3.18/storage/maria/ma_key_recover.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_key_recover.c	2020-01-26 18:37:29.000000000 +0000
@@ -777,7 +777,7 @@
     else if (lsn_korr(buff) >= lsn)
     {
       /* Already applied */
-      DBUG_PRINT("info", ("Page is up to date, skipping redo"));
+      check_skipped_lsn(info, lsn_korr(buff), 0, root_page);
       result= 0;
       goto err;
     }
@@ -865,6 +865,7 @@
   if (lsn_korr(buff) >= lsn)
   {
     /* Already applied */
+    check_skipped_lsn(info, lsn_korr(buff), 0, page);
     result= 0;
     goto err;
   }
@@ -966,7 +967,7 @@
   if (lsn_korr(buff) >= lsn)
   {
     /* Already applied */
-    DBUG_PRINT("info", ("Page is up to date, skipping redo"));
+    check_skipped_lsn(info, lsn_korr(buff), 0, page_pos);
     result= 0;
     goto err;
   }
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_loghandler.c mariadb-10.3-10.3.22/storage/maria/ma_loghandler.c
--- mariadb-10.3-10.3.18/storage/maria/ma_loghandler.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_loghandler.c	2020-01-26 18:37:29.000000000 +0000
@@ -19,6 +19,9 @@
 #include "ma_key_recover.h" /* For some in-write hooks */
 #include "ma_checkpoint.h"
 #include "ma_servicethread.h"
+#include "ma_recovery.h"
+#include "ma_loghandler_lsn.h"
+#include "ma_recovery_util.h"
 
 /*
   On Windows, neither my_open() nor mysql_file_sync() work for directories.
@@ -7903,6 +7906,34 @@
 }
 
 
+/**
+   check_skipped_lsn
+
+   Check if lsn skipped in redo is ok
+*/
+
+void check_skipped_lsn(MARIA_HA *info, LSN lsn, my_bool index_file,
+                       pgcache_page_no_t page)
+{
+  if (lsn <= log_descriptor.horizon)
+  {
+    DBUG_PRINT("info", ("Page is up to date, skipping redo"));
+  }
+  else
+  {
+    /* Give error, but don't flood the log */
+    if (skipped_lsn_err_count++ < 10 && ! info->s->redo_error_given++)
+    {
+      eprint(tracef, "Table %s has wrong LSN: " LSN_FMT " on page: %llu",
+             (index_file ? info->s->data_file_name.str :
+              info->s->index_file_name.str),
+             LSN_IN_PARTS(lsn), (ulonglong) page);
+      recovery_found_crashed_tables++;
+    }
+  }
+}
+
+
 /*
   @brief Flushes buffers with LSNs in them less or equal address 
 
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_loghandler.h mariadb-10.3-10.3.22/storage/maria/ma_loghandler.h
--- mariadb-10.3-10.3.18/storage/maria/ma_loghandler.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_loghandler.h	2020-01-26 18:37:29.000000000 +0000
@@ -384,6 +384,8 @@
 void  translog_soft_sync_end(void);
 void translog_sync();
 void translog_set_group_commit_interval(uint32 interval);
+extern void check_skipped_lsn(MARIA_HA *info, LSN lsn, my_bool index_file,
+                              pgcache_page_no_t page);
 
 /*
   all the rest added because of recovery; should we make
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_packrec.c mariadb-10.3-10.3.22/storage/maria/ma_packrec.c
--- mariadb-10.3-10.3.18/storage/maria/ma_packrec.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_packrec.c	2020-01-26 18:37:29.000000000 +0000
@@ -1528,9 +1528,6 @@
 /*****************************************************************************
 	Some redefined functions to handle files when we are using memmap
 *****************************************************************************/
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 
 #ifdef HAVE_MMAP
 
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_recovery.c mariadb-10.3-10.3.22/storage/maria/ma_recovery.c
--- mariadb-10.3-10.3.18/storage/maria/ma_recovery.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_recovery.c	2020-01-26 18:37:29.000000000 +0000
@@ -57,8 +57,7 @@
 static ulong skipped_undo_phase;
 static ulonglong now; /**< for tracking execution time of phases */
 static void (*save_error_handler_hook)(uint, const char *,myf);
-static uint recovery_warnings; /**< count of warnings */
-static uint recovery_found_crashed_tables;
+static ulong recovery_warnings; /**< count of warnings */
 HASH tables_to_redo;                          /* For maria_read_log */
 ulong maria_recovery_force_crash_counter;
 TrID max_long_trid= 0; /**< max long trid seen by REDO phase */
@@ -291,6 +290,7 @@
   DBUG_ASSERT(apply == MARIA_LOG_APPLY || !should_run_undo_phase);
   DBUG_ASSERT(!maria_multi_threaded);
   recovery_warnings= recovery_found_crashed_tables= 0;
+  skipped_lsn_err_count= 0;
   maria_recovery_changed_data= 0;
   /* checkpoints can happen only if TRNs have been built */
   DBUG_ASSERT(should_run_undo_phase || !take_checkpoints);
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_recovery.h mariadb-10.3-10.3.22/storage/maria/ma_recovery.h
--- mariadb-10.3-10.3.18/storage/maria/ma_recovery.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_recovery.h	2020-01-26 18:37:29.000000000 +0000
@@ -33,4 +33,6 @@
 /* Table of tables to recover */
 extern HASH tables_to_redo;
 extern ulong maria_recovery_force_crash_counter;
+extern ulong recovery_found_crashed_tables;
+extern uint skipped_lsn_err_count;
 C_MODE_END
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_recovery_util.c mariadb-10.3-10.3.22/storage/maria/ma_recovery_util.c
--- mariadb-10.3-10.3.18/storage/maria/ma_recovery_util.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_recovery_util.c	2020-01-26 18:37:29.000000000 +0000
@@ -51,6 +51,8 @@
 my_bool procent_printed;
 FILE *tracef; /**< trace file for debugging */
 
+ulong recovery_found_crashed_tables;
+uint skipped_lsn_err_count;
 
 /** @brief Prints to a trace file if it is not NULL */
 void tprint(FILE *trace_file __attribute__ ((unused)),
@@ -59,11 +61,12 @@
   va_list args;
 #ifndef DBUG_OFF
   {
-    char buff[1024], *end;
+    char buff[1024];
+    size_t length;
     va_start(args, format);
-    vsnprintf(buff, sizeof(buff)-1, format, args);
-    if (*(end= strend(buff)) == '\n')
-      *end= 0;                                  /* Don't print end \n */
+    length= my_vsnprintf(buff, sizeof(buff)-1, format, args);
+    if (length && buff[length-1] == '\n')
+      buff[length-1]= 0;                      /* Don't print end \n */
     DBUG_PRINT("info", ("%s", buff));
     va_end(args);
   }
diff -Nru mariadb-10.3-10.3.18/storage/maria/ma_state.c mariadb-10.3-10.3.22/storage/maria/ma_state.c
--- mariadb-10.3-10.3.18/storage/maria/ma_state.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/ma_state.c	2020-01-26 18:37:29.000000000 +0000
@@ -455,7 +455,7 @@
   MARIA_USED_TABLES *tables, *next;
   DBUG_ENTER("_ma_trnman_end_trans_hook");
   DBUG_PRINT("enter", ("trn: %p  used_tables: %p", trn, trn->used_tables));
-  
+
   for (tables= (MARIA_USED_TABLES*) trn->used_tables;
        tables;
        tables= next)
@@ -572,6 +572,7 @@
   TRN *trn= info->trn;
   MARIA_USED_TABLES *tables, **prev;
   MARIA_HA *handler, **prev_file;
+  uint unlinked= 0;
   DBUG_ENTER("_ma_remove_table_from_trnman");
   DBUG_PRINT("enter", ("trn: %p  used_tables: %p  share: %p  in_trans: %d",
                        trn, trn->used_tables, share, share->in_trans));
@@ -580,7 +581,7 @@
 
   if (trn == &dummy_transaction_object)
     DBUG_VOID_RETURN;
-  
+
   /* First remove share from used_tables */
   for (prev= (MARIA_USED_TABLES**) (char*) &trn->used_tables;
        (tables= *prev);
@@ -594,7 +595,7 @@
       break;
     }
   }
-  if (tables != 0)
+  if (!tables)
   {
     /*
       This can only happens in case of rename of intermediate table as
@@ -603,18 +604,21 @@
     DBUG_PRINT("warning", ("share: %p where not in used_tables_list", share));
   }
 
-  /* unlink table from used_instances */
-  for (prev_file= (MARIA_HA**) &trn->used_instances;
-       (handler= *prev_file);
-       prev_file= &handler->trn_next)
+  /* unlink all instances of the table from used_instances */
+  prev_file= (MARIA_HA**) &trn->used_instances;
+  while ((handler= *prev_file))
   {
-    if (handler == info)
+    if (handler->s == share)
     {
-      *prev_file= info->trn_next;
-      break;
+      unlinked++;
+      *prev_file= handler->trn_next;  /* Remove instance */
     }
+    else
+      prev_file= &handler->trn_next;  /* Continue with next instance */
   }
-  if (handler != 0)
+
+  DBUG_PRINT("note", ("unlinked tables: %u", unlinked));
+  if (!unlinked)
   {
     /*
       This can only happens in case of rename of intermediate table as
diff -Nru mariadb-10.3-10.3.18/storage/maria/maria_chk.c mariadb-10.3-10.3.22/storage/maria/maria_chk.c
--- mariadb-10.3-10.3.18/storage/maria/maria_chk.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/maria_chk.c	2020-01-26 18:37:29.000000000 +0000
@@ -23,9 +23,6 @@
 #include 
 #include 
 #include 
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 
 static uint decode_bits;
 static char **default_argv;
diff -Nru mariadb-10.3-10.3.18/storage/maria/maria_def.h mariadb-10.3-10.3.22/storage/maria/maria_def.h
--- mariadb-10.3-10.3.18/storage/maria/maria_def.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/maria_def.h	2020-01-26 18:37:29.000000000 +0000
@@ -500,6 +500,7 @@
   my_bool have_versioning;
   my_bool key_del_used;                         /* != 0 if key_del is locked */
   my_bool deleting;                     /* we are going to delete this table */
+  my_bool redo_error_given;             /* Used during recovery */
   THR_LOCK lock;
   void (*lock_restore_status)(void *);
   /**
diff -Nru mariadb-10.3-10.3.18/storage/maria/maria_pack.c mariadb-10.3-10.3.22/storage/maria/maria_pack.c
--- mariadb-10.3-10.3.18/storage/maria/maria_pack.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/maria_pack.c	2020-01-26 18:37:29.000000000 +0000
@@ -782,27 +782,29 @@
     for (i=0 ; i < info->s->base.fields ; i++)
     {
       enum en_fieldtype type;
-      count[i].field_length=info->s->columndef[i].length;
-      type= count[i].field_type= (enum en_fieldtype) info->s->columndef[i].type;
+      uint col_nr = info->s->columndef[i].column_nr;
+      count[col_nr].field_length=info->s->columndef[i].length;
+      type= count[col_nr].field_type=
+        (enum en_fieldtype) info->s->columndef[i].type;
       if (type == FIELD_INTERVALL ||
 	  type == FIELD_CONSTANT ||
 	  type == FIELD_ZERO)
 	type = FIELD_NORMAL;
-      if (count[i].field_length <= 8 &&
+      if (count[col_nr].field_length <= 8 &&
 	  (type == FIELD_NORMAL ||
 	   type == FIELD_SKIP_ZERO))
-	count[i].max_zero_fill= count[i].field_length;
+	count[col_nr].max_zero_fill= count[col_nr].field_length;
       /*
         For every column initialize a tree, which is used to detect distinct
         column values. 'int_tree' works together with 'tree_buff' and
         'tree_pos'. It's keys are implemented by pointers into 'tree_buff'.
         This is accomplished by '-1' as the element size.
       */
-      init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL,
+      init_tree(&count[col_nr].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL,
 		NULL, MYF(0));
       if (records && type != FIELD_BLOB && type != FIELD_VARCHAR)
-	count[i].tree_pos=count[i].tree_buff =
-	  my_malloc(count[i].field_length > 1 ? tree_buff_length : 2,
+	count[col_nr].tree_pos=count[col_nr].tree_buff =
+	  my_malloc(count[col_nr].field_length > 1 ? tree_buff_length : 2,
 		    MYF(MY_WME));
     }
   }
diff -Nru mariadb-10.3-10.3.18/storage/maria/trnman.c mariadb-10.3-10.3.22/storage/maria/trnman.c
--- mariadb-10.3-10.3.18/storage/maria/trnman.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/maria/trnman.c	2020-01-26 18:37:29.000000000 +0000
@@ -307,7 +307,7 @@
   if (!(trn= tmp.trn))
   {
     /*
-      trn should be completely initalized at create time to allow
+      trn should be completely initialized at create time to allow
       one to keep a known state on it.
       (Like redo_lns, which is assumed to be 0 at start of row handling
       and reset to zero before end of row handling)
diff -Nru mariadb-10.3-10.3.18/storage/mroonga/ha_mroonga.hpp mariadb-10.3-10.3.22/storage/mroonga/ha_mroonga.hpp
--- mariadb-10.3-10.3.18/storage/mroonga/ha_mroonga.hpp	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/mroonga/ha_mroonga.hpp	2020-01-26 18:37:29.000000000 +0000
@@ -571,7 +571,12 @@
   void set_next_insert_id(ulonglong id);
   void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values,
                           ulonglong *first_value, ulonglong *nb_reserved_values) mrn_override;
-  void restore_auto_increment(ulonglong prev_insert_id);
+  /** Fix spurious -Werror=overloaded-virtual in GCC 9 */
+  void restore_auto_increment() mrn_override
+  {
+    handler::restore_auto_increment();
+  }
+  void restore_auto_increment(ulonglong prev_insert_id) mrn_override;
   void release_auto_increment() mrn_override;
   int check_for_upgrade(HA_CHECK_OPT *check_opt) mrn_override;
 #ifdef MRN_HANDLER_HAVE_RESET_AUTO_INCREMENT
diff -Nru mariadb-10.3-10.3.18/storage/myisam/NEWS mariadb-10.3-10.3.22/storage/myisam/NEWS
--- mariadb-10.3-10.3.18/storage/myisam/NEWS	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/NEWS	2020-01-26 18:37:29.000000000 +0000
@@ -26,7 +26,7 @@
 - Index on BLOB and VARCHAR.
 - One can now have NULL in an index.  This takes 0-1 bytes / key.
 - MYISAM will allow one to specify one AUTO_INCREMENT column;  MYISAM will
-  automaticly update this on INSERT/UPDATE. The AUTO_INCREMENT value can be
+  automatically update this on INSERT/UPDATE. The AUTO_INCREMENT value can be
   reset with myisamchk.
 - Max key length will be 500 by default;  In cases of longer keys than 250,
   a bigger key block size than the default of 1024 byes is used for this key.
@@ -39,7 +39,7 @@
 - 'myisamchk -a' stores statistic for key parts (and not only for whole keys
    as in NISAM).
 - Dynamic size rows will now be much less fragmented when mixing deletes with
-  update and insert.  This is done by automaticly combine adjacent deleted
+  update and insert.  This is done by automatically combining adjacent deleted
   blocks and by extending blocks if the next block is deleted.
 - For dynamic size rows, the delete link contains a pointer to itself
   (to make repairs easier).
diff -Nru mariadb-10.3-10.3.18/storage/myisam/ft_boolean_search.c mariadb-10.3-10.3.22/storage/myisam/ft_boolean_search.c
--- mariadb-10.3-10.3.18/storage/myisam/ft_boolean_search.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/ft_boolean_search.c	2020-01-26 18:37:29.000000000 +0000
@@ -335,7 +335,7 @@
   When performing prefix search (a word with truncation operator), we
   must preserve original prefix to ensure that characters which may be
   expanded/contracted do not break the prefix. This is done by storing
-  newly found key immediatly after the original word in ftbw->word
+  newly found key immediately after the original word in ftbw->word
   buffer.
 
   ftbw->word= LENGTH WORD [ LENGTH1 WORD1 ] WEIGHT REFERENCE
diff -Nru mariadb-10.3-10.3.18/storage/myisam/ha_myisam.cc mariadb-10.3-10.3.22/storage/myisam/ha_myisam.cc
--- mariadb-10.3-10.3.18/storage/myisam/ha_myisam.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/ha_myisam.cc	2020-01-26 18:37:29.000000000 +0000
@@ -702,10 +702,11 @@
    can_enable_indexes(1)
 {}
 
-handler *ha_myisam::clone(const char *name, MEM_ROOT *mem_root)
+handler *ha_myisam::clone(const char *name __attribute__((unused)),
+                          MEM_ROOT *mem_root)
 {
-  ha_myisam *new_handler= static_cast (handler::clone(name,
-                                                                   mem_root));
+  ha_myisam *new_handler=
+    static_cast (handler::clone(file->filename, mem_root));
   if (new_handler)
     new_handler->file->state= file->state;
   return new_handler;
@@ -769,8 +770,8 @@
     growing files. Using an open_flag instead of calling mi_extra(...
     HA_EXTRA_MMAP ...) after mi_open() has the advantage that the
     mapping is not repeated for every open, but just done on the initial
-    open, when the MyISAM share is created. Everytime the server
-    requires to open a new instance of a table it calls this method. We
+    open, when the MyISAM share is created. Every time the server
+    requires opening a new instance of a table it calls this method. We
     will always supply HA_OPEN_MMAP for a permanent table. However, the
     MyISAM storage engine will ignore this flag if this is a secondary
     open of a table that is in use by other threads already (if the
@@ -858,7 +859,7 @@
 
   /*
     For static size rows, tell MariaDB that we will access all bytes
-    in the record when writing it.  This signals MariaDB to initalize
+    in the record when writing it.  This signals MariaDB to initialize
     the full row to ensure we don't get any errors from valgrind and
     that all bytes in the row is properly reset.
   */
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_check.c mariadb-10.3-10.3.22/storage/myisam/mi_check.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_check.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_check.c	2020-01-26 18:37:29.000000000 +0000
@@ -46,9 +46,6 @@
 #ifdef HAVE_SYS_VADVISE_H
 #include 
 #endif
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 #include "rt_index.h"
 #include 
 
@@ -282,7 +279,7 @@
     /*
       Read the key block with MI_MIN_KEY_BLOCK_LENGTH to find next link.
       If the key cache block size is smaller than block_size, we can so
-      avoid unecessary eviction of cache block.
+      avoid unnecessary eviction of cache block.
     */
     if (!(buff=key_cache_read(info->s->key_cache,
                               info->s->kfile, next_link, DFLT_INIT_HITS,
@@ -1896,7 +1893,7 @@
 } /* flush_blocks */
 
 
-	/* Sort index for more efficent reads */
+	/* Sort index for more efficient reads */
 
 int mi_sort_index(HA_CHECK *param, register MI_INFO *info, char * name)
 {
@@ -3051,13 +3048,13 @@
   /*
     Destroy the write cache. The master thread did already detach from
     the share by remove_io_thread() or it was not yet started (if the
-    error happend before creating the thread).
+    error happened before creating the thread).
   */
   (void) end_io_cache(&info->rec_cache);
   /*
     Destroy the new data cache in case of non-quick repair. All slave
     threads did either detach from the share by remove_io_thread()
-    already or they were not yet started (if the error happend before
+    already or they were not yet started (if the error happened before
     creating the threads).
   */
   if (!rep_quick && my_b_inited(&new_data_cache))
@@ -4598,7 +4595,7 @@
          keypart_k=c_k for arbitrary constants c_1 ... c_k) 
      
      = {assuming that values have uniform distribution and index contains all
-        tuples from the domain (or that {c_1, ..., c_k} tuple is choosen from
+        tuples from the domain (or that {c_1, ..., c_k} tuple is chosen from
         index tuples}
      
      = #tuples-in-the-index / #distinct-tuples-in-the-index.
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_create.c mariadb-10.3-10.3.22/storage/myisam/mi_create.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_create.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_create.c	2020-01-26 18:37:29.000000000 +0000
@@ -611,7 +611,7 @@
     klinkname_ptr= klinkname;
     /*
       Don't create the table if the link or file exists to ensure that one
-      doesn't accidently destroy another table.
+      doesn't accidentally destroy another table.
     */
     create_flag=0;
   }
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_delete.c mariadb-10.3-10.3.22/storage/myisam/mi_delete.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_delete.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_delete.c	2020-01-26 18:37:29.000000000 +0000
@@ -326,7 +326,7 @@
     {
       DBUG_PRINT("error",("Didn't find key"));
       mi_print_error(info->s, HA_ERR_CRASHED);
-      my_errno=HA_ERR_CRASHED;		/* This should never happend */
+      my_errno=HA_ERR_CRASHED;		/* This should never happen */
       goto err;
     }
     save_flag=0;
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_dynrec.c mariadb-10.3-10.3.22/storage/myisam/mi_dynrec.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_dynrec.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_dynrec.c	2020-01-26 18:37:29.000000000 +0000
@@ -885,8 +885,8 @@
 	  /*
 	    Check if next block is a deleted block
 	    Above we have MI_MIN_BLOCK_LENGTH to avoid the problem where
-	    the next block is so small it can't be splited which could
-	    casue problems
+	    the next block is so small it can't be split which could
+	    cause problems
 	  */
 
 	  MI_BLOCK_INFO del_block;
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_extra.c mariadb-10.3-10.3.22/storage/myisam/mi_extra.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_extra.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_extra.c	2020-01-26 18:37:29.000000000 +0000
@@ -15,9 +15,6 @@
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335  USA */
 
 #include "myisamdef.h"
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 
 static void mi_extra_keyflag(MI_INFO *info, enum ha_extra_function function);
 
@@ -211,7 +208,7 @@
     info->read_record=	share->read_record;
     info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS);
     break;
-  case HA_EXTRA_NO_USER_CHANGE: /* Database is somehow locked agains changes */
+  case HA_EXTRA_NO_USER_CHANGE: /* Database is somehow locked against changes */
     info->lock_type= F_EXTRA_LCK; /* Simulate as locked */
     break;
   case HA_EXTRA_WAIT_LOCK:
@@ -352,7 +349,7 @@
     if (share->base.blobs)
       mi_alloc_rec_buff(info, -1, &info->rec_buff);
     break;
-  case HA_EXTRA_NORMAL:				/* Theese isn't in use */
+  case HA_EXTRA_NORMAL:				/* These aren't in use */
     info->quick_mode=0;
     break;
   case HA_EXTRA_QUICK:
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_key.c mariadb-10.3-10.3.22/storage/myisam/mi_key.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_key.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_key.c	2020-01-26 18:37:29.000000000 +0000
@@ -603,7 +603,7 @@
   }
 
   /*
-    The following code works becasue if s_value < 0 then value is 0
+    The following code works because if s_value < 0 then value is 0
     and if s_value == 0 then value will contain either s_value or the
     correct value.
   */
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_locking.c mariadb-10.3-10.3.22/storage/myisam/mi_locking.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_locking.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_locking.c	2020-01-26 18:37:29.000000000 +0000
@@ -446,7 +446,7 @@
 
   @param  org_table
   @param  new_table that should point on org_lock.  new_table is 0
-          in case this is the first occurence of the table in the lock
+          in case this is the first occurrence of the table in the lock
           structure.
 */
 
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_packrec.c mariadb-10.3-10.3.22/storage/myisam/mi_packrec.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_packrec.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_packrec.c	2020-01-26 18:37:29.000000000 +0000
@@ -810,7 +810,7 @@
     return &uf_varchar2;
   case FIELD_LAST:
   default:
-    return 0;			/* This should never happend */
+    return 0;			/* This should never happen */
   }
 }
 
@@ -1479,9 +1479,6 @@
 /*****************************************************************************
 	Some redefined functions to handle files when we are using memmap
 *****************************************************************************/
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 
 #ifdef HAVE_MMAP
 
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_rfirst.c mariadb-10.3-10.3.22/storage/myisam/mi_rfirst.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_rfirst.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_rfirst.c	2020-01-26 18:37:29.000000000 +0000
@@ -16,7 +16,7 @@
 
 #include "myisamdef.h"
 
-	/*  Read first row through  a specfic key */
+	/*  Read first row through a specific key */
 
 int mi_rfirst(MI_INFO *info, uchar *buf, int inx)
 {
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_search.c mariadb-10.3-10.3.22/storage/myisam/mi_search.c
--- mariadb-10.3-10.3.18/storage/myisam/mi_search.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_search.c	2020-01-26 18:37:29.000000000 +0000
@@ -432,7 +432,7 @@
 
       /*
         If prefix_len > cmplen then we are in the end-space comparison
-        phase. Do not try to acces the key any more ==> left= 0.
+        phase. Do not try to access the key any more ==> left= 0.
       */
       left= ((len <= cmplen) ? suffix_len :
              ((prefix_len < cmplen) ? cmplen - prefix_len : 0));
diff -Nru mariadb-10.3-10.3.18/storage/myisam/mi_test_all.sh mariadb-10.3-10.3.22/storage/myisam/mi_test_all.sh
--- mariadb-10.3-10.3.18/storage/myisam/mi_test_all.sh	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/mi_test_all.sh	2020-01-26 18:37:29.000000000 +0000
@@ -19,8 +19,8 @@
 # MA 02110-1335  USA
 
 #
-# Execute some simple basic test on MyISAM libary to check if things
-# works at all.
+# Execute some simple basic tests on the MyISAM library to check if
+# things work at all.
 
 valgrind="valgrind --alignment=8 --leak-check=yes"
 silent="-s"
diff -Nru mariadb-10.3-10.3.18/storage/myisam/myisamchk.c mariadb-10.3-10.3.22/storage/myisam/myisamchk.c
--- mariadb-10.3-10.3.18/storage/myisam/myisamchk.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/myisamchk.c	2020-01-26 18:37:29.000000000 +0000
@@ -21,9 +21,6 @@
 #include 
 #include 
 #include 
-#ifdef HAVE_SYS_MMAN_H
-#include 
-#endif
 
 static uint decode_bits;
 static char **default_argv;
@@ -378,7 +375,7 @@
 
   puts("Check options (check is the default action for myisamchk):\n\
   -c, --check	      Check table for errors.\n\
-  -e, --extend-check  Check the table VERY throughly.  Only use this in\n\
+  -e, --extend-check  Check the table VERY thoroughly.  Only use this in\n\
                       extreme cases as myisamchk should normally be able to\n\
                       find out if the table is ok even without this switch.\n\
   -F, --fast	      Check only tables that haven't been closed properly.\n\
diff -Nru mariadb-10.3-10.3.18/storage/myisam/myisamdef.h mariadb-10.3-10.3.22/storage/myisam/myisamdef.h
--- mariadb-10.3-10.3.18/storage/myisam/myisamdef.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/myisamdef.h	2020-01-26 18:37:29.000000000 +0000
@@ -197,7 +197,7 @@
   ulong last_process;                   /* For table-change-check */
   ulong last_version;                   /* Version on start */
   ulong options;                        /* Options used */
-  ulong min_pack_length;                /* Theese are used by packed data */
+  ulong min_pack_length;                /* These are used by packed data */
   ulong max_pack_length;
   ulong state_diff_length;
   uint	rec_reflength;			/* rec_reflength in use now */
diff -Nru mariadb-10.3-10.3.18/storage/myisam/myisamlog.c mariadb-10.3-10.3.22/storage/myisam/myisamlog.c
--- mariadb-10.3-10.3.18/storage/myisam/myisamlog.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/myisamlog.c	2020-01-26 18:37:29.000000000 +0000
@@ -415,7 +415,7 @@
 		     left_root_right);
       file_info.id=open_param.max_id+1;
       /*
-       * In the line below +10 is added to accomodate '<' and '>' chars
+       * In the line below +10 is added to accommodate '<' and '>' chars
        * plus '\0' at the end, so that there is place for 7 digits.
        * It is  improbable that same table can have that many entries in 
        * the table cache.
diff -Nru mariadb-10.3-10.3.18/storage/myisam/myisampack.c mariadb-10.3-10.3.22/storage/myisam/myisampack.c
--- mariadb-10.3-10.3.18/storage/myisam/myisampack.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/myisampack.c	2020-01-26 18:37:29.000000000 +0000
@@ -110,7 +110,7 @@
   MI_INFO **file,**current,**end;
   uint free_file;
   uint count;
-  uint	min_pack_length;		/* Theese is used by packed data */
+  uint	min_pack_length;		/* These are used by packed data */
   uint	max_pack_length;
   uint	ref_length;
   uint	max_blob_length;
@@ -1237,7 +1237,7 @@
 	huff_counts->counts[0]=0;
 	goto found_pack;
       }
-      /* Remeber the number of significant spaces. */
+      /* Remember the number of significant spaces. */
       old_space_count=huff_counts->counts[' '];
       /* Add all leading and trailing spaces. */
       huff_counts->counts[' ']+= (huff_counts->tot_end_space +
diff -Nru mariadb-10.3-10.3.18/storage/myisam/sort.c mariadb-10.3-10.3.22/storage/myisam/sort.c
--- mariadb-10.3-10.3.18/storage/myisam/sort.c	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/myisam/sort.c	2020-01-26 18:37:29.000000000 +0000
@@ -859,7 +859,7 @@
     buffpek		Where to read from
     sort_length		max length to read
   RESULT
-    > 0	Ammount of bytes read
+    > 0	Number of bytes read
     -1	Error
 */
 
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/CMakeLists.txt mariadb-10.3-10.3.22/storage/perfschema/CMakeLists.txt
--- mariadb-10.3-10.3.18/storage/perfschema/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
-# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
 #
 # 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 Foundation; version 2 of the License.
+# it under the terms of the GNU General Public License, version 2.0,
+# as published by the Free Software Foundation.
+#
+# This program is also distributed with certain software (including
+# but not limited to OpenSSL) that is licensed under separate terms,
+# as designated in a particular file or component or in included license
+# documentation.  The authors of MySQL hereby grant you an additional
+# permission to link the program and your derivative works with the
+# separately licensed software that they have included with MySQL.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# GNU General Public License, version 2.0, for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_account.cc mariadb-10.3-10.3.22/storage/perfschema/cursor_by_account.cc
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_account.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_account.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_account.h mariadb-10.3-10.3.22/storage/perfschema/cursor_by_account.h
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_account.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_account.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_host.cc mariadb-10.3-10.3.22/storage/perfschema/cursor_by_host.cc
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_host.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_host.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_host.h mariadb-10.3-10.3.22/storage/perfschema/cursor_by_host.h
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_host.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_host.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread.cc mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread.cc
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread.h mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread.h
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread_connect_attr.cc mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread_connect_attr.cc
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread_connect_attr.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread_connect_attr.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread_connect_attr.h mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread_connect_attr.h
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_thread_connect_attr.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_thread_connect_attr.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_user.cc mariadb-10.3-10.3.22/storage/perfschema/cursor_by_user.cc
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_user.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_user.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/cursor_by_user.h mariadb-10.3-10.3.22/storage/perfschema/cursor_by_user.h
--- mariadb-10.3-10.3.18/storage/perfschema/cursor_by_user.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/cursor_by_user.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/gen_pfs_lex_token.cc mariadb-10.3-10.3.22/storage/perfschema/gen_pfs_lex_token.cc
--- mariadb-10.3-10.3.18/storage/perfschema/gen_pfs_lex_token.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/gen_pfs_lex_token.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2,13 +2,20 @@
    Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
 
    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 Foundation; version 2 of the License.
+   it under the terms of the GNU General Public License, version 2.0,
+   as published by the Free Software Foundation.
+
+   This program is also distributed with certain software (including
+   but not limited to OpenSSL) that is licensed under separate terms,
+   as designated in a particular file or component or in included license
+   documentation.  The authors of MySQL hereby grant you an additional
+   permission to link the program and your derivative works with the
+   separately licensed software that they have included with MySQL.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU General Public License, version 2.0, for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/ha_perfschema.cc mariadb-10.3-10.3.22/storage/perfschema/ha_perfschema.cc
--- mariadb-10.3-10.3.18/storage/perfschema/ha_perfschema.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/ha_perfschema.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/ha_perfschema.h mariadb-10.3-10.3.22/storage/perfschema/ha_perfschema.h
--- mariadb-10.3-10.3.18/storage/perfschema/ha_perfschema.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/ha_perfschema.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs.cc mariadb-10.3-10.3.22/storage/perfschema/pfs.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs.h mariadb-10.3-10.3.22/storage/perfschema/pfs.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_account.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_account.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_account.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_account.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_account.h mariadb-10.3-10.3.22/storage/perfschema/pfs_account.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_account.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_account.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_atomic.h mariadb-10.3-10.3.22/storage/perfschema/pfs_atomic.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_atomic.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_atomic.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_autosize.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_autosize.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_autosize.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_autosize.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_column_types.h mariadb-10.3-10.3.22/storage/perfschema/pfs_column_types.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_column_types.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_column_types.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_column_values.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_column_values.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_column_values.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_column_values.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_column_values.h mariadb-10.3-10.3.22/storage/perfschema/pfs_column_values.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_column_values.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_column_values.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_con_slice.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_con_slice.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_con_slice.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_con_slice.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_con_slice.h mariadb-10.3-10.3.22/storage/perfschema/pfs_con_slice.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_con_slice.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_con_slice.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_defaults.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_defaults.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_defaults.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_defaults.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_defaults.h mariadb-10.3-10.3.22/storage/perfschema/pfs_defaults.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_defaults.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_defaults.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_digest.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_digest.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_digest.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_digest.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_digest.h mariadb-10.3-10.3.22/storage/perfschema/pfs_digest.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_digest.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_digest.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_engine_table.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_engine_table.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_engine_table.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_engine_table.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_engine_table.h mariadb-10.3-10.3.22/storage/perfschema/pfs_engine_table.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_engine_table.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_engine_table.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events.h mariadb-10.3-10.3.22/storage/perfschema/pfs_events.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events_stages.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_events_stages.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events_stages.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events_stages.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events_stages.h mariadb-10.3-10.3.22/storage/perfschema/pfs_events_stages.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events_stages.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events_stages.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events_statements.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_events_statements.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events_statements.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events_statements.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events_statements.h mariadb-10.3-10.3.22/storage/perfschema/pfs_events_statements.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events_statements.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events_statements.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events_waits.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_events_waits.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events_waits.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events_waits.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_events_waits.h mariadb-10.3-10.3.22/storage/perfschema/pfs_events_waits.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_events_waits.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_events_waits.h	2020-01-26 18:37:29.000000000 +0000
@@ -2,13 +2,20 @@
    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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_global.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_global.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_global.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_global.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_global.h mariadb-10.3-10.3.22/storage/perfschema/pfs_global.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_global.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_global.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_host.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_host.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_host.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_host.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_host.h mariadb-10.3-10.3.22/storage/perfschema/pfs_host.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_host.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_host.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_instr.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_instr.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_instr.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_instr.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_instr.h mariadb-10.3-10.3.22/storage/perfschema/pfs_instr.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_instr.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_instr.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_instr_class.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_instr_class.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_instr_class.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_instr_class.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_instr_class.h mariadb-10.3-10.3.22/storage/perfschema/pfs_instr_class.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_instr_class.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_instr_class.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_lock.h mariadb-10.3-10.3.22/storage/perfschema/pfs_lock.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_lock.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_lock.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_server.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_server.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_server.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_server.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_server.h mariadb-10.3-10.3.22/storage/perfschema/pfs_server.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_server.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_server.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_actor.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_actor.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_actor.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_actor.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_actor.h mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_actor.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_actor.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_actor.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_object.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_object.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_object.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_object.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_object.h mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_object.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_setup_object.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_setup_object.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_stat.h mariadb-10.3-10.3.22/storage/perfschema/pfs_stat.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_stat.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_stat.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_timer.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_timer.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_timer.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_timer.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_timer.h mariadb-10.3-10.3.22/storage/perfschema/pfs_timer.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_timer.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_timer.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
@@ -100,7 +107,7 @@
 extern enum_timer_name statement_timer;
 /**
   Timer information data.
-  Characteristics about each suported timer.
+  Characteristics about each supported timer.
 */
 extern MYSQL_PLUGIN_IMPORT MY_TIMER_INFO sys_timer_info;
 
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_user.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_user.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_user.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_user.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_user.h mariadb-10.3-10.3.22/storage/perfschema/pfs_user.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_user.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_user.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_visitor.cc mariadb-10.3-10.3.22/storage/perfschema/pfs_visitor.cc
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_visitor.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_visitor.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/pfs_visitor.h mariadb-10.3-10.3.22/storage/perfschema/pfs_visitor.h
--- mariadb-10.3-10.3.18/storage/perfschema/pfs_visitor.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/pfs_visitor.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_accounts.cc mariadb-10.3-10.3.22/storage/perfschema/table_accounts.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_accounts.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_accounts.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_accounts.h mariadb-10.3-10.3.22/storage/perfschema/table_accounts.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_accounts.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_accounts.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_all_instr.cc mariadb-10.3-10.3.22/storage/perfschema/table_all_instr.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_all_instr.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_all_instr.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_all_instr.h mariadb-10.3-10.3.22/storage/perfschema/table_all_instr.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_all_instr.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_all_instr.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_account_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_account_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_account_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_account_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_account_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_account_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_account_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_account_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_host_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_host_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_host_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_host_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_host_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_host_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_host_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_host_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_thread_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_thread_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_thread_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_thread_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_thread_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_thread_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_thread_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_thread_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_user_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_user_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_user_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_user_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_user_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_user_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_by_user_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_by_user_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_global_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esgs_global_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_global_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_global_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esgs_global_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esgs_global_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esgs_global_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esgs_global_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_account_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_account_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_account_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_account_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_account_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_account_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_account_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_account_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_digest.cc mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_digest.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_digest.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_digest.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_digest.h mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_digest.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_digest.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_digest.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_host_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_host_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_host_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_host_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_host_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_host_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_host_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_host_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_thread_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_thread_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_thread_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_thread_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_thread_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_thread_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_thread_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_thread_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_user_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_user_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_user_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_user_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_user_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_user_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_by_user_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_by_user_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_global_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_esms_global_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_global_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_global_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_esms_global_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_esms_global_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_esms_global_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_esms_global_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_stages.cc mariadb-10.3-10.3.22/storage/perfschema/table_events_stages.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_stages.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_stages.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_stages.h mariadb-10.3-10.3.22/storage/perfschema/table_events_stages.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_stages.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_stages.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_statements.cc mariadb-10.3-10.3.22/storage/perfschema/table_events_statements.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_statements.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_statements.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_statements.h mariadb-10.3-10.3.22/storage/perfschema/table_events_statements.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_statements.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_statements.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_waits.cc mariadb-10.3-10.3.22/storage/perfschema/table_events_waits.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_waits.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_waits.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_waits.h mariadb-10.3-10.3.22/storage/perfschema/table_events_waits.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_waits.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_waits.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_waits_summary.cc mariadb-10.3-10.3.22/storage/perfschema/table_events_waits_summary.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_waits_summary.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_waits_summary.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_events_waits_summary.h mariadb-10.3-10.3.22/storage/perfschema/table_events_waits_summary.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_events_waits_summary.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_events_waits_summary.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_account_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_account_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_account_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_account_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_account_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_account_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_account_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_account_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_host_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_host_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_host_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_host_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_host_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_host_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_host_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_host_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_thread_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_thread_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_thread_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_thread_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_thread_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_thread_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_thread_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_thread_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_user_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_user_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_user_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_user_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_user_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_user_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_by_user_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_by_user_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_global_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_ews_global_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_global_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_global_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_ews_global_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_ews_global_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_ews_global_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_ews_global_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_file_instances.cc mariadb-10.3-10.3.22/storage/perfschema/table_file_instances.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_file_instances.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_file_instances.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_file_instances.h mariadb-10.3-10.3.22/storage/perfschema/table_file_instances.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_file_instances.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_file_instances.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_instance.cc mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_instance.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_instance.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_instance.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_instance.h mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_instance.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_file_summary_by_instance.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_file_summary_by_instance.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011 Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_helper.cc mariadb-10.3-10.3.22/storage/perfschema/table_helper.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_helper.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_helper.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_helper.h mariadb-10.3-10.3.22/storage/perfschema/table_helper.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_helper.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_helper.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_host_cache.cc mariadb-10.3-10.3.22/storage/perfschema/table_host_cache.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_host_cache.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_host_cache.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_host_cache.h mariadb-10.3-10.3.22/storage/perfschema/table_host_cache.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_host_cache.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_host_cache.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_hosts.cc mariadb-10.3-10.3.22/storage/perfschema/table_hosts.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_hosts.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_hosts.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_hosts.h mariadb-10.3-10.3.22/storage/perfschema/table_hosts.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_hosts.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_hosts.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_os_global_by_type.cc mariadb-10.3-10.3.22/storage/perfschema/table_os_global_by_type.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_os_global_by_type.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_os_global_by_type.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_os_global_by_type.h mariadb-10.3-10.3.22/storage/perfschema/table_os_global_by_type.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_os_global_by_type.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_os_global_by_type.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_performance_timers.cc mariadb-10.3-10.3.22/storage/perfschema/table_performance_timers.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_performance_timers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_performance_timers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_performance_timers.h mariadb-10.3-10.3.22/storage/perfschema/table_performance_timers.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_performance_timers.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_performance_timers.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_session_account_connect_attrs.cc mariadb-10.3-10.3.22/storage/perfschema/table_session_account_connect_attrs.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_session_account_connect_attrs.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_session_account_connect_attrs.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_session_account_connect_attrs.h mariadb-10.3-10.3.22/storage/perfschema/table_session_account_connect_attrs.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_session_account_connect_attrs.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_session_account_connect_attrs.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_session_connect.cc mariadb-10.3-10.3.22/storage/perfschema/table_session_connect.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_session_connect.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_session_connect.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_session_connect.h mariadb-10.3-10.3.22/storage/perfschema/table_session_connect.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_session_connect.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_session_connect.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_session_connect_attrs.cc mariadb-10.3-10.3.22/storage/perfschema/table_session_connect_attrs.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_session_connect_attrs.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_session_connect_attrs.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_session_connect_attrs.h mariadb-10.3-10.3.22/storage/perfschema/table_session_connect_attrs.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_session_connect_attrs.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_session_connect_attrs.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_actors.cc mariadb-10.3-10.3.22/storage/perfschema/table_setup_actors.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_actors.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_actors.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_actors.h mariadb-10.3-10.3.22/storage/perfschema/table_setup_actors.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_actors.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_actors.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_consumers.cc mariadb-10.3-10.3.22/storage/perfschema/table_setup_consumers.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_consumers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_consumers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_consumers.h mariadb-10.3-10.3.22/storage/perfschema/table_setup_consumers.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_consumers.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_consumers.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_instruments.cc mariadb-10.3-10.3.22/storage/perfschema/table_setup_instruments.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_instruments.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_instruments.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_instruments.h mariadb-10.3-10.3.22/storage/perfschema/table_setup_instruments.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_instruments.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_instruments.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_objects.cc mariadb-10.3-10.3.22/storage/perfschema/table_setup_objects.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_objects.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_objects.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_objects.h mariadb-10.3-10.3.22/storage/perfschema/table_setup_objects.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_objects.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_objects.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_timers.cc mariadb-10.3-10.3.22/storage/perfschema/table_setup_timers.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_timers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_timers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_setup_timers.h mariadb-10.3-10.3.22/storage/perfschema/table_setup_timers.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_setup_timers.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_setup_timers.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_socket_instances.cc mariadb-10.3-10.3.22/storage/perfschema/table_socket_instances.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_socket_instances.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_socket_instances.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_socket_instances.h mariadb-10.3-10.3.22/storage/perfschema/table_socket_instances.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_socket_instances.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_socket_instances.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_event_name.cc mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_event_name.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_event_name.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_event_name.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_event_name.h mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_event_name.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_event_name.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_event_name.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_instance.cc mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_instance.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_instance.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_instance.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_instance.h mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_instance.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_socket_summary_by_instance.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_socket_summary_by_instance.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_sync_instances.cc mariadb-10.3-10.3.22/storage/perfschema/table_sync_instances.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_sync_instances.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_sync_instances.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_sync_instances.h mariadb-10.3-10.3.22/storage/perfschema/table_sync_instances.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_sync_instances.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_sync_instances.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_threads.cc mariadb-10.3-10.3.22/storage/perfschema/table_threads.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_threads.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_threads.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_threads.h mariadb-10.3-10.3.22/storage/perfschema/table_threads.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_threads.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_threads.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_index_usage.cc mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_index_usage.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_index_usage.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_index_usage.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_index_usage.h mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_index_usage.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_index_usage.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_index_usage.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_table.cc mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_table.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_table.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_table.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_table.h mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_table.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_tiws_by_table.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_tiws_by_table.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_tlws_by_table.cc mariadb-10.3-10.3.22/storage/perfschema/table_tlws_by_table.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_tlws_by_table.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_tlws_by_table.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_tlws_by_table.h mariadb-10.3-10.3.22/storage/perfschema/table_tlws_by_table.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_tlws_by_table.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_tlws_by_table.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_users.cc mariadb-10.3-10.3.22/storage/perfschema/table_users.cc
--- mariadb-10.3-10.3.18/storage/perfschema/table_users.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_users.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/table_users.h mariadb-10.3-10.3.22/storage/perfschema/table_users.h
--- mariadb-10.3-10.3.18/storage/perfschema/table_users.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/table_users.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/CMakeLists.txt mariadb-10.3-10.3.22/storage/perfschema/unittest/CMakeLists.txt
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
-# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
 #
 # 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 Foundation; version 2 of the License.
+# it under the terms of the GNU General Public License, version 2.0,
+# as published by the Free Software Foundation.
+#
+# This program is also distributed with certain software (including
+# but not limited to OpenSSL) that is licensed under separate terms,
+# as designated in a particular file or component or in included license
+# documentation.  The authors of MySQL hereby grant you an additional
+# permission to link the program and your derivative works with the
+# separately licensed software that they have included with MySQL.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# GNU General Public License, version 2.0, for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/conf.txt mariadb-10.3-10.3.22/storage/perfschema/unittest/conf.txt
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/conf.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/conf.txt	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 # Copyright (c) 2009, 2010, 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
-# the Free Software Foundation; version 2 of the License.
+# it under the terms of the GNU General Public License, version 2.0,
+# as published by the Free Software Foundation.
+#
+# This program is also distributed with certain software (including
+# but not limited to OpenSSL) that is licensed under separate terms,
+# as designated in a particular file or component or in included license
+# documentation.  The authors of MySQL hereby grant you an additional
+# permission to link the program and your derivative works with the
+# separately licensed software that they have included with MySQL.
 #
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# GNU General Public License, version 2.0, for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_account-oom-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_account-oom-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_account-oom-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_account-oom-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_connect_attr-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_connect_attr-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_connect_attr-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_connect_attr-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_host-oom-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_host-oom-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_host-oom-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_host-oom-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr-oom-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr-oom-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr-oom-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr-oom-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr_class-oom-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr_class-oom-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr_class-oom-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr_class-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr_class-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_instr_class-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_instr_class-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_misc-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_misc-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_misc-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_misc-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_server_stubs.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_server_stubs.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_server_stubs.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_server_stubs.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_timer-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_timer-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_timer-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_timer-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_user-oom-t.cc mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_user-oom-t.cc
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/pfs_user-oom-t.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/pfs_user-oom-t.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/stub_pfs_defaults.h mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_pfs_defaults.h
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/stub_pfs_defaults.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_pfs_defaults.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/stub_pfs_global.h mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_pfs_global.h
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/stub_pfs_global.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_pfs_global.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/perfschema/unittest/stub_print_error.h mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_print_error.h
--- mariadb-10.3-10.3.18/storage/perfschema/unittest/stub_print_error.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/perfschema/unittest/stub_print_error.h	2020-01-26 18:37:29.000000000 +0000
@@ -1,13 +1,20 @@
 /* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
 
   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 Foundation; version 2 of the License.
+  it under the terms of the GNU General Public License, version 2.0,
+  as published by the Free Software Foundation.
+
+  This program is also distributed with certain software (including
+  but not limited to OpenSSL) that is licensed under separate terms,
+  as designated in a particular file or component or in included license
+  documentation.  The authors of MySQL hereby grant you an additional
+  permission to link the program and your derivative works with the
+  separately licensed software that they have included with MySQL.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
+  GNU General Public License, version 2.0, for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/CMakeLists.txt mariadb-10.3-10.3.22/storage/rocksdb/CMakeLists.txt
--- mariadb-10.3-10.3.18/storage/rocksdb/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -257,7 +257,7 @@
 INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/myrocks_hotbackup COMPONENT rocksdb-engine)
 
 IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mysql_ldb PROPERTIES COMPILE_FLAGS -frtti)
+  SET_TARGET_PROPERTIES(rocksdb_tools sst_dump mysql_ldb PROPERTIES COMPILE_FLAGS "-frtti -Wno-error")
 ENDIF()
 IF(MSVC)
   # RocksDB, the storage engine, overdoes "const" by adding
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/build_rocksdb.cmake mariadb-10.3-10.3.22/storage/rocksdb/build_rocksdb.cmake
--- mariadb-10.3-10.3.18/storage/rocksdb/build_rocksdb.cmake	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/build_rocksdb.cmake	2020-01-26 18:37:29.000000000 +0000
@@ -471,5 +471,5 @@
 ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES})
 target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS})
 IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -frtti")
+  set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -frtti -Wno-error")
 endif()
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/ha_rocksdb.cc mariadb-10.3-10.3.22/storage/rocksdb/ha_rocksdb.cc
--- mariadb-10.3-10.3.18/storage/rocksdb/ha_rocksdb.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/ha_rocksdb.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2306,6 +2306,8 @@
   bool m_is_delayed_snapshot = false;
   bool m_is_two_phase = false;
 
+  std::unordered_set modified_tables;
+
  private:
   /*
     Number of write operations this transaction had when we took the last
@@ -3001,6 +3003,26 @@
   virtual void start_tx() = 0;
   virtual void start_stmt() = 0;
 
+ protected:
+  // Non-virtual functions with actions to be done on transaction start and
+  // commit.
+  void on_commit() {
+    time_t tm;
+    tm = time(nullptr);
+    for (auto &it : modified_tables) {
+      it->m_update_time = tm;
+    }
+    modified_tables.clear();
+  }
+  void on_rollback() {
+    modified_tables.clear();
+  }
+ public:
+  // Inform the transaction that this table was modified
+  void log_table_write_op(Rdb_tbl_def *tbl) {
+    modified_tables.insert(tbl);
+  }
+
   void set_initial_savepoint() {
     /*
       Set the initial savepoint. If the first statement in the transaction
@@ -3185,7 +3207,9 @@
       goto error;
     }
 
+    on_commit();
   error:
+    on_rollback();
     /* Save the transaction object to be reused */
     release_tx();
 
@@ -3201,6 +3225,7 @@
 
  public:
   void rollback() override {
+    on_rollback();
     m_write_count = 0;
     m_insert_count = 0;
     m_update_count = 0;
@@ -3522,7 +3547,9 @@
       res = true;
       goto error;
     }
+    on_commit();
   error:
+    on_rollback();
     reset();
 
     m_write_count = 0;
@@ -3555,6 +3582,7 @@
   }
 
   void rollback() override {
+    on_rollback();
     m_write_count = 0;
     m_insert_count = 0;
     m_update_count = 0;
@@ -10335,6 +10363,8 @@
     row_info.tx->incr_insert_count();
   }
 
+  row_info.tx->log_table_write_op(m_tbl_def);
+
   if (do_bulk_commit(row_info.tx)) {
     DBUG_RETURN(HA_ERR_ROCKSDB_BULK_LOAD);
   }
@@ -10814,6 +10844,7 @@
   }
 
   tx->incr_delete_count();
+  tx->log_table_write_op(m_tbl_def);
 
   if (do_bulk_commit(tx)) {
     DBUG_RETURN(HA_ERR_ROCKSDB_BULK_LOAD);
@@ -11008,6 +11039,12 @@
         k->rec_per_key[j] = x;
       }
     }
+
+    stats.create_time = m_tbl_def->get_create_time();
+  }
+
+  if (flag & HA_STATUS_TIME) {
+    stats.update_time = m_tbl_def->m_update_time;
   }
 
   if (flag & HA_STATUS_ERRKEY) {
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/include/bulk_load.inc	2020-01-26 18:37:29.000000000 +0000
@@ -121,12 +121,12 @@
 --remove_file $file
 
 # Make sure row count index stats are correct
---replace_column 6 # 7 # 8 # 9 #
+--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
 SHOW TABLE STATUS WHERE name LIKE 't%';
 
 ANALYZE TABLE t1, t2, t3;
 
---replace_column 6 # 7 # 8 # 9 #
+--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
 SHOW TABLE STATUS WHERE name LIKE 't%';
 
 # Make sure all the data is there.
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/include/bulk_load_unsorted.inc	2020-01-26 18:37:29.000000000 +0000
@@ -121,12 +121,12 @@
 --remove_file $file
 
 # Make sure row count index stats are correct
---replace_column 6 # 7 # 8 # 9 #
+--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
 SHOW TABLE STATUS WHERE name LIKE 't%';
 
 ANALYZE TABLE t1, t2, t3;
 
---replace_column 6 # 7 # 8 # 9 #
+--replace_column 6 # 7 # 8 # 9 # 12 # 13 #
 SHOW TABLE STATUS WHERE name LIKE 't%';
 
 # Make sure all the data is there.
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load.result	2020-01-26 18:37:29.000000000 +0000
@@ -40,9 +40,9 @@
 set rocksdb_bulk_load=0;
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 ANALYZE TABLE t1, t2, t3;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -50,9 +50,9 @@
 test.t3	analyze	status	OK
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 select count(pk),count(a) from t1;
 count(pk)	count(a)
 2500000	2500000
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf.result	2020-01-26 18:37:29.000000000 +0000
@@ -40,9 +40,9 @@
 set rocksdb_bulk_load=0;
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 ANALYZE TABLE t1, t2, t3;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -50,9 +50,9 @@
 test.t3	analyze	status	OK
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 select count(pk),count(a) from t1;
 count(pk)	count(a)
 2500000	2500000
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_cf_and_data.result	2020-01-26 18:37:29.000000000 +0000
@@ -40,9 +40,9 @@
 set rocksdb_bulk_load=0;
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 ANALYZE TABLE t1, t2, t3;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -50,9 +50,9 @@
 test.t3	analyze	status	OK
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 select count(pk),count(a) from t1;
 count(pk)	count(a)
 2500000	2500000
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_rev_data.result	2020-01-26 18:37:29.000000000 +0000
@@ -40,9 +40,9 @@
 set rocksdb_bulk_load=0;
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 ANALYZE TABLE t1, t2, t3;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -50,9 +50,9 @@
 test.t3	analyze	status	OK
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_bin	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_bin	NULL	partitioned		0	N
 select count(pk),count(a) from t1;
 count(pk)	count(a)
 2500000	2500000
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted.result	2020-01-26 18:37:29.000000000 +0000
@@ -72,9 +72,9 @@
 set rocksdb_bulk_load=0;
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL	partitioned		0	N
 ANALYZE TABLE t1, t2, t3;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -82,9 +82,9 @@
 test.t3	analyze	status	OK
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL	partitioned		0	N
 select count(a),count(b) from t1;
 count(a)	count(b)
 2500000	2500000
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/bulk_load_unsorted_rev.result	2020-01-26 18:37:29.000000000 +0000
@@ -72,9 +72,9 @@
 set rocksdb_bulk_load=0;
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL	partitioned		0	N
 ANALYZE TABLE t1, t2, t3;
 Table	Op	Msg_type	Msg_text
 test.t1	analyze	status	OK
@@ -82,9 +82,9 @@
 test.t3	analyze	status	OK
 SHOW TABLE STATUS WHERE name LIKE 't%';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL	partitioned		0	N
+t1	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t2	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t3	ROCKSDB	10	Fixed	2500000	#	#	#	#	0	NULL	#	#	NULL	latin1_swedish_ci	NULL	partitioned		0	N
 select count(a),count(b) from t1;
 count(a)	count(b)
 2500000	2500000
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/group_min_max.result	2020-01-26 18:37:29.000000000 +0000
@@ -295,31 +295,31 @@
 1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,       max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	502	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1, max(c)            from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	502	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,       max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	753	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,min(c),max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	753	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,       max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	1004	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,min(c),max(c) from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	1004	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,min(c),max(c)      from t1 where a1 >= 'b' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,  max(c)           from t1 where a1 in ('a','b','d') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	753	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,       max(c) from t2 where a1 < 'd' group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	range	idx_t2_0,idx_t2_1,idx_t2_2	idx_t2_1	146	NULL	#	Using where; Using index for group-by
@@ -1599,10 +1599,10 @@
 1	SIMPLE	t1	range	NULL	idx_t1_1	163	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9'))  and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	502	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9'))  and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	502	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	251	Using where; Using index for group-by
 explain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	251	Using where; Using index for group-by
@@ -1805,10 +1805,10 @@
 1	SIMPLE	t1	index	NULL	idx_t1_2	147	NULL	1000	Using where; Using index
 explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'b';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	126	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	63	Using where; Using index for group-by
 explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'e';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	126	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	63	Using where; Using index for group-by
 explain select distinct a1,a2,b from t2;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	range	NULL	idx_t2_1	146	NULL	#	Using index for group-by
@@ -1828,10 +1828,10 @@
 1	SIMPLE	t2	index	NULL	idx_t2_2	146	NULL	1000	Using where; Using index
 explain select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'b';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	range	idx_t2_0,idx_t2_1,idx_t2_2	idx_t2_1	129	NULL	126	Using where; Using index for group-by
+1	SIMPLE	t2	range	idx_t2_0,idx_t2_1,idx_t2_2	idx_t2_1	129	NULL	63	Using where; Using index for group-by
 explain select distinct a1 from t2 where a1 in ('a', 'd') and a2 = 'e';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2	range	idx_t2_0,idx_t2_1,idx_t2_2	idx_t2_1	129	NULL	126	Using where; Using index for group-by
+1	SIMPLE	t2	range	idx_t2_0,idx_t2_1,idx_t2_2	idx_t2_1	129	NULL	63	Using where; Using index for group-by
 select distinct a1,a2,b from t1;
 a1	a2	b
 a	a	a
@@ -1975,10 +1975,10 @@
 1	SIMPLE	t1	range	NULL	idx_t1_1	147	NULL	251	Using where; Using index for group-by; Using temporary; Using filesort
 explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'b' group by a1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	126	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	63	Using where; Using index for group-by
 explain select distinct a1 from t1 where a1 in ('a', 'd') and a2 = 'e' group by a1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	126	Using where; Using index for group-by
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	63	Using where; Using index for group-by
 explain select distinct a1,a2,b from t2;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	range	NULL	idx_t2_1	146	NULL	#	Using index for group-by
@@ -2204,19 +2204,19 @@
 explain extended select a1,a2,min(b),max(b) from t1
 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	index	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	1000	100.00	Using where; Using index
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	1000	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,min(`test`.`t1`.`b`) AS `min(b)`,max(`test`.`t1`.`b`) AS `max(b)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`
 explain extended select a1,a2,b,min(c),max(c) from t1
 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	index	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_2	147	NULL	1000	100.00	Using where
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_2	130	NULL	1000	100.00	Using where
 Warnings:
 Note	1003	select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,min(`test`.`t1`.`c`) AS `min(c)`,max(`test`.`t1`.`c`) AS `max(c)` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
 explain extended select a1,a2,b,c from t1
 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (d > 'xy2') group by a1,a2,b,c;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	index	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	1000	100.00	Using where
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	1000	100.00	Using where
 Warnings:
 Note	1003	select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`d` > 'xy2' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`,`test`.`t1`.`c`
 explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') or (b < 'b') group by a1;
@@ -2233,7 +2233,7 @@
 1	SIMPLE	t2	index	NULL	idx_t2_1	163	NULL	1000	Using where; Using index
 explain extended select a1,a2,b from t1 where (a1 = 'b' or a1 = 'd' or a1 = 'a' or a1 = 'c') and (a2 > 'a') and (c > 'a111') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	index	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	163	NULL	1000	100.00	Using where; Using index
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	130	NULL	1000	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a1` = 'b' or `test`.`t1`.`a1` = 'd' or `test`.`t1`.`a1` = 'a' or `test`.`t1`.`a1` = 'c') and `test`.`t1`.`a2` > 'a' and `test`.`t1`.`c` > 'a111' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
 explain select a1,a2,min(b),c from t2 where (a2 = 'a') and (c = 'a111') group by a1;
@@ -2257,12 +2257,12 @@
 1	SIMPLE	t1	index	NULL	idx_t1_2	147	NULL	1000	Using index
 explain extended select a1,a2,count(a2) from t1 where (a1 > 'a') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	index	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_2	147	NULL	1000	100.00	Using where; Using index
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_2	65	NULL	1000	100.00	Using where; Using index
 Warnings:
 Note	1003	select `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,count(`test`.`t1`.`a2`) AS `count(a2)` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
 explain extended select sum(ord(a1)) from t1 where (a1 > 'a') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
-1	SIMPLE	t1	index	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_2	147	NULL	1000	100.00	Using where; Using index
+1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_2	65	NULL	1000	100.00	Using where; Using index
 Warnings:
 Note	1003	select sum(ord(`test`.`t1`.`a1`)) AS `sum(ord(a1))` from `test`.`t1` where `test`.`t1`.`a1` > 'a' group by `test`.`t1`.`a1`,`test`.`t1`.`a2`,`test`.`t1`.`b`
 explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'a' or b = 'b') group by a1;
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/innodb_i_s_tables_disabled.result	2020-01-26 18:37:29.000000000 +0000
@@ -79,7 +79,7 @@
 buffer_flush_adaptive_avg_time_est	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Estimated time (ms) spent for adaptive flushing recently.
 buffer_LRU_batch_flush_avg_time_est	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Estimated time (ms) spent for LRU batch flushing recently.
 buffer_flush_avg_time	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Avg time (ms) spent for flushing recently.
-buffer_flush_adaptive_avg_pass	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Numner of adaptive flushes passed during the recent Avg period.
+buffer_flush_adaptive_avg_pass	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Number of adaptive flushes passed during the recent Avg period.
 buffer_LRU_batch_flush_avg_pass	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Number of LRU batch flushes passed during the recent Avg period.
 buffer_flush_avg_pass	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Number of flushes passed during the recent Avg period.
 buffer_LRU_get_free_loops	buffer	0	NULL	NULL	NULL	0	NULL	NULL	NULL	NULL	NULL	NULL	NULL	disabled	counter	Total loops in LRU get free.
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/issue255.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/issue255.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/issue255.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/issue255.result	2020-01-26 18:37:29.000000000 +0000
@@ -2,7 +2,7 @@
 INSERT INTO t1 VALUES (5);
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	6	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	6	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 VALUES ('538647864786478647864');
 Warnings:
 Warning	1264	Out of range value for column 'pk' at row 1
@@ -12,7 +12,7 @@
 9223372036854775807
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	2	22	44	0	0	0	9223372036854775807	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	2	22	44	0	0	0	9223372036854775807	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 VALUES ();
 ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY'
 SELECT * FROM t1;
@@ -21,7 +21,7 @@
 9223372036854775807
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	9223372036854775807	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	9223372036854775807	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 VALUES ();
 ERROR 23000: Duplicate entry '9223372036854775807' for key 'PRIMARY'
 SELECT * FROM t1;
@@ -30,13 +30,13 @@
 9223372036854775807
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	9223372036854775807	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	9223372036854775807	#	#	NULL	latin1_swedish_ci	NULL			0	N
 DROP TABLE t1;
 CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT);
 INSERT INTO t1 VALUES (5);
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	6	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	6	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 VALUES (1000);
 Warnings:
 Warning	1264	Out of range value for column 'pk' at row 1
@@ -46,7 +46,7 @@
 127
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	127	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	127	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 VALUES ();
 ERROR 23000: Duplicate entry '127' for key 'PRIMARY'
 SELECT * FROM t1;
@@ -55,7 +55,7 @@
 127
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	127	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	127	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 VALUES ();
 ERROR 23000: Duplicate entry '127' for key 'PRIMARY'
 SELECT * FROM t1;
@@ -64,5 +64,5 @@
 127
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	127	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	#	Fixed	#	#	#	#	#	#	127	#	#	NULL	latin1_swedish_ci	NULL			0	N
 DROP TABLE t1;
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result	2020-01-26 18:37:29.000000000 +0000
@@ -1421,7 +1421,7 @@
 insert into t1 values (null),(null);
 show table status like 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	1000	0	#	0	0	0	3	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	1000	0	#	0	0	0	3	#	#	NULL	latin1_swedish_ci	NULL			0	N
 drop table t1;
 #
 # Fix Issue #4: Crash when using pseudo-unique keys
@@ -2594,7 +2594,7 @@
 INSERT INTO t1 VALUES(0),(-1),(0);
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	1000	0	0	0	0	0	3	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	1000	0	0	0	0	0	3	#	#	NULL	latin1_swedish_ci	NULL			0	N
 SELECT * FROM t1;
 a
 -1
@@ -2605,7 +2605,7 @@
 INSERT INTO t1 VALUES(0),(10),(0);
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	1000	0	0	0	0	0	12	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	1000	0	0	0	0	0	12	#	#	NULL	latin1_swedish_ci	NULL			0	N
 SELECT * FROM t1;
 a
 1
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/show_table_status.result	2020-01-26 18:37:29.000000000 +0000
@@ -7,12 +7,12 @@
 CREATE TABLE t3 (a INT, b CHAR(8), pk INT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8;
 SHOW TABLE STATUS WHERE name IN ( 't1', 't2', 't3' );
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t2	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
-t3	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	NULL	NULL	NULL	utf8_general_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t2	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
+t3	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	#	#	NULL	utf8_general_ci	NULL			0	N
 SHOW TABLE STATUS WHERE name LIKE 't2';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t2	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t2	ROCKSDB	10	Fixed	1000	#	#	0	0	0	NULL	#	#	NULL	latin1_swedish_ci	NULL			0	N
 DROP TABLE t1, t2, t3;
 CREATE DATABASE `db_new..............................................end`;
 USE `db_new..............................................end`;
@@ -22,3 +22,114 @@
 TABLE_SCHEMA	db_new..............................................end
 TABLE_NAME	t1_new..............................................end
 DROP DATABASE `db_new..............................................end`;
+#
+# MDEV-17171: Bug: RocksDB Tables do not have "Creation Date"
+#
+use test;
+create table t1 (a int) engine=rocksdb;
+select create_time is not null, update_time, check_time 
+from information_schema.tables where table_schema=database() and table_name='t1';
+create_time is not null	update_time	check_time
+1	NULL	NULL
+insert into t1 values (1);
+select create_time is not null, update_time is not null, check_time 
+from information_schema.tables where table_schema=database() and table_name='t1';
+create_time is not null	update_time is not null	check_time
+1	1	NULL
+flush tables;
+select create_time is not null, update_time is not null, check_time 
+from information_schema.tables where table_schema=database() and table_name='t1';
+create_time is not null	update_time is not null	check_time
+1	1	NULL
+select create_time, update_time into @create_tm, @update_tm
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+select sleep(3);
+sleep(3)
+0
+insert into t1 values (2);
+select 
+create_time=@create_tm /* should not change */ , 
+timestampdiff(second, @update_tm, update_time) > 2,
+check_time
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+create_time=@create_tm	1
+timestampdiff(second, @update_tm, update_time) > 2	1
+check_time	NULL
+#
+# Check how create_time survives ALTER TABLE.
+# First, an ALTER TABLE that re-creates the table:
+alter table t1 add b int;
+select
+create_time<>@create_tm /* should change */,
+create_time IS NOT NULL,
+update_time IS NULL
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+create_time<>@create_tm	1
+create_time IS NOT NULL	1
+update_time IS NULL	1
+insert into t1 values (5,5);
+select create_time, update_time into @create_tm, @update_tm
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+# Then, an in-place ALTER TABLE:
+select sleep(2);
+sleep(2)	0
+alter table t1 add key (a);
+# create_time will change as .frm file is rewritten:
+select
+create_time=@create_tm,
+update_time
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+create_time=@create_tm	0
+update_time	NULL
+# Check TRUNCATE TABLE
+insert into t1 values (10,10);
+select create_time, update_time into @create_tm, @update_tm
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+select sleep(2);
+sleep(2)	0
+truncate table t1;
+select
+create_time=@create_tm /* should not change */,
+update_time
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+create_time=@create_tm	1
+update_time	NULL
+#
+# Check what is left after server restart
+#
+drop table t1;
+create table t1 (a int);
+insert into t1 values (1);
+# Save t1's creation time
+create table t2 as
+select create_time
+from information_schema.tables
+where table_schema=database() and table_name='t1';
+select sleep(2);
+sleep(2)	0
+select
+create_time=(select create_time from t2)  /* should not change */,
+update_time
+from information_schema.tables
+where table_schema=database() and table_name='t1';
+create_time=(select create_time from t2)	1
+update_time	NULL
+drop table t1, t2;
+#
+# Check how it works for partitioned tables
+#
+create table t1 (pk int primary key) partition by hash(pk) partitions 2;
+insert into t1 values (1);
+select create_time IS NOT NULL , update_time IS NOT NULL
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+create_time IS NOT NULL	1
+update_time IS NOT NULL	1
+drop table t1;
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/truncate_table.result	2020-01-26 18:37:29.000000000 +0000
@@ -9,19 +9,19 @@
 CREATE TABLE t1 (a INT KEY AUTO_INCREMENT, c CHAR(8)) ENGINE=rocksdb;
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	1	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	1	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 (c) VALUES ('a'),('b'),('c');
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	4	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	4	#	#	NULL	latin1_swedish_ci	NULL			0	N
 TRUNCATE TABLE t1;
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	1	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	1	#	#	NULL	latin1_swedish_ci	NULL			0	N
 INSERT INTO t1 (c) VALUES ('d');
 SHOW TABLE STATUS LIKE 't1';
 Name	Engine	Version	Row_format	Rows	Avg_row_length	Data_length	Max_data_length	Index_length	Data_free	Auto_increment	Create_time	Update_time	Check_time	Collation	Checksum	Create_options	Comment	Max_index_length	Temporary
-t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	2	NULL	NULL	NULL	latin1_swedish_ci	NULL			0	N
+t1	ROCKSDB	10	Fixed	#	#	#	0	0	0	2	#	#	NULL	latin1_swedish_ci	NULL			0	N
 SELECT a,c FROM t1;
 a	c
 1	d
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/ttl_secondary_read_filtering.result mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/ttl_secondary_read_filtering.result
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/r/ttl_secondary_read_filtering.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/r/ttl_secondary_read_filtering.result	2020-01-26 18:37:29.000000000 +0000
@@ -101,6 +101,7 @@
 SELECT * FROM t1 FORCE INDEX (kb);
 a	b
 DROP TABLE t1;
+set global rocksdb_compact_cf= 'default';
 # Read filtering index scan tests (None of these queries should return any results)
 CREATE TABLE t1 (
 a int,
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/issue255.test mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/issue255.test
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/issue255.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/issue255.test	2020-01-26 18:37:29.000000000 +0000
@@ -3,24 +3,25 @@
 CREATE TABLE t1 (pk BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT);
 
 INSERT INTO t1 VALUES (5);
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 INSERT INTO t1 VALUES ('538647864786478647864');
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SELECT * FROM t1;
+--replace_column 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 --error ER_DUP_ENTRY
 INSERT INTO t1 VALUES ();
 SELECT * FROM t1;
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 --error ER_DUP_ENTRY
 INSERT INTO t1 VALUES ();
 SELECT * FROM t1;
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 DROP TABLE t1;
@@ -28,24 +29,24 @@
 CREATE TABLE t1 (pk TINYINT NOT NULL PRIMARY KEY AUTO_INCREMENT);
 
 INSERT INTO t1 VALUES (5);
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 INSERT INTO t1 VALUES (1000);
 SELECT * FROM t1;
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 --error ER_DUP_ENTRY
 INSERT INTO t1 VALUES ();
 SELECT * FROM t1;
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 --error ER_DUP_ENTRY
 INSERT INTO t1 VALUES ();
 SELECT * FROM t1;
---replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 #
+--replace_column 3 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 DROP TABLE t1;
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/lock_rows_not_exist.test mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/lock_rows_not_exist.test
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/lock_rows_not_exist.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/lock_rows_not_exist.test	2020-01-26 18:37:29.000000000 +0000
@@ -57,7 +57,7 @@
 --disable_parsing
 # 
 #  The following is commented out because RocksDB's Transaction API doesn't
-#  "support" READ COMMITED, in particular, it doesn't release row locks 
+#  "support" READ COMMITTED, in particular, it doesn't release row locks 
 #   after each statement. (MyRocks is able to request a new snapshot for 
 #  every statement, but this won't free the locks. TODO: Is the behavior
 #  that is tested below really needed?)
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/rocksdb.test	2020-01-26 18:37:29.000000000 +0000
@@ -1207,7 +1207,7 @@
 create table t1 (i int primary key auto_increment) engine=RocksDB;
 
 insert into t1 values (null),(null);
---replace_column 7 #
+--replace_column 7 # 12 # 13 #
 show table status like 't1';
 drop table t1;
 
@@ -1914,11 +1914,13 @@
 # value is 4 while MyRocks will show it as 3.
 CREATE TABLE t1(a INT AUTO_INCREMENT KEY);
 INSERT INTO t1 VALUES(0),(-1),(0);
+--replace_column 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 SELECT * FROM t1;
 DROP TABLE t1;
 CREATE TABLE t1(a INT AUTO_INCREMENT KEY);
 INSERT INTO t1 VALUES(0),(10),(0);
+--replace_column 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 SELECT * FROM t1;
 DROP TABLE t1;
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/show_table_status.test	2020-01-26 18:37:29.000000000 +0000
@@ -1,4 +1,5 @@
 --source include/have_rocksdb.inc
+--source include/have_partition.inc
 --source include/not_windows.inc # decorated database names  is too long, exceeded OS limits
 
 # 
@@ -25,7 +26,7 @@
 
 CREATE TABLE t3 (a INT, b CHAR(8), pk INT PRIMARY KEY) ENGINE=rocksdb CHARACTER SET utf8;
 
---replace_column 6 # 7 #
+--replace_column 6 # 7 # 12 # 13 #
 SHOW TABLE STATUS WHERE name IN ( 't1', 't2', 't3' );
 
 # Some statistics don't get updated as quickly.  The Data_length and
@@ -49,7 +50,7 @@
 
 # We expect the number of rows to be 10000. Data_len and Avg_row_len
 # may vary, depending on built-in compression library.
---replace_column 6 # 7 #
+--replace_column 6 # 7 # 12 # 13 #
 SHOW TABLE STATUS WHERE name LIKE 't2';
 DROP TABLE t1, t2, t3;
 
@@ -63,3 +64,112 @@
 INSERT INTO `t1_new..............................................end` VALUES (1);
 --query_vertical SELECT TABLE_SCHEMA, TABLE_NAME FROM information_schema.table_statistics WHERE TABLE_NAME = 't1_new..............................................end'
 DROP DATABASE `db_new..............................................end`;
+--echo #
+--echo # MDEV-17171: Bug: RocksDB Tables do not have "Creation Date"
+--echo #
+use test;
+create table t1 (a int) engine=rocksdb;
+
+select create_time is not null, update_time, check_time 
+from information_schema.tables where table_schema=database() and table_name='t1';
+
+insert into t1 values (1);
+select create_time is not null, update_time is not null, check_time 
+from information_schema.tables where table_schema=database() and table_name='t1';
+
+flush tables;
+select create_time is not null, update_time is not null, check_time 
+from information_schema.tables where table_schema=database() and table_name='t1';
+
+select create_time, update_time into @create_tm, @update_tm
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+select sleep(3);
+insert into t1 values (2);
+
+--vertical_results
+select 
+  create_time=@create_tm /* should not change */ , 
+  timestampdiff(second, @update_tm, update_time) > 2,
+  check_time
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+--echo #
+--echo # Check how create_time survives ALTER TABLE.
+--echo # First, an ALTER TABLE that re-creates the table:
+alter table t1 add b int;
+select
+  create_time<>@create_tm /* should change */,
+  create_time IS NOT NULL,
+  update_time IS NULL
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+insert into t1 values (5,5);
+
+select create_time, update_time into @create_tm, @update_tm
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+--echo # Then, an in-place ALTER TABLE:
+select sleep(2);
+alter table t1 add key (a);
+
+--echo # create_time will change as .frm file is rewritten:
+select
+  create_time=@create_tm,
+  update_time
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+--echo # Check TRUNCATE TABLE
+insert into t1 values (10,10);
+select create_time, update_time into @create_tm, @update_tm
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+select sleep(2);
+truncate table t1;
+
+select
+  create_time=@create_tm /* should not change */,
+  update_time
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+
+
+--echo #
+--echo # Check what is left after server restart
+--echo #
+drop table t1;
+create table t1 (a int);
+insert into t1 values (1);
+--echo # Save t1's creation time
+create table t2 as
+select create_time
+from information_schema.tables
+where table_schema=database() and table_name='t1';
+
+select sleep(2);
+--source include/restart_mysqld.inc
+
+select
+  create_time=(select create_time from t2)  /* should not change */,
+  update_time
+from information_schema.tables
+where table_schema=database() and table_name='t1';
+
+drop table t1, t2;
+
+--echo #
+--echo # Check how it works for partitioned tables
+--echo #
+create table t1 (pk int primary key) partition by hash(pk) partitions 2;
+insert into t1 values (1);
+
+select create_time IS NOT NULL , update_time IS NOT NULL
+from information_schema.tables 
+where table_schema=database() and table_name='t1';
+drop table t1;
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/truncate_table.test	2020-01-26 18:37:29.000000000 +0000
@@ -29,22 +29,22 @@
 CREATE TABLE t1 (a INT KEY AUTO_INCREMENT, c CHAR(8)) ENGINE=rocksdb;
 
 #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
---replace_column 5 # 6 # 7 #
+--replace_column 5 # 6 # 7 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 INSERT INTO t1 (c) VALUES ('a'),('b'),('c');
 #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
---replace_column 5 # 6 # 7 #
+--replace_column 5 # 6 # 7 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 TRUNCATE TABLE t1;
 #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
---replace_column 5 # 6 # 7 #
+--replace_column 5 # 6 # 7 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 INSERT INTO t1 (c) VALUES ('d');
 #--replace_column 2 # 3 # 4 # 5 # 6 # 7 # 8 # 9 # 10 # 12 # 13 # 14 # 15 # 16 # 17 # 18 #
---replace_column 5 # 6 # 7 #
+--replace_column 5 # 6 # 7 # 12 # 13 #
 SHOW TABLE STATUS LIKE 't1';
 
 --sorted_result
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test
--- mariadb-10.3-10.3.18/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/mysql-test/rocksdb/t/ttl_secondary_read_filtering.test	2020-01-26 18:37:29.000000000 +0000
@@ -121,6 +121,9 @@
 
 DROP TABLE t1;
 
+# Compact away the dropped data
+set global rocksdb_compact_cf= 'default';
+
 --echo # Read filtering index scan tests (None of these queries should return any results)
 CREATE TABLE t1 (
   a int,
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/rdb_datadic.cc mariadb-10.3-10.3.22/storage/rocksdb/rdb_datadic.cc
--- mariadb-10.3-10.3.18/storage/rocksdb/rdb_datadic.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/rdb_datadic.cc	2020-01-26 18:37:29.000000000 +0000
@@ -3592,6 +3592,26 @@
   return false;
 }
 
+time_t Rdb_tbl_def::get_create_time() {
+  time_t create_time = m_create_time;
+
+  if (create_time == CREATE_TIME_UNKNOWN) {
+    // Read it from the .frm file. It's not a problem if several threads do this
+    // concurrently
+    char path[FN_REFLEN];
+    snprintf(path, sizeof(path), "%s/%s/%s%s", mysql_data_home,
+             m_dbname.c_str(), m_tablename.c_str(), reg_ext);
+    unpack_filename(path,path);
+    MY_STAT f_stat;
+    if (my_stat(path, &f_stat, MYF(0)))
+      create_time = f_stat.st_ctime;
+    else
+      create_time = 0; // will be shown as SQL NULL
+    m_create_time = create_time;
+  }
+  return create_time;
+}
+
 // Length that each index flag takes inside the record.
 // Each index in the array maps to the enum INDEX_FLAG
 static const std::array index_flag_lengths = {
diff -Nru mariadb-10.3-10.3.18/storage/rocksdb/rdb_datadic.h mariadb-10.3-10.3.22/storage/rocksdb/rdb_datadic.h
--- mariadb-10.3-10.3.18/storage/rocksdb/rdb_datadic.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/rocksdb/rdb_datadic.h	2020-01-26 18:37:29.000000000 +0000
@@ -1092,17 +1092,20 @@
   Rdb_tbl_def &operator=(const Rdb_tbl_def &) = delete;
 
   explicit Rdb_tbl_def(const std::string &name)
-      : m_key_descr_arr(nullptr), m_hidden_pk_val(0), m_auto_incr_val(0) {
+      : m_key_descr_arr(nullptr), m_hidden_pk_val(0), m_auto_incr_val(0),
+        m_update_time(0), m_create_time(CREATE_TIME_UNKNOWN) {
     set_name(name);
   }
 
   Rdb_tbl_def(const char *const name, const size_t len)
-      : m_key_descr_arr(nullptr), m_hidden_pk_val(0), m_auto_incr_val(0) {
+      : m_key_descr_arr(nullptr), m_hidden_pk_val(0), m_auto_incr_val(0),
+        m_update_time(0), m_create_time(CREATE_TIME_UNKNOWN) {
     set_name(std::string(name, len));
   }
 
   explicit Rdb_tbl_def(const rocksdb::Slice &slice, const size_t pos = 0)
-      : m_key_descr_arr(nullptr), m_hidden_pk_val(0), m_auto_incr_val(0) {
+      : m_key_descr_arr(nullptr), m_hidden_pk_val(0), m_auto_incr_val(0),
+        m_update_time(0), m_create_time(CREATE_TIME_UNKNOWN) {
     set_name(std::string(slice.data() + pos, slice.size() - pos));
   }
 
@@ -1133,6 +1136,15 @@
   const std::string &base_tablename() const { return m_tablename; }
   const std::string &base_partition() const { return m_partition; }
   GL_INDEX_ID get_autoincr_gl_index_id();
+
+  time_t get_create_time();
+  std::atomic m_update_time; // in-memory only value
+
+ private:
+  const time_t CREATE_TIME_UNKNOWN= 1;
+  // CREATE_TIME_UNKNOWN means "didn't try to read, yet"
+  // 0 means "no data available"
+  std::atomic m_create_time;
 };
 
 /*
diff -Nru mariadb-10.3-10.3.18/storage/sequence/mysql-test/sequence/group_by.result mariadb-10.3-10.3.22/storage/sequence/mysql-test/sequence/group_by.result
--- mariadb-10.3-10.3.18/storage/sequence/mysql-test/sequence/group_by.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sequence/mysql-test/sequence/group_by.result	2020-01-26 18:37:29.000000000 +0000
@@ -97,3 +97,9 @@
 select count(NULL) from seq_1_to_3;
 count(NULL)
 0
+#
+# MDEV-20753: Sequence with limit 0 crashes server
+#
+select count(NULL) from seq_1_to_3 limit 0;
+count(NULL)
+# End of 10.3 tests
diff -Nru mariadb-10.3-10.3.18/storage/sequence/mysql-test/sequence/group_by.test mariadb-10.3-10.3.22/storage/sequence/mysql-test/sequence/group_by.test
--- mariadb-10.3-10.3.18/storage/sequence/mysql-test/sequence/group_by.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sequence/mysql-test/sequence/group_by.test	2020-01-26 18:37:29.000000000 +0000
@@ -49,3 +49,10 @@
 create temporary table t1 select * from seq_1_to_3;
 select count(NULL) from t1;
 select count(NULL) from seq_1_to_3;
+
+--echo #
+--echo # MDEV-20753: Sequence with limit 0 crashes server
+--echo #
+select count(NULL) from seq_1_to_3 limit 0;
+
+--echo # End of 10.3 tests
diff -Nru mariadb-10.3-10.3.18/storage/sphinx/ha_sphinx.cc mariadb-10.3-10.3.22/storage/sphinx/ha_sphinx.cc
--- mariadb-10.3-10.3.18/storage/sphinx/ha_sphinx.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sphinx/ha_sphinx.cc	2020-01-26 18:37:29.000000000 +0000
@@ -2163,7 +2163,7 @@
 #if MYSQL_VERSION_ID>=50515
 			struct addrinfo *hp = NULL;
 			tmp_errno = getaddrinfo ( sHost, NULL, NULL, &hp );
-			if ( !tmp_errno || !hp || !hp->ai_addr )
+			if ( tmp_errno || !hp || !hp->ai_addr )
 			{
 				bError = true;
 				if ( hp )
@@ -2190,8 +2190,9 @@
 			}
 
 #if MYSQL_VERSION_ID>=50515
-			memcpy ( &sin.sin_addr, hp->ai_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->ai_addrlen ) );
-			freeaddrinfo ( hp );
+			struct sockaddr_in *in = (sockaddr_in *)hp->ai_addr;
+			memcpy ( &sin.sin_addr, &in->sin_addr, Min ( sizeof(sin.sin_addr), sizeof(in->sin_addr) ) );
+ 			freeaddrinfo ( hp );
 #else
 			memcpy ( &sin.sin_addr, hp->h_addr, Min ( sizeof(sin.sin_addr), (size_t)hp->h_length ) );
 			my_gethostbyname_r_free();
@@ -3350,7 +3351,7 @@
 // Renames a table from one name to another from alter table call.
 //
 // If you do not implement this, the default rename_table() is called from
-// handler.cc and it will delete all files with the file extentions returned
+// handler.cc and it will delete all files with the file extensions returned
 // by bas_ext().
 //
 // Called from sql_table.cc by mysql_rename_table().
diff -Nru mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/disabled.def mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/disabled.def
--- mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/disabled.def	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/disabled.def	1970-01-01 00:00:00.000000000 +0000
@@ -1,2 +0,0 @@
-sphinx     : MDEV-10986, MDEV-10985
-union-5539 : MDEV-10986, MDEV-10985
diff -Nru mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/sphinx.result mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/sphinx.result
--- mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/sphinx.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/sphinx.result	2020-01-26 18:37:29.000000000 +0000
@@ -75,3 +75,23 @@
 1	2	test;range=meta.foo_count,100,500
 5	1	test;range=meta.foo_count,100,500
 drop table ts;
+#
+# MDEV-19205: Sphinx unable to connect using a host name
+#
+create table ts ( id bigint unsigned not null, w int not null, q varchar(255) not null, index(q) ) engine=sphinx connection="sphinx://localhost:SPHINXSEARCH_PORT/*";
+select * from ts where q=';filter=meta.foo_count,100';
+id	w	q
+1	1	;filter=meta.foo_count,100
+select * from ts where q='test;filter=meta.sub.int,7';
+id	w	q
+5	1	test;filter=meta.sub.int,7
+select * from ts where q=';filter=meta.sub.list[0],4';
+id	w	q
+select * from ts where q=';filter=meta.sub.list[1],4';
+id	w	q
+5	1	;filter=meta.sub.list[1],4
+select * from ts where q='test;range=meta.foo_count,100,500';
+id	w	q
+1	2	test;range=meta.foo_count,100,500
+5	1	test;range=meta.foo_count,100,500
+drop table ts;
diff -Nru mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/sphinx.test mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/sphinx.test
--- mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/sphinx.test	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/sphinx.test	2020-01-26 18:37:29.000000000 +0000
@@ -41,3 +41,16 @@
 select * from ts where q=';filter=meta.sub.list[1],4';
 select * from ts where q='test;range=meta.foo_count,100,500';
 drop table ts;
+
+--echo #
+--echo # MDEV-19205: Sphinx unable to connect using a host name
+--echo #
+
+--replace_result $SPHINXSEARCH_PORT SPHINXSEARCH_PORT
+eval create table ts ( id bigint unsigned not null, w int not null, q varchar(255) not null, index(q) ) engine=sphinx connection="sphinx://localhost:$SPHINXSEARCH_PORT/*";
+select * from ts where q=';filter=meta.foo_count,100';
+select * from ts where q='test;filter=meta.sub.int,7';
+select * from ts where q=';filter=meta.sub.list[0],4';
+select * from ts where q=';filter=meta.sub.list[1],4';
+select * from ts where q='test;range=meta.foo_count,100,500';
+drop table ts;
diff -Nru mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/suite.pm mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/suite.pm
--- mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/suite.pm	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/suite.pm	2020-01-26 18:37:29.000000000 +0000
@@ -23,6 +23,8 @@
 my $exe_sphinx_searchd = &locate_sphinx_binary('searchd');
 return "'searchd' binary not found" unless $exe_sphinx_searchd;
 
+my $sphinx_config= "$::opt_vardir/my_sphinx.conf";
+
 # Check for Sphinx engine
 
 return "SphinxSE not found" unless $ENV{HA_SPHINX_SO} or $::mysqld_variables{'sphinx'} eq "ON";
@@ -95,11 +97,38 @@
   &::mtr_verbose("Started $sphinx->{proc}");
 }
 
+sub wait_exp_backoff {
+  my $timeout= shift; # Seconds
+  my $start_wait= shift; # Seconds
+  my $scale_factor= shift;
+
+  $searchd_status= "$exe_sphinx_searchd --status" .
+                   " --config $sphinx_config > /dev/null 2>&1";
+
+  my $scale= $start_wait;
+  my $total_sleep= 0;
+  while (1) {
+    my $status = system($searchd_status);
+    if (not $status) {
+      return 0;
+    }
+    if ($total_sleep >= $timeout) {
+      last;
+    }
+
+    &::mtr_milli_sleep($scale * 1000);
+    $total_sleep+= $scale;
+    $scale*= $scale_factor;
+  }
+
+  &::mtr_warning("Getting a response from searchd timed out");
+  return 1
+}
+
 sub searchd_wait {
   my ($sphinx) = @_; # My::Config::Group
 
-  return not &::sleep_until_file_created($sphinx->value('pid_file'), 20,
-                                         $sphinx->{'proc'})
+  return wait_exp_backoff(30, 0.1, 2)
 }
 
 ############# declaration methods ######################
diff -Nru mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/union-5539.result mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/union-5539.result
--- mariadb-10.3-10.3.18/storage/sphinx/mysql-test/sphinx/union-5539.result	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/sphinx/mysql-test/sphinx/union-5539.result	2020-01-26 18:37:29.000000000 +0000
@@ -5,10 +5,12 @@
 2	1	;mode=extended2;limit=1000000;maxmatches=500
 3	1	;mode=extended2;limit=1000000;maxmatches=500
 4	1	;mode=extended2;limit=1000000;maxmatches=500
+5	1	;mode=extended2;limit=1000000;maxmatches=500
 SELECT a.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS b;
 id	w	query
 1	1	;mode=extended2;limit=1000000;maxmatches=500
 2	1	;mode=extended2;limit=1000000;maxmatches=500
 3	1	;mode=extended2;limit=1000000;maxmatches=500
 4	1	;mode=extended2;limit=1000000;maxmatches=500
+5	1	;mode=extended2;limit=1000000;maxmatches=500
 drop table ts;
diff -Nru mariadb-10.3-10.3.18/storage/spider/CMakeLists.txt mariadb-10.3-10.3.22/storage/spider/CMakeLists.txt
--- mariadb-10.3-10.3.18/storage/spider/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -55,6 +55,9 @@
     DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server
   )
   MYSQL_ADD_PLUGIN(spider ${SPIDER_SOURCES} STORAGE_ENGINE MODULE_ONLY MODULE_OUTPUT_NAME "ha_spider")
+  IF(NOT TARGET spider)
+    RETURN()
+  ENDIF()
 ENDIF()
 
 IF(ORACLE_INCLUDE_DIR AND ORACLE_OCI_LIBRARY)
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/include/select_by_null_deinit.inc mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/include/select_by_null_deinit.inc
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/include/select_by_null_deinit.inc	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/include/select_by_null_deinit.inc	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,11 @@
+--let $MASTER_1_COMMENT_2_1= $MASTER_1_COMMENT_2_1_BACKUP
+--let $CHILD2_1_DROP_TABLES= $CHILD2_1_DROP_TABLES_BACKUP
+--let $CHILD2_1_CREATE_TABLES= $CHILD2_1_CREATE_TABLES_BACKUP
+--let $CHILD2_1_SELECT_TABLES= $CHILD2_1_SELECT_TABLES_BACKUP
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/include/select_by_null_init.inc mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/include/select_by_null_init.inc
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/include/select_by_null_init.inc	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/include/select_by_null_init.inc	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,24 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source ../t/test_init.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--let $MASTER_1_COMMENT_2_1_BACKUP= $MASTER_1_COMMENT_2_1
+let $MASTER_1_COMMENT_2_1=
+  COMMENT='table "tbl_a", srv "s_2_1"';
+--let $CHILD2_1_DROP_TABLES_BACKUP= $CHILD2_1_DROP_TABLES
+let $CHILD2_1_DROP_TABLES=
+  DROP TABLE IF EXISTS tbl_a;
+--let $CHILD2_1_CREATE_TABLES_BACKUP= $CHILD2_1_CREATE_TABLES
+let $CHILD2_1_CREATE_TABLES=
+  CREATE TABLE tbl_a (
+    pkey int NOT NULL,
+    PRIMARY KEY (pkey)
+  ) $CHILD2_1_ENGINE $CHILD2_1_CHARSET;
+--let $CHILD2_1_SELECT_TABLES_BACKUP= $CHILD2_1_SELECT_TABLES
+let $CHILD2_1_SELECT_TABLES=
+  SELECT pkey FROM tbl_a ORDER BY pkey;
+let $CHILD2_1_SELECT_ARGUMENT1=
+  SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/r/select_by_null.result mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/r/select_by_null.result
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/r/select_by_null.result	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/r/select_by_null.result	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,90 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+this test is for MDEV-16279
+
+drop and create databases
+connection master_1;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table and insert
+connection child2_1;
+CHILD2_1_CREATE_TABLES
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+CREATE TABLE tbl_a (
+pkey int NOT NULL,
+PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+FLUSH TABLES;
+
+select test 1
+connection child2_1;
+TRUNCATE TABLE mysql.general_log;
+connection master_1;
+SELECT pkey FROM tbl_a WHERE NULL;
+pkey
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %';
+argument
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select %'
+SELECT pkey FROM tbl_a ORDER BY pkey;
+pkey
+0
+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
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+
+end of test
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/t/select_by_null.cnf mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/t/select_by_null.cnf
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/t/select_by_null.cnf	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/t/select_by_null.cnf	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,3 @@
+!include include/default_mysqld.cnf
+!include ../my_1_1.cnf
+!include ../my_2_1.cnf
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/bugfix/t/select_by_null.test	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,72 @@
+--source ../include/select_by_null_init.inc
+--echo
+--echo this test is for MDEV-16279
+--echo
+--echo drop and create databases
+
+--connection master_1
+--disable_warnings
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+
+--connection child2_1
+SET @old_log_output = @@global.log_output;
+SET GLOBAL log_output = 'TABLE,FILE';
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+--enable_warnings
+
+--echo
+--echo create table and insert
+
+--connection child2_1
+--disable_query_log
+echo CHILD2_1_CREATE_TABLES;
+eval $CHILD2_1_CREATE_TABLES;
+--enable_query_log
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+--disable_query_log
+echo CREATE TABLE tbl_a (
+    pkey int NOT NULL,
+    PRIMARY KEY (pkey)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE tbl_a (
+    pkey int NOT NULL,
+    PRIMARY KEY (pkey)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO tbl_a (pkey) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19);
+INSERT INTO tbl_a (pkey) VALUES (20),(21),(22),(23),(24),(25),(26),(27),(28),(29);
+FLUSH TABLES;
+
+--echo
+--echo select test 1
+
+--connection child2_1
+TRUNCATE TABLE mysql.general_log;
+
+--connection master_1
+SELECT pkey FROM tbl_a WHERE NULL;
+
+--connection child2_1
+eval $CHILD2_1_SELECT_ARGUMENT1;
+eval $CHILD2_1_SELECT_TABLES;
+
+--echo
+--echo deinit
+--disable_warnings
+
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+
+--connection child2_1
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+
+--enable_warnings
+--source ../include/select_by_null_deinit.inc
+--echo
+--echo end of test
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/r/pushdown_not_like.result mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/r/pushdown_not_like.result
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/r/pushdown_not_like.result	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/r/pushdown_not_like.result	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,63 @@
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+child3_1
+child3_2
+child3_3
+
+drop and create databases
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+CREATE DATABASE auto_test_remote;
+USE auto_test_remote;
+
+create table select test
+connection master_1;
+DROP TABLE IF EXISTS ta_l;
+CREATE TABLE ta_l (
+a INT,
+b CHAR(1),
+c DATETIME,
+PRIMARY KEY(a)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
+INSERT INTO ta_l (a, b, c) VALUES
+(1, 'a', '2018-11-01 10:21:39'),
+(2, 'b', '2015-06-30 23:59:59'),
+(3, 'c', '2013-11-01 01:01:01');
+
+spider not like bug fix test
+connection master_1;
+select * from ta_l where b not like 'a%';
+a	b	c
+2	b	2015-06-30 23:59:59
+3	c	2013-11-01 01:01:01
+connection child2_1;
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select%';
+argument
+select t0.`a` `a`,t0.`b` `b`,t0.`c` `c` from `auto_test_remote`.`ta_r` t0 where (t0.`b` not like 'a%')
+SELECT argument FROM mysql.general_log WHERE argument LIKE '%select%'
+
+deinit
+connection master_1;
+DROP DATABASE IF EXISTS auto_test_local;
+connection child2_1;
+DROP DATABASE IF EXISTS auto_test_remote;
+SET GLOBAL log_output = @old_log_output;
+for master_1
+for child2
+child2_1
+child2_2
+child2_3
+for child3
+child3_1
+child3_2
+child3_3
+
+end of test
diff -Nru mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/t/pushdown_not_like.test mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/t/pushdown_not_like.test
--- mariadb-10.3-10.3.18/storage/spider/mysql-test/spider/t/pushdown_not_like.test	1970-01-01 00:00:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/mysql-test/spider/t/pushdown_not_like.test	2020-01-26 18:37:29.000000000 +0000
@@ -0,0 +1,138 @@
+--disable_warnings
+--disable_query_log
+--disable_result_log
+--source test_init.inc
+--enable_result_log
+--enable_query_log
+
+
+--echo
+--echo drop and create databases
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+CREATE DATABASE auto_test_local;
+USE auto_test_local;
+if ($USE_CHILD_GROUP2)
+{
+  --connection child2_1
+  DROP DATABASE IF EXISTS auto_test_remote;
+  CREATE DATABASE auto_test_remote;
+  USE auto_test_remote;
+}
+--enable_warnings
+
+
+--echo
+--echo create table select test
+if ($USE_CHILD_GROUP2)
+{
+  if (!$OUTPUT_CHILD_GROUP2)
+  {
+    --disable_query_log
+    --disable_result_log
+  }
+  --connection child2_1
+  if ($OUTPUT_CHILD_GROUP2)
+  {
+    --disable_query_log
+    echo CHILD2_1_DROP_TABLES;
+    echo CHILD2_1_CREATE_TABLES;
+  }
+  --disable_warnings
+  eval $CHILD2_1_DROP_TABLES;
+  --enable_warnings
+  eval $CHILD2_1_CREATE_TABLES;
+  if ($OUTPUT_CHILD_GROUP2)
+  {
+    --enable_query_log
+  }
+  if ($USE_GENERAL_LOG)
+  {
+    SET @old_log_output = @@global.log_output;
+    TRUNCATE TABLE mysql.general_log;
+    set global log_output = 'TABLE';
+  }
+  if (!$OUTPUT_CHILD_GROUP2)
+  {
+    --enable_query_log
+    --enable_result_log
+  }
+}
+
+--connection master_1
+--disable_warnings
+DROP TABLE IF EXISTS ta_l;
+--enable_warnings
+--disable_query_log
+echo CREATE TABLE ta_l (
+  a INT,
+  b CHAR(1),
+  c DATETIME,
+  PRIMARY KEY(a)
+) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1;
+eval CREATE TABLE ta_l (
+  a INT,
+  b CHAR(1),
+  c DATETIME,
+  PRIMARY KEY(a)
+) $MASTER_1_ENGINE $MASTER_1_CHARSET $MASTER_1_COMMENT_2_1;
+--enable_query_log
+INSERT INTO ta_l (a, b, c) VALUES
+  (1, 'a', '2018-11-01 10:21:39'),
+  (2, 'b', '2015-06-30 23:59:59'),
+  (3, 'c', '2013-11-01 01:01:01');
+
+--echo
+--echo spider not like bug fix test
+if ($USE_CHILD_GROUP2)
+{
+  if (!$OUTPUT_CHILD_GROUP2)
+  {
+    --disable_query_log
+    --disable_result_log
+  }
+  --connection child2_1
+  if ($USE_GENERAL_LOG)
+  {
+    TRUNCATE TABLE mysql.general_log;
+  }
+  if (!$OUTPUT_CHILD_GROUP2)
+  {
+    --enable_query_log
+    --enable_result_log
+  }
+}
+
+--connection master_1
+select * from ta_l where b not like 'a%';
+if ($USE_CHILD_GROUP2)
+{
+  --connection child2_1
+  if ($USE_GENERAL_LOG)
+  {
+    SELECT argument FROM mysql.general_log WHERE argument LIKE '%select%';
+  }
+}
+
+
+--echo
+--echo deinit
+--disable_warnings
+--connection master_1
+DROP DATABASE IF EXISTS auto_test_local;
+if ($USE_CHILD_GROUP2)
+{
+  --connection child2_1
+  DROP DATABASE IF EXISTS auto_test_remote;
+  SET GLOBAL log_output = @old_log_output;
+}
+
+
+--disable_query_log
+--disable_result_log
+--source test_deinit.inc
+--enable_result_log
+--enable_query_log
+--enable_warnings
+--echo
+--echo end of test
diff -Nru mariadb-10.3-10.3.18/storage/spider/spd_db_include.h mariadb-10.3-10.3.22/storage/spider/spd_db_include.h
--- mariadb-10.3-10.3.18/storage/spider/spd_db_include.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/spd_db_include.h	2020-01-26 18:37:29.000000000 +0000
@@ -161,6 +161,8 @@
 #define SPIDER_SQL_IN_LEN (sizeof(SPIDER_SQL_IN_STR) - 1)
 #define SPIDER_SQL_NOT_IN_STR "not in("
 #define SPIDER_SQL_NOT_IN_LEN (sizeof(SPIDER_SQL_NOT_IN_STR) - 1)
+#define SPIDER_SQL_NOT_LIKE_STR "not like"
+#define SPIDER_SQL_NOT_LIKE_LEN (sizeof(SPIDER_SQL_NOT_LIKE_STR) - 1)
 #define SPIDER_SQL_AS_CHAR_STR " as char"
 #define SPIDER_SQL_AS_CHAR_LEN (sizeof(SPIDER_SQL_AS_CHAR_STR) - 1)
 #define SPIDER_SQL_CAST_STR "cast("
diff -Nru mariadb-10.3-10.3.18/storage/spider/spd_db_mysql.cc mariadb-10.3-10.3.22/storage/spider/spd_db_mysql.cc
--- mariadb-10.3-10.3.18/storage/spider/spd_db_mysql.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/spider/spd_db_mysql.cc	2020-01-26 18:37:29.000000000 +0000
@@ -4789,13 +4789,27 @@
     case Item_func::LE_FUNC:
     case Item_func::GE_FUNC:
     case Item_func::GT_FUNC:
-    case Item_func::LIKE_FUNC:
       if (str)
       {
         func_name = (char*) item_func->func_name();
         func_name_length = strlen(func_name);
       }
       break;
+    case Item_func::LIKE_FUNC:
+      if (str)
+      {
+         if (((Item_func_like *)item_func)->negated)
+         {
+            func_name = SPIDER_SQL_NOT_LIKE_STR;
+            func_name_length = SPIDER_SQL_NOT_LIKE_LEN;
+         }
+         else
+         {
+            func_name = (char*)item_func->func_name();
+            func_name_length = strlen(func_name);
+         }
+      }
+      break;
     default:
       THD *thd = spider->trx->thd;
       SPIDER_SHARE *share = spider->share;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/CMakeLists.txt mariadb-10.3-10.3.22/storage/tokudb/CMakeLists.txt
--- mariadb-10.3-10.3.18/storage/tokudb/CMakeLists.txt	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/CMakeLists.txt	2020-01-26 18:37:29.000000000 +0000
@@ -90,6 +90,7 @@
 MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-shadow")
 MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-vla" DEBUG)
 MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-implicit-fallthrough")
+MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-cpp" DEBUG)
 
 ############################################
 MARK_AS_ADVANCED(BUILDNAME)
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/DartConfig.cmake mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/DartConfig.cmake
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/DartConfig.cmake	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/DartConfig.cmake	1970-01-01 00:00:00.000000000 +0000
@@ -1,10 +0,0 @@
-if(BUILD_TESTING)
-  if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
-    # Valgrind on OSX 10.8 generally works but outputs some warning junk
-    # that is hard to parse out, so we'll just let it run alone
-    set(MEMORYCHECK_COMMAND "${TokuDB_SOURCE_DIR}/scripts/tokuvalgrind")
-  endif ()
-  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --soname-synonyms=somalloc=*tokuportability* --quiet --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,grep,*/grep,date,*/date,test,*/tokudb_dump,*/tdb-recover --trace-children-skip-by-arg=--only_create,--test,--no-shutdown,novalgrind" CACHE INTERNAL "options for valgrind")
-  set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
-  set(UPDATE_COMMAND "svn")
-endif()
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake	2020-01-26 18:37:29.000000000 +0000
@@ -1,39 +1,5 @@
 include(ExternalProject)
 
-if (CMAKE_PROJECT_NAME STREQUAL TokuDB)
-    ## add jemalloc with an external project
-    set(JEMALLOC_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/jemalloc" CACHE FILEPATH "Where to find jemalloc sources.")
-    if (EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
-        set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
-        option(JEMALLOC_DEBUG "Build jemalloc with --enable-debug." OFF)
-        if (JEMALLOC_DEBUG)
-            list(APPEND jemalloc_configure_opts --enable-debug)
-        endif ()
-        ExternalProject_Add(build_jemalloc
-            PREFIX jemalloc
-            SOURCE_DIR "${JEMALLOC_SOURCE_DIR}"
-            CONFIGURE_COMMAND
-                "${JEMALLOC_SOURCE_DIR}/configure" ${jemalloc_configure_opts}
-                "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc"
-        )
-
-        add_library(jemalloc STATIC IMPORTED GLOBAL)
-        set_target_properties(jemalloc PROPERTIES IMPORTED_LOCATION
-            "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc_pic.a")
-        add_dependencies(jemalloc build_jemalloc)
-        add_library(jemalloc_nopic STATIC IMPORTED GLOBAL)
-        set_target_properties(jemalloc_nopic PROPERTIES IMPORTED_LOCATION
-            "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib/libjemalloc.a")
-        add_dependencies(jemalloc_nopic build_jemalloc)
-
-        # detect when we are being built as a subproject
-        if (NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING)
-            install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/jemalloc/lib" DESTINATION .
-                COMPONENT tokukv_libs_extra)
-        endif ()
-    endif ()
-endif ()
-
 ## add lzma with an external project
 set(xz_configure_opts --with-pic --enable-static)
 if (APPLE)
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/cachetable/cachetable.cc	2020-01-26 18:37:29.000000000 +0000
@@ -225,6 +225,9 @@
 }
 
 void toku_set_cleaner_period (CACHETABLE ct, uint32_t new_period) {
+    if(force_recovery) {
+        return;
+    }
     ct->cl.set_period(new_period);
 }
 
@@ -3026,9 +3029,12 @@
 //
 ENSURE_POD(cleaner);
 
+extern uint force_recovery;
+
 int cleaner::init(uint32_t _cleaner_iterations, pair_list* _pl, CACHETABLE _ct) {
     // default is no cleaner, for now
     m_cleaner_cron_init = false;
+    if (force_recovery) return 0;
     int r = toku_minicron_setup(&m_cleaner_cron, 0, toku_cleaner_thread, this);
     if (r == 0) {
         m_cleaner_cron_init = true;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-cachetable-wrappers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -73,7 +73,7 @@
     enum cachetable_dirty dependent_dirty_bits[num_dependent_nodes];
     for (uint32_t i = 0; i < num_dependent_nodes; i++) {
         dependent_pairs[i] = dependent_nodes[i]->ct_pair;
-        dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty;
+        dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty();
     }
 
     toku_cachetable_put_with_dep_pairs(
@@ -253,7 +253,7 @@
             // written out, it would have to be dirtied.  That
             // requires a write lock, and a write lock requires you to
             // resolve checkpointing.
-            if (!node->dirty) {
+            if (!node->dirty()) {
                 toku_ft_bn_update_max_msn(node, max_msn_in_path, bfe->child_to_read);
             }
         }
@@ -280,7 +280,7 @@
     enum cachetable_dirty dependent_dirty_bits[num_dependent_nodes];
     for (uint32_t i = 0; i < num_dependent_nodes; i++) {
         dependent_pairs[i] = dependent_nodes[i]->ct_pair;
-        dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty;
+        dependent_dirty_bits[i] = (enum cachetable_dirty) dependent_nodes[i]->dirty();
     }
 
     int r = toku_cachetable_get_and_pin_with_dep_pairs(
@@ -333,7 +333,7 @@
 void toku_unpin_ftnode(FT ft, FTNODE node) {
     int r = toku_cachetable_unpin(ft->cf,
                                   node->ct_pair,
-                                  static_cast(node->dirty),
+                                  static_cast(node->dirty()),
                                   make_ftnode_pair_attr(node));
     invariant_zero(r);
 }
@@ -344,7 +344,7 @@
     int r = toku_cachetable_unpin(
         ft->cf,
         node->ct_pair,
-        (enum cachetable_dirty) node->dirty,
+        (enum cachetable_dirty) node->dirty(),
         make_invalid_pair_attr()
         );
     assert(r==0);
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-flusher.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-flusher.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-flusher.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-flusher.cc	2020-01-26 18:37:29.000000000 +0000
@@ -139,7 +139,7 @@
     // up to date.
     if (child->n_children > 1 && 
         child->height == 0 && 
-        !child->dirty) {
+        !child->dirty()) {
         for (int i = 0; i < child->n_children; ++i) {
             if (BP_STATE(child, i) == PT_AVAIL &&
                 node->max_msn_applied_to_node_on_disk.msn < BLB_MAX_MSN_APPLIED(child, i).msn) 
@@ -480,7 +480,7 @@
         }
     )
 
-    node->dirty = 1;
+    node->set_dirty();
 
     XREALLOC_N(node->n_children+1, node->bp);
     // Slide the children over.
@@ -662,8 +662,8 @@
     // The new node in the split inherits the oldest known reference xid
     B->oldest_referenced_xid_known = node->oldest_referenced_xid_known;
 
-    node->dirty = 1;
-    B->dirty = 1;
+    node->set_dirty();
+    B->set_dirty();
 }
 
 void
@@ -1003,8 +1003,8 @@
     paranoid_invariant(child->blocknum.b!=0);
     // VERIFY_NODE does not work off client thread as of now
     //VERIFY_NODE(t, child);
-    node->dirty = 1;
-    child->dirty = 1;
+    node->set_dirty();
+    child->set_dirty();
 
     BP_WORKDONE(node, childnum) = 0;  // this buffer is drained, no work has been done by its contents
     NONLEAF_CHILDINFO bnc = BNC(node, childnum);
@@ -1034,8 +1034,8 @@
     // TODO(leif): this is no longer the way in_memory_stats is
     // maintained. verify that it's ok to move this just before the unpin
     // and then do that.
-    a->dirty = 1;
-    b->dirty = 1;
+    a->set_dirty();
+    b->set_dirty();
 
     bn_data* a_last_bd = BLB_DATA(a, a->n_children-1);
     // this bool states if the last basement node in a has any items or not
@@ -1167,8 +1167,8 @@
     a->n_children = new_n_children;
     b->n_children = 0;
 
-    a->dirty = 1;
-    b->dirty = 1;
+    a->set_dirty();
+    b->set_dirty();
 
     *did_merge = true;
     *did_rebalance = false;
@@ -1211,7 +1211,7 @@
     toku_ftnode_assert_fully_in_memory(parent);
     toku_ftnode_assert_fully_in_memory(a);
     toku_ftnode_assert_fully_in_memory(b);
-    parent->dirty = 1;   // just to make sure
+    parent->set_dirty();   // just to make sure
     {
         MSN msna = a->max_msn_applied_to_node_on_disk;
         MSN msnb = b->max_msn_applied_to_node_on_disk;
@@ -1335,8 +1335,8 @@
             }
 
             paranoid_invariant(BP_BLOCKNUM(node, childnuma).b == childa->blocknum.b);
-            childa->dirty = 1;  // just to make sure
-            childb->dirty = 1;  // just to make sure
+            childa->set_dirty();  // just to make sure
+            childb->set_dirty();  // just to make sure
         } else {
             // flow will be inaccurate for a while, oh well.  the children
             // are leaves in this case so it's not a huge deal (we're
@@ -1345,7 +1345,7 @@
             // If we didn't merge the nodes, then we need the correct pivot.
             invariant_notnull(splitk.data);
             node->pivotkeys.replace_at(&splitk, childnuma);
-            node->dirty = 1;
+            node->set_dirty();
         }
         toku_destroy_dbt(&splitk);
     }
@@ -1369,7 +1369,7 @@
         call_flusher_thread_callback(ft_flush_aflter_merge);
 
         // unlock the parent
-        paranoid_invariant(node->dirty);
+        paranoid_invariant(node->dirty());
         toku_unpin_ftnode(ft, node);
     }
     else {
@@ -1377,7 +1377,7 @@
         call_flusher_thread_callback(ft_flush_aflter_rebalance);
 
         // unlock the parent
-        paranoid_invariant(node->dirty);
+        paranoid_invariant(node->dirty());
         toku_unpin_ftnode(ft, node);
         toku_unpin_ftnode(ft, childb);
     }
@@ -1439,9 +1439,9 @@
 
     // only do the following work if there is a flush to perform
     if (toku_bnc_n_entries(BNC(parent, childnum)) > 0 || parent->height == 1) {
-        if (!parent->dirty) {
+        if (!parent->dirty()) {
             dirtied++;
-            parent->dirty = 1;
+            parent->set_dirty();
         }
         // detach buffer
         BP_WORKDONE(parent, childnum) = 0;  // this buffer is drained, no work has been done by its contents
@@ -1486,9 +1486,9 @@
     // in the buffer to flush, and as a result, flushing is not necessary
     // and bnc is NULL
     if (bnc != NULL) {
-        if (!child->dirty) {
+        if (!child->dirty()) {
             dirtied++;
-            child->dirty = 1;
+            child->set_dirty();
         }
         // do the actual flush
         toku_bnc_flush_to_child(
@@ -1787,7 +1787,7 @@
     // read them back in, or just do the regular partial fetch.  If we
     // don't, that means fe->node is a parent, so we need to do this anyway.
     bring_node_fully_into_memory(fe->node,fe->ft);
-    fe->node->dirty = 1;
+    fe->node->set_dirty();
 
     struct flusher_advice fa;
     struct flush_status_update_extra fste;
@@ -1893,7 +1893,7 @@
             //
             // can detach buffer and unpin root here
             //
-            parent->dirty = 1;
+            parent->set_dirty();
             BP_WORKDONE(parent, childnum) = 0;  // this buffer is drained, no work has been done by its contents
             NONLEAF_CHILDINFO bnc = BNC(parent, childnum);
             NONLEAF_CHILDINFO new_bnc = toku_create_empty_nl();
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-internal.h mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-internal.h
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-internal.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-internal.h	2020-01-26 18:37:29.000000000 +0000
@@ -76,11 +76,30 @@
     FT_CHECKPOINT_INPROGRESS
 };
 
+extern "C" {
+extern uint force_recovery;
+}
+
+extern int writing_rollback;
+
 // The ft_header is not managed by the cachetable.  Instead, it hangs off the cachefile as userdata.
 struct ft_header {
     enum ft_type type;
 
-    int dirty;
+    int dirty_;
+
+    void set_dirty() {
+        if(force_recovery) assert(writing_rollback);
+        dirty_ = 1;
+    }
+
+    void clear_dirty() {
+        dirty_ = 0;
+    }
+
+    bool dirty() {
+        return dirty_;
+    }
 
     // Free-running counter incremented once per checkpoint (toggling LSB).
     // LSB indicates which header location is used on disk so this
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-ops.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-ops.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-ops.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-ops.cc	2020-01-26 18:37:29.000000000 +0000
@@ -656,7 +656,7 @@
         node->layout_version_read_from_disk;
     cloned_node->build_id = node->build_id;
     cloned_node->height = node->height;
-    cloned_node->dirty = node->dirty;
+    cloned_node->dirty_ = node->dirty_;
     cloned_node->fullhash = node->fullhash;
     cloned_node->n_children = node->n_children;
 
@@ -672,8 +672,8 @@
     toku_ftnode_clone_partitions(node, cloned_node);
 
     // clear dirty bit
-    node->dirty = 0;
-    cloned_node->dirty = 0;
+    node->clear_dirty();
+    cloned_node->clear_dirty();
     node->layout_version_read_from_disk = FT_LAYOUT_VERSION;
     // set new pair attr if necessary
     if (node->height == 0) {
@@ -742,7 +742,7 @@
                 // persisted, we need undo the logical row count adjustments as
                 // they may occur again in the future if/when the node is
                 // re-read from disk for another query or change.
-                if (!ftnode->dirty && !write_me) {
+                if (!ftnode->dirty() && !write_me) {
                     int64_t lrc_delta = 0;
                     for (int i = 0; i < ftnode->n_children; i++) {
                         if (BP_STATE(ftnode, i) == PT_AVAIL) {
@@ -847,8 +847,8 @@
     if (r == 0) {
         *sizep = make_ftnode_pair_attr(*node);
         (*node)->ct_pair = p;
-        *dirtyp = (*node)->dirty;  // deserialize could mark the node as dirty
-                                   // (presumably for upgrade)
+        *dirtyp = (*node)->dirty();  // deserialize could mark the node as dirty
+                                     // (presumably for upgrade)
     }
     return r;
 }
@@ -870,7 +870,7 @@
     paranoid_invariant(ftnode_pv != NULL);
     long bytes_to_free = 0;
     FTNODE node = static_cast(ftnode_pv);
-    if (node->dirty || node->height == 0 ||
+    if (node->dirty() || node->height == 0 ||
         node->layout_version_read_from_disk < FT_FIRST_LAYOUT_VERSION_WITH_BASEMENT_NODES) {
         *bytes_freed_estimate = 0;
         *cost = PE_CHEAP;
@@ -947,7 +947,7 @@
     void *pointers_to_free[node->n_children * 2];
 
     // Don't partially evict dirty nodes
-    if (node->dirty) {
+    if (node->dirty()) {
         goto exit;
     }
     // Don't partially evict nodes whose partitions can't be read back
@@ -1400,7 +1400,7 @@
     MSN msna = oldroot->max_msn_applied_to_node_on_disk;
     newroot->max_msn_applied_to_node_on_disk = msna;
     BP_STATE(newroot,0) = PT_AVAIL;
-    newroot->dirty = 1;
+    newroot->set_dirty();
 
     // Set the first child to have the new blocknum,
     // and then swap newroot with oldroot. The new root
@@ -1488,7 +1488,7 @@
     // mark the node as dirty.
     // enforcing invariant here.
     //
-    paranoid_invariant(node->dirty != 0);
+    paranoid_invariant(node->dirty() != 0);
 
     // update some status variables
     if (node->height != 0) {
@@ -1848,7 +1848,7 @@
                 }
             }
 
-            if (next_loc != NEITHER_EXTREME || child->dirty || toku_bnc_should_promote(ft, bnc)) {
+            if (next_loc != NEITHER_EXTREME || child->dirty() || toku_bnc_should_promote(ft, bnc)) {
                 push_something_in_subtree(ft, child, -1, msg, flow_deltas, gc_info, depth + 1, next_loc, false);
                 toku_sync_fetch_and_add(&bnc->flow[0], flow_deltas[0]);
                 // The recursive call unpinned the child, but
@@ -2803,9 +2803,9 @@
 }
 
 // open a file for use by the ft.  if the file does not exist, error
-static int ft_open_file(const char *fname, int *fdp) {
+static int ft_open_file(const char *fname, int *fdp, bool rw) {
     int fd;
-    fd = ft_open_maybe_direct(fname, O_RDWR | O_BINARY, file_mode);
+    fd = ft_open_maybe_direct(fname, (rw ? O_RDWR : O_RDONLY) | O_BINARY, file_mode);
     if (fd==-1) {
         return get_error_errno();
     }
@@ -2956,7 +2956,7 @@
 // The checkpointed version (checkpoint_lsn) of the dictionary must be no later than max_acceptable_lsn .
 // Requires: The multi-operation client lock must be held to prevent a checkpoint from occuring.
 static int
-ft_handle_open(FT_HANDLE ft_h, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn, FILENUM use_filenum, DICTIONARY_ID use_dictionary_id, LSN max_acceptable_lsn) {
+ft_handle_open(FT_HANDLE ft_h, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn, FILENUM use_filenum, DICTIONARY_ID use_dictionary_id, LSN max_acceptable_lsn, bool open_rw = true) {
     int r;
     bool txn_created = false;
     char *fname_in_cwd = NULL;
@@ -2978,7 +2978,7 @@
     fname_in_cwd = toku_cachetable_get_fname_in_cwd(cachetable, fname_in_env);
     {
         int fd = -1;
-        r = ft_open_file(fname_in_cwd, &fd);
+        r = ft_open_file(fname_in_cwd, &fd, open_rw);
         if (reserved_filenum.fileid == FILENUM_NONE.fileid) {
             reserved_filenum = toku_cachetable_reserve_filenum(cachetable);
         }
@@ -3124,15 +3124,15 @@
 // Open an ft in normal use.  The FILENUM and dict_id are assigned by the ft_handle_open() function.
 // Requires: The multi-operation client lock must be held to prevent a checkpoint from occuring.
 int
-toku_ft_handle_open(FT_HANDLE t, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn) {
+toku_ft_handle_open(FT_HANDLE t, const char *fname_in_env, int is_create, int only_create, CACHETABLE cachetable, TOKUTXN txn, bool open_rw) {
     int r;
-    r = ft_handle_open(t, fname_in_env, is_create, only_create, cachetable, txn, FILENUM_NONE, DICTIONARY_ID_NONE, MAX_LSN);
+    r = ft_handle_open(t, fname_in_env, is_create, only_create, cachetable, txn, FILENUM_NONE, DICTIONARY_ID_NONE, MAX_LSN, open_rw);
     return r;
 }
 
 // clone an ft handle. the cloned handle has a new dict_id but refers to the same fractal tree
 int 
-toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn) {
+toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn, bool open_rw) {
     FT_HANDLE result_ft_handle; 
     toku_ft_handle_create(&result_ft_handle);
 
@@ -3147,7 +3147,7 @@
     CACHEFILE cf = ft_handle->ft->cf;
     CACHETABLE ct = toku_cachefile_get_cachetable(cf);
     const char *fname_in_env = toku_cachefile_fname_in_env(cf);
-    int r = toku_ft_handle_open(result_ft_handle, fname_in_env, false, false, ct, txn); 
+    int r = toku_ft_handle_open(result_ft_handle, fname_in_env, false, false, ct, txn, open_rw);
     if (r != 0) {
         toku_ft_handle_close(result_ft_handle);
         result_ft_handle = NULL;
@@ -3548,7 +3548,7 @@
     int r = toku_cachetable_unpin_ct_prelocked_no_flush(
         ft_handle->ft->cf,
         node->ct_pair,
-        (enum cachetable_dirty) node->dirty,
+        (enum cachetable_dirty) node->dirty(),
         x->msgs_applied ? make_ftnode_pair_attr(node) : make_invalid_pair_attr()
         );
     assert_zero(r);
@@ -4970,6 +4970,14 @@
 }
 
 int toku_ft_layer_init(void) {
+    static bool ft_layer_init_started = false;
+
+    if(ft_layer_init_started) {
+        return 0;
+    }
+
+    ft_layer_init_started = true;
+
     int r = 0;
 
     // Portability must be initialized first
@@ -5000,6 +5008,14 @@
 }
 
 void toku_ft_layer_destroy(void) {
+    static bool ft_layer_destroy_started = false;
+
+    if(ft_layer_destroy_started) {
+        return;
+    }
+
+    ft_layer_destroy_started = true;
+
     toku_mutex_destroy(&ft_open_close_lock);
     toku_ft_serialize_layer_destroy();
     toku_checkpoint_destroy();
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-ops.h mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-ops.h
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-ops.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-ops.h	2020-01-26 18:37:29.000000000 +0000
@@ -125,12 +125,12 @@
 void toku_ft_set_update(FT_HANDLE ft_h, ft_update_func update_fun);
 
 int toku_ft_handle_open(FT_HANDLE, const char *fname_in_env,
-		  int is_create, int only_create, CACHETABLE ct, TOKUTXN txn)  __attribute__ ((warn_unused_result));
+		  int is_create, int only_create, CACHETABLE ct, TOKUTXN txn, bool open_rw=true)  __attribute__ ((warn_unused_result));
 int toku_ft_handle_open_recovery(FT_HANDLE, const char *fname_in_env, int is_create, int only_create, CACHETABLE ct, TOKUTXN txn, 
 			   FILENUM use_filenum, LSN max_acceptable_lsn)  __attribute__ ((warn_unused_result));
 
 // clone an ft handle. the cloned handle has a new dict_id but refers to the same fractal tree
-int toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn);
+int toku_ft_handle_clone(FT_HANDLE *cloned_ft_handle, FT_HANDLE ft_handle, TOKUTXN txn, bool open_rw=true);
 
 // close an ft handle during normal operation. the underlying ft may or may not close,
 // depending if there are still references. an lsn for this close will come from the logger.
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-recount-rows.cc	2020-01-26 18:37:29.000000000 +0000
@@ -98,7 +98,7 @@
     if (rre._cancelled == false) {
         // update ft count
         toku_unsafe_set(&ft->ft->in_memory_logical_rows, rre._keys);
-        ft->ft->h->dirty = 1;
+        ft->ft->h->set_dirty();
         ret = 0;
     }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-test-helpers.cc	2020-01-26 18:37:29.000000000 +0000
@@ -259,7 +259,7 @@
     // is directly queueing something in a FIFO instead of 
     // using ft APIs.
     node->max_msn_applied_to_node_on_disk = msn;
-    node->dirty = 1;
+    node->set_dirty();
     // Also hack max_msn_in_ft
     ft_handle->ft->h->max_msn_in_ft = msn;
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-verify.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-verify.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft-verify.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft-verify.cc	2020-01-26 18:37:29.000000000 +0000
@@ -512,7 +512,7 @@
     if (r == 0) {
         toku_ft_lock(ft_handle->ft);
         ft_handle->ft->h->time_of_last_verification = time(NULL);
-        ft_handle->ft->h->dirty = 1;
+        ft_handle->ft->h->set_dirty();
         toku_ft_unlock(ft_handle->ft);
     }
     return r;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft.cc	2020-01-26 18:37:29.000000000 +0000
@@ -61,7 +61,7 @@
     // (see cooperative use of dirty bit in ft_begin_checkpoint())
     toku_ft_lock(ft);
     ft->h->root_xid_that_created = new_root_xid_that_created;
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
@@ -147,7 +147,7 @@
     assert(ft->h->type == FT_CURRENT);
     assert(ft->checkpoint_header == NULL);
     ft_copy_for_checkpoint_unlocked(ft, checkpoint_lsn);
-    ft->h->dirty = 0;             // this is only place this bit is cleared        (in currentheader)
+    ft->h->clear_dirty();             // this is only place this bit is cleared        (in currentheader)
     ft->blocktable.note_start_checkpoint_unlocked();
     toku_ft_unlock (ft);
 }
@@ -186,7 +186,7 @@
     FT_HEADER ch = ft->checkpoint_header;
     assert(ch);
     assert(ch->type == FT_CHECKPOINT_INPROGRESS);
-    if (ch->dirty) {            // this is only place this bit is tested (in checkpoint_header)
+    if (ch->dirty()) {            // this is only place this bit is tested (in checkpoint_header)
         TOKULOGGER logger = toku_cachefile_logger(cf);
         if (logger) {
             toku_logger_fsync_if_lsn_not_fsynced(logger, ch->checkpoint_lsn);
@@ -201,7 +201,7 @@
                                                              
         // write translation and header to disk (or at least to OS internal buffer)
         toku_serialize_ft_to(fd, ch, &ft->blocktable, ft->cf);
-        ch->dirty = 0;                      // this is only place this bit is cleared (in checkpoint_header)
+        ch->clear_dirty();                      // this is only place this bit is cleared (in checkpoint_header)
         
         // fsync the cachefile
         toku_cachefile_fsync(cf);
@@ -255,7 +255,7 @@
                 toku_log_fclose(
                     logger,
                     &lsn,
-                    ft->h->dirty,
+                    ft->h->dirty(),
                     bs,
                     toku_cachefile_filenum(cachefile));  // flush the log on
                                                          // close (if new header
@@ -266,7 +266,7 @@
             }
         }
     }
-    if (ft->h->dirty) {               // this is the only place this bit is tested (in currentheader)
+    if (ft->h->dirty()) {               // this is the only place this bit is tested (in currentheader)
         bool do_checkpoint = true;
         if (logger && logger->rollback_cachefile == cachefile) {
             do_checkpoint = false;
@@ -275,7 +275,7 @@
             ft_begin_checkpoint(lsn, header_v);
             ft_checkpoint(cachefile, fd, ft);
             ft_end_checkpoint(cachefile, fd, header_v);
-            assert(!ft->h->dirty); // dirty bit should be cleared by begin_checkpoint and never set again (because we're closing the dictionary)
+            assert(!ft->h->dirty()); // dirty bit should be cleared by begin_checkpoint and never set again (because we're closing the dictionary)
         }
     }
 }
@@ -371,7 +371,7 @@
     uint64_t now = (uint64_t) time(NULL);
     struct ft_header h = {
         .type = FT_CURRENT,
-        .dirty = 0,
+        .dirty_ = 0,
         .checkpoint_count = 0,
         .checkpoint_lsn = ZERO_LSN,
         .layout_version = FT_LAYOUT_VERSION,
@@ -522,7 +522,7 @@
     toku_ft_lock(ft);
     ft->h->time_of_last_optimize_begin = now;
     ft->h->count_of_optimize_in_progress++;
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
@@ -546,7 +546,7 @@
         if (ft->h->count_of_optimize_in_progress == ft->h->count_of_optimize_in_progress_read_from_disk)
             ft->h->count_of_optimize_in_progress = 0;
     }
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
@@ -959,7 +959,7 @@
 void toku_ft_set_nodesize(FT ft, unsigned int nodesize) {
     toku_ft_lock(ft);
     ft->h->nodesize = nodesize;
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
@@ -972,7 +972,7 @@
 void toku_ft_set_basementnodesize(FT ft, unsigned int basementnodesize) {
     toku_ft_lock(ft);
     ft->h->basementnodesize = basementnodesize;
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
@@ -985,7 +985,7 @@
 void toku_ft_set_compression_method(FT ft, enum toku_compression_method method) {
     toku_ft_lock(ft);
     ft->h->compression_method = method;
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
@@ -998,7 +998,7 @@
 void toku_ft_set_fanout(FT ft, unsigned int fanout) {
     toku_ft_lock(ft);
     ft->h->fanout = fanout;
-    ft->h->dirty = 1;
+    ft->h->set_dirty();
     toku_ft_unlock(ft);
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft.h mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft.h
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/ft.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/ft.h	2020-01-26 18:37:29.000000000 +0000
@@ -184,11 +184,11 @@
 extern char toku_product_name[TOKU_MAX_PRODUCT_NAME_LENGTH];
 
 struct toku_product_name_strings_struct {
-    char db_version[sizeof(toku_product_name) + sizeof("1.2.3 build ") + 256];
-    char environmentdictionary[sizeof(toku_product_name) + sizeof(".environment")];
-    char fileopsdirectory[sizeof(toku_product_name) + sizeof(".directory")];
-    char single_process_lock[sizeof(toku_product_name) + sizeof("___lock_dont_delete_me")];
-    char rollback_cachefile[sizeof(toku_product_name) + sizeof(".rollback")];
+    char db_version[sizeof(toku_product_name) + sizeof("1.2.3 build ") + 256 + 1];
+    char environmentdictionary[sizeof(toku_product_name) + sizeof(".environment") + 1];
+    char fileopsdirectory[sizeof(toku_product_name) + sizeof(".directory") + 1];
+    char single_process_lock[sizeof(toku_product_name) + sizeof("___lock_dont_delete_me") + 1];
+    char rollback_cachefile[sizeof(toku_product_name) + sizeof(".rollback") + 1];
 };
 
 extern struct toku_product_name_strings_struct toku_product_name_strings;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/loader/loader.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/loader/loader.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/loader/loader.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/loader/loader.cc	2020-01-26 18:37:29.000000000 +0000
@@ -1350,7 +1350,7 @@
  * Arguments:
  *   dest    write the rows here
  *   a,b     the rows being merged
- *   an,bn   the lenth of a and b respectively.
+ *   an,bn   the length of a and b respectively.
  *   dest_db We need the dest_db to run the comparison function.
  *   compare We need the compare function for the dest_db.
  */
@@ -1449,7 +1449,7 @@
  * Arguments:
  *   dest    write the rows here
  *   a,b     the rows being merged
- *   an,bn   the lenth of a and b respectively.
+ *   an,bn   the length of a and b respectively.
  *   dest_db We need the dest_db to run the comparison function.
  *   compare We need the compare function for the dest_db.
  */
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/logger/logger.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/logger/logger.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/logger/logger.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/logger/logger.cc	2020-01-26 18:37:29.000000000 +0000
@@ -50,6 +50,8 @@
 
 #include "util/status.h"
 
+int writing_rollback = 0;
+
 static const int log_format_version = TOKU_LOG_VERSION;
 
 toku_instr_key *result_output_condition_lock_mutex_key;
@@ -232,6 +234,7 @@
 }
 
 int toku_logger_open_rollback(TOKULOGGER logger, CACHETABLE cachetable, bool create) {
+    writing_rollback++;
     assert(logger->is_open);
     assert(!logger->rollback_cachefile);
 
@@ -251,6 +254,7 @@
     } else {
         toku_ft_handle_close(ft_handle);
     }
+    writing_rollback--;
     return r;
 }
 
@@ -268,20 +272,20 @@
             FT CAST_FROM_VOIDP(ft, toku_cachefile_get_userdata(cf));
             if (clean_shutdown) {
                 //Verify it is safe to close it.
-                assert(!ft->h->dirty);  //Must not be dirty.
+                assert(!ft->h->dirty());  //Must not be dirty.
                 ft->blocktable.free_unused_blocknums(ft->h->root_blocknum);
                 // Must have no data blocks (rollback logs or otherwise).
                 ft->blocktable.verify_no_data_blocks_except_root(ft->h->root_blocknum);
-                assert(!ft->h->dirty);
+                assert(!ft->h->dirty());
             } else {
-                ft->h->dirty = 0;
+                ft->h->clear_dirty();
             }
             ft_to_close = toku_ft_get_only_existing_ft_handle(ft);
             if (clean_shutdown) {
                 bool is_empty;
                 is_empty = toku_ft_is_empty_fast(ft_to_close);
                 assert(is_empty);
-                assert(!ft->h->dirty); // it should not have been dirtied by the toku_ft_is_empty test.
+                assert(!ft->h->dirty()); // it should not have been dirtied by the toku_ft_is_empty test.
             }
         }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/node.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/node.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/node.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/node.cc	2020-01-26 18:37:29.000000000 +0000
@@ -78,7 +78,7 @@
             }
         }
     }
-    n->dirty = 1;  // special case exception, it's okay to mark as dirty because the basements are empty
+    n->set_dirty();  // special case exception, it's okay to mark as dirty because the basements are empty
 
     toku_ft_status_note_ftnode(height, true);
 }
@@ -154,7 +154,7 @@
 
 void toku_evict_bn_from_memory(FTNODE node, int childnum, FT ft) {
     // free the basement node
-    assert(!node->dirty);
+    assert(!node->dirty());
     BASEMENTNODE bn = BLB(node, childnum);
     toku_ft_decrease_stats(&ft->in_memory_stats, bn->stat64_delta);
     toku_ft_adjust_logical_row_count(ft, -BLB_LRD(node, childnum));
@@ -596,7 +596,7 @@
                         oldest_referenced_xid_for_simple_gc,
                         node->oldest_referenced_xid_known,
                         true);
-    if (!node->dirty && child_to_read >= 0) {
+    if (!node->dirty() && child_to_read >= 0) {
         paranoid_invariant(BP_STATE(node, child_to_read) == PT_AVAIL);
         apply_ancestors_messages_to_bn(
             t,
@@ -713,7 +713,7 @@
     paranoid_invariant(node->height == 0);
     bool needs_ancestors_messages = false;
     // child_to_read may be -1 in test cases
-    if (!node->dirty && child_to_read >= 0) {
+    if (!node->dirty() && child_to_read >= 0) {
         paranoid_invariant(BP_STATE(node, child_to_read) == PT_AVAIL);
         needs_ancestors_messages = bn_needs_ancestors_messages(
             ft,
@@ -746,7 +746,7 @@
 
 void toku_ft_bn_update_max_msn(FTNODE node, MSN max_msn_applied, int child_to_read) {
     invariant(node->height == 0);
-    if (!node->dirty && child_to_read >= 0) {
+    if (!node->dirty() && child_to_read >= 0) {
         paranoid_invariant(BP_STATE(node, child_to_read) == PT_AVAIL);
         BASEMENTNODE bn = BLB(node, child_to_read);
         if (max_msn_applied.msn > bn->max_msn_applied.msn) {
@@ -833,7 +833,7 @@
 void toku_ftnode_leaf_rebalance(FTNODE node, unsigned int basementnodesize) {
 
     assert(node->height == 0);
-    assert(node->dirty);
+    assert(node->dirty());
 
     uint32_t num_orig_basements = node->n_children;
     // Count number of leaf entries in this leaf (num_le).
@@ -1142,7 +1142,7 @@
         invariant(childnum > 0);
         node->pivotkeys.insert_at(pivotkey, childnum - 1);
     }
-    node->dirty = 1;
+    node->set_dirty();
 }
 
 void
@@ -1745,7 +1745,7 @@
                                           int childnum, const ft_msg &msg, bool is_fresh) {
     paranoid_invariant(BP_STATE(node,childnum) == PT_AVAIL);
     bnc_insert_msg(BNC(node, childnum), msg, is_fresh, cmp);
-    node->dirty = 1;
+    node->set_dirty();
 }
 
 // This is only exported for tests.
@@ -2090,7 +2090,7 @@
     // be reapplied later), we mark the node as dirty and
     // take the opportunity to update node->max_msn_applied_to_node_on_disk.
     //
-    node->dirty = 1;
+    node->set_dirty();
 
     //
     // we cannot blindly update node->max_msn_applied_to_node_on_disk,
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/node.h mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/node.h
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/node.h	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/node.h	2020-01-26 18:37:29.000000000 +0000
@@ -155,6 +155,12 @@
     size_t _total_size;
 };
 
+extern int writing_rollback;
+
+extern "C" {
+extern uint force_recovery;
+}
+
 // TODO: class me up
 struct ftnode {
     // max_msn_applied that will be written to disk
@@ -173,9 +179,22 @@
     uint32_t build_id;
     // height is always >= 0.  0 for leaf, >0 for nonleaf.
     int height;
-    int dirty;
+    int dirty_;
     uint32_t fullhash;
 
+    void set_dirty() {
+        if(force_recovery) assert(writing_rollback);
+        dirty_ = 1;
+    }
+
+    void clear_dirty() {
+        dirty_ = 0;
+    }
+
+    bool dirty() {
+        return dirty_;
+    }
+
     // for internal nodes, if n_children==fanout+1 then the tree needs to be
     // rebalanced. for leaf nodes, represents number of basement nodes
     int n_children;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/block_table.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/block_table.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/block_table.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/block_table.cc	2020-01-26 18:37:29.000000000 +0000
@@ -196,9 +196,9 @@
     invariant(ft->h->type == FT_CURRENT);
     if (for_checkpoint) {
         invariant(ft->checkpoint_header->type == FT_CHECKPOINT_INPROGRESS);
-        ft->checkpoint_header->dirty = 1;
+        ft->checkpoint_header->set_dirty();
     } else {
-        ft->h->dirty = 1;
+        ft->h->set_dirty();
     }
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft-node-deserialize.cc	2020-01-26 18:37:29.000000000 +0000
@@ -60,7 +60,7 @@
 {
     node->fullhash = 0xDEADBEEF; //  Is this 'spoof' ok?
     node->blocknum = blocknum;
-    node->dirty = 0;
+    node->clear_dirty();
     node->bp = NULL;
     //  Can we use this initialization as a correctness assert in
     // a later function?
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft-serialize.cc	2020-01-26 18:37:29.000000000 +0000
@@ -340,7 +340,7 @@
     {
         struct ft_header h = {
             .type = FT_CURRENT,
-            .dirty = 0,
+            .dirty_ = 0,
             .checkpoint_count = checkpoint_count,
             .checkpoint_lsn = checkpoint_lsn,
             .layout_version = FT_LAYOUT_VERSION,
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/serialize/ft_node-serialize.cc	2020-01-26 18:37:29.000000000 +0000
@@ -827,7 +827,7 @@
         node, n_uncompressed_bytes, n_to_write, io_time, for_checkpoint);
 
     toku_free(compressed_buf);
-    node->dirty = 0;  // See #1957.   Must set the node to be clean after
+    node->clear_dirty();  // See #1957.   Must set the node to be clean after
                       // serializing it so that it doesn't get written again on
                       // the next checkpoint or eviction.
     if (node->height == 0) {
@@ -1544,7 +1544,7 @@
     FTNODE XMALLOC(node);
     node->fullhash = fullhash;
     node->blocknum = blocknum;
-    node->dirty = 0;
+    node->clear_dirty();
     node->oldest_referenced_xid_known = TXNID_NONE;
     node->bp = nullptr;
     node->ct_pair = nullptr;
@@ -1951,7 +1951,7 @@
     // Assign the highest msn from our upgrade message buffers
     node->max_msn_applied_to_node_on_disk = highest_msn;
     // Since we assigned MSNs to this node's messages, we need to dirty it.
-    node->dirty = 1;
+    node->set_dirty();
 
     // Must compute the checksum now (rather than at the end, while we
     // still have the pointer to the buffer).
@@ -2908,9 +2908,9 @@
     toku_free(compressed_buf);
     if (!is_serialized) {
         toku_static_serialized_rollback_log_destroy(&serialized_local);
-        log->dirty = 0;  // See #1957.   Must set the node to be clean after
-                         // serializing it so that it doesn't get written again
-                         // on the next checkpoint or eviction.
+        log->dirty = false;  // See #1957.   Must set the node to be clean after
+                             // serializing it so that it doesn't get written again
+                             // on the next checkpoint or eviction.
     }
     return 0;
 }
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/txn/rollback.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/txn/rollback.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/txn/rollback.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/txn/rollback.cc	2020-01-26 18:37:29.000000000 +0000
@@ -43,6 +43,8 @@
 #include "ft/logger/log-internal.h"
 #include "ft/txn/rollback-ct-callbacks.h"
 
+extern int writing_rollback;
+
 static void rollback_unpin_remove_callback(CACHEKEY* cachekey, bool for_checkpoint, void* extra) {
     FT CAST_FROM_VOIDP(ft, extra);
     ft->blocktable.free_blocknum(cachekey, ft, for_checkpoint);
@@ -155,6 +157,7 @@
     ROLLBACK_LOG_NODE *result
     )
 {
+    writing_rollback++;
     ROLLBACK_LOG_NODE XMALLOC(log);
     rollback_empty_log_init(log);
 
@@ -169,6 +172,7 @@
                        get_write_callbacks_for_rollback_log(ft),
                        toku_rollback_node_save_ct_pair);
     txn->roll_info.current_rollback = log->blocknum;
+    writing_rollback --;
 }
 
 void toku_rollback_log_unpin(TOKUTXN txn, ROLLBACK_LOG_NODE log) {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/txn/txn.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/txn/txn.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/ft/txn/txn.cc	2019-09-08 16:53:00.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/ft/txn/txn.cc	2020-01-26 18:37:29.000000000 +0000
@@ -723,7 +723,11 @@
     return txn->start_time;
 }
 
+extern uint force_recovery;
 int toku_txn_reads_txnid(TXNID txnid, TOKUTXN txn, bool is_provisional UU()) {
+    if(force_recovery) {
+        return TOKUDB_ACCEPT;
+    }
     int r = 0;
     TXNID oldest_live_in_snapshot = toku_get_oldest_in_live_root_txn_list(txn);
     if (oldest_live_in_snapshot == TXNID_NONE && txnid < txn->snapshot_txnid64) {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/portability/toku_instr_mysql.cc	2020-01-26 18:37:29.000000000 +0000
@@ -359,7 +359,16 @@
 
 void toku_instr_rwlock_unlock(toku_pthread_rwlock_t &rwlock) {
     if (rwlock.psi_rwlock)
+
+// Due to change introduced in e4148f2a22922687f7652c4e3d21a22da07c9e78
+// PSI rwlock version and interface changed
+// PSI_CURRENT_RWLOCK_VERSION is not defined in MySQL 5.6 and is defined
+// as 1 in 5.7 and < 8.0.17
+#if defined(PSI_CURRENT_RWLOCK_VERSION) && (PSI_CURRENT_RWLOCK_VERSION == 2)
+        PSI_RWLOCK_CALL(unlock_rwlock)(rwlock.psi_rwlock, PSI_RWLOCK_UNLOCK);
+#else
         PSI_RWLOCK_CALL(unlock_rwlock)(rwlock.psi_rwlock);
+#endif
 }
 
 #endif  // TOKU_MYSQL_WITH_PFS
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/run-nightly-coverage-tests.bash mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-coverage-tests.bash
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/run-nightly-coverage-tests.bash	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-coverage-tests.bash	2020-01-26 18:37:29.000000000 +0000
@@ -26,7 +26,7 @@
         -D RUN_LONG_TESTS=ON \
         -D TOKUDB_DATA=$tokudbdir/../tokudb.data \
         ..
-    ninja build_jemalloc build_lzma build_snappy
+    ninja build_lzma build_snappy
     popd
 fi
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/run-nightly-drd-tests.bash mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-drd-tests.bash
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/run-nightly-drd-tests.bash	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-drd-tests.bash	2020-01-26 18:37:29.000000000 +0000
@@ -25,7 +25,7 @@
         -D RUN_LONG_TESTS=ON \
         -D TOKUDB_DATA=$tokudbdir/../tokudb.data \
         ..
-    ninja build_jemalloc build_lzma build_snappy
+    ninja build_lzma build_snappy
     popd
 fi
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/run-nightly-release-tests.bash mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-release-tests.bash
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/run-nightly-release-tests.bash	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/run-nightly-release-tests.bash	2020-01-26 18:37:29.000000000 +0000
@@ -25,7 +25,7 @@
         -D RUN_LONG_TESTS=ON \
         -D TOKUDB_DATA=$tokudbdir/../tokudb.data \
         ..
-    ninja build_jemalloc build_lzma build_snappy
+    ninja build_lzma build_snappy
     popd
 fi
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/tokuvalgrind mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/tokuvalgrind
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/scripts/tokuvalgrind	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/scripts/tokuvalgrind	1970-01-01 00:00:00.000000000 +0000
@@ -1,52 +0,0 @@
-#!/usr/bin/env bash 
-
-function usage() {
-    echo "check for valgrind error and set the exit code"
-}
-
-function cleanup() {
-    if [ "$logfile" != "" ] ; then rm $logfile; fi
-    exit 1
-}
-
-args=$*
-
-logfile=
-createlogfile=0
-errorexitcode=1
-
-while [ $# -gt 0 ] ; do
-    arg=$1; shift
-    if [[ $arg =~ "--" ]] ; then
-	if [[ $arg =~ --log-file=(.*) ]] ; then
-	    logfile=${BASH_REMATCH[1]}
-	elif [[ $arg =~ --error-exitcode=(.*) ]] ; then
-	    errorexitcode=${BASH_REMATCH[1]}
-	fi
-    else
-	break
-    fi
-done
-
-if [ "$logfile" = "" ] ; then
-    createlogfile=1
-    trap cleanup SIGINT
-    logfile=`mktemp /tmp/$(whoami).tokugrind.XXXXXXXX`
-    args="--log-file=$logfile $args"
-fi
-
-valgrind $args
-exitcode=$?
-if [ $exitcode = 0 ] ; then
-    lines=$(wc -l <$logfile)
-    if [ $lines -ne 0 ] ; then
-	exitcode=$errorexitcode
-    fi
-fi
-
-if [ $createlogfile != 0 ] ; then
-    cat $logfile >>/dev/stderr
-    rm $logfile
-fi
-
-exit $exitcode
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/src/ydb.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/src/ydb.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb.cc	2020-01-26 18:37:30.000000000 +0000
@@ -40,6 +40,9 @@
 const char *toku_copyright_string = "Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.";
 
 #include 
+
+extern int writing_rollback;
+
 #include 
 #include 
 #include 
@@ -88,6 +91,10 @@
  int toku_close_trace_file (void) { return 0; } 
 #endif
 
+extern "C" {
+  uint force_recovery = 0;
+}
+
 // Set when env is panicked, never cleared.
 static int env_is_panicked = 0;
 
@@ -224,6 +231,9 @@
 // Check the available space in the file systems used by tokuft and erect barriers when available space gets low.
 static int
 env_fs_poller(void *arg) {
+    if(force_recovery == 6) {
+	    return 0;
+    }
     DB_ENV *env = (DB_ENV *) arg;
     int r;
 
@@ -308,6 +318,9 @@
 // Initialize the minicron that polls file system space
 static int
 env_fs_init_minicron(DB_ENV *env) {
+    if(force_recovery == 6) {
+        return 0;
+    }
     int r = toku_minicron_setup(&env->i->fs_poller, env->i->fs_poll_time*1000, env_fs_poller, env); 
     if (r == 0)
         env->i->fs_poller_is_init = true;
@@ -710,7 +723,7 @@
     }
 
     // Test for fileops directory
-    if (r == 0) {
+    if (r == 0 && force_recovery != 6) {
         path = toku_construct_full_name(
             2, env->i->dir, toku_product_name_strings.fileopsdirectory);
         assert(path);
@@ -753,7 +766,7 @@
     }
 
     // Test for recovery log
-    if ((r == 0) && (env->i->open_flags & DB_INIT_LOG)) {
+    if ((r == 0) && (env->i->open_flags & DB_INIT_LOG) && force_recovery != 6) {
         // if using transactions, test for existence of log
         r = ydb_recover_log_exists(env);  // return 0 or ENOENT
         if (expect_newenv && (r != ENOENT))
@@ -814,6 +827,27 @@
 // (The set of necessary files is defined in the function validate_env() above.)
 static int 
 env_open(DB_ENV * env, const char *home, uint32_t flags, int mode) {
+
+    if(force_recovery == 6) {
+        {
+            const int len = strlen(toku_product_name_strings.rollback_cachefile);
+            toku_product_name_strings.rollback_cachefile[len] = '2';
+            toku_product_name_strings.rollback_cachefile[len+1] = 0;
+        }
+
+        {
+            const int len = strlen(toku_product_name_strings.single_process_lock);
+            toku_product_name_strings.single_process_lock[len] = '2';
+            toku_product_name_strings.single_process_lock[len+1] = 0;
+        }
+
+        {
+            const int len = strlen(toku_product_name_strings.environmentdictionary);
+            toku_product_name_strings.environmentdictionary[len] = '2';
+            toku_product_name_strings.environmentdictionary[len+1] = 0;
+        }
+    }
+
     HANDLE_PANICKED_ENV(env);
     int r;
     bool newenv;  // true iff creating a new environment
@@ -904,7 +938,7 @@
 
     bool need_rollback_cachefile;
     need_rollback_cachefile = false;
-    if (flags & (DB_INIT_TXN | DB_INIT_LOG)) {
+    if (flags & (DB_INIT_TXN | DB_INIT_LOG) && force_recovery != 6) {
         need_rollback_cachefile = true;
     }
 
@@ -917,7 +951,7 @@
     r = ydb_maybe_upgrade_env(env, &last_lsn_of_clean_shutdown_read_from_log, &upgrade_in_progress);
     if (r!=0) goto cleanup;
 
-    if (upgrade_in_progress) {
+    if (upgrade_in_progress || force_recovery == 6) {
         // Delete old rollback file.  There was a clean shutdown, so it has nothing useful,
         // and there is no value in upgrading it.  It is simpler to just create a new one.
         char* rollback_filename = toku_construct_full_name(2, env->i->dir, toku_product_name_strings.rollback_cachefile);
@@ -935,9 +969,13 @@
 
     unused_flags &= ~DB_INIT_TXN & ~DB_INIT_LOG;
 
+    if(force_recovery == 6) {
+        flags |= DB_INIT_LOG | DB_INIT_TXN;
+    }
+
     // do recovery only if there exists a log and recovery is requested
     // otherwise, a log is created when the logger is opened later
-    if (!newenv) {
+    if (!newenv && force_recovery == 0) {
         if (flags & DB_INIT_LOG) {
             // the log does exist
             if (flags & DB_RECOVER) {
@@ -1006,7 +1044,7 @@
         assert (using_txns);
         toku_logger_set_cachetable(env->i->logger, env->i->cachetable);
         if (!toku_logger_rollback_is_open(env->i->logger)) {
-            bool create_new_rollback_file = newenv | upgrade_in_progress;
+            bool create_new_rollback_file = newenv | upgrade_in_progress | (force_recovery == 6);
             r = toku_logger_open_rollback(env->i->logger, env->i->cachetable, create_new_rollback_file);
             if (r != 0) {
                 r = toku_ydb_do_error(env, r, "Cant open rollback\n");
@@ -1025,6 +1063,7 @@
         assert_zero(r);
         r = toku_db_use_builtin_key_cmp(env->i->persistent_environment);
         assert_zero(r);
+	writing_rollback++;
         r = toku_db_open_iname(env->i->persistent_environment, txn, toku_product_name_strings.environmentdictionary, DB_CREATE, mode);
         if (r != 0) {
             r = toku_ydb_do_error(env, r, "Cant open persistent env\n");
@@ -1057,6 +1096,7 @@
             assert_zero(r);
         }
         capture_persistent_env_contents(env, txn);
+	writing_rollback--;
     }
     {
         r = toku_db_create(&env->i->directory, env, 0);
@@ -1075,8 +1115,10 @@
         txn = NULL;
     }
     cp = toku_cachetable_get_checkpointer(env->i->cachetable);
-    r = toku_checkpoint(cp, env->i->logger, NULL, NULL, NULL, NULL, STARTUP_CHECKPOINT);
-    assert_zero(r);
+    if (!force_recovery) {
+        r = toku_checkpoint(cp, env->i->logger, NULL, NULL, NULL, NULL, STARTUP_CHECKPOINT);
+    }
+    writing_rollback--;
     env_fs_poller(env);          // get the file system state at startup
     r = env_fs_init_minicron(env);
     if (r != 0) {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/src/ydb_db.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb_db.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/src/ydb_db.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb_db.cc	2020-01-26 18:37:30.000000000 +0000
@@ -324,6 +324,7 @@
     // DB_THREAD is implicitly supported and DB_BLACKHOLE is supported at the ft-layer
     unused_flags &= ~DB_THREAD;
     unused_flags &= ~DB_BLACKHOLE;
+    unused_flags &= ~DB_RDONLY;
 
     // check for unknown or conflicting flags
     if (unused_flags) return EINVAL; // unknown flags
@@ -405,7 +406,7 @@
     FT_HANDLE ft_handle = info->ft_handle;
 
     FT_HANDLE cloned_ft_handle;
-    r = toku_ft_handle_clone(&cloned_ft_handle, ft_handle, ttxn);
+    r = toku_ft_handle_clone(&cloned_ft_handle, ft_handle, ttxn, info->open_rw);
     if (r == 0) {
         assert(lt->get_userdata() == NULL);
         lt->set_userdata(cloned_ft_handle);
@@ -466,6 +467,7 @@
                                             flags&=~DB_READ_COMMITTED;
                                             flags&=~DB_SERIALIZABLE;
                                             flags&=~DB_IS_HOT_INDEX;
+                                            flags&=~DB_RDONLY;
     // unknown or conflicting flags are bad
     int unknown_flags = flags & ~DB_THREAD;
     unknown_flags &= ~DB_BLACKHOLE;
@@ -480,11 +482,12 @@
     db->i->open_flags = flags;
     db->i->open_mode = mode;
 
+    bool open_rw = mode & (S_IWUSR | S_IWOTH | S_IWGRP);
     FT_HANDLE ft_handle = db->i->ft_handle;
     int r = toku_ft_handle_open(ft_handle, iname_in_env,
                       is_db_create, is_db_excl,
                       db->dbenv->i->cachetable,
-                      txn ? db_txn_struct_i(txn)->tokutxn : nullptr);
+                      txn ? db_txn_struct_i(txn)->tokutxn : nullptr, open_rw);
     if (r != 0) {
         goto out;
     }
@@ -506,6 +509,7 @@
         struct lt_on_create_callback_extra on_create_extra = {
             .txn = txn,
             .ft_handle = db->i->ft_handle,
+            open_rw
         };
         db->i->lt = db->dbenv->i->ltm.get_lt(db->i->dict_id,
                                              toku_ft_get_comparator(db->i->ft_handle),
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/src/ydb_db.h mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb_db.h
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/src/ydb_db.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/src/ydb_db.h	2020-01-26 18:37:30.000000000 +0000
@@ -67,6 +67,7 @@
 struct lt_on_create_callback_extra {
     DB_TXN *txn;
     FT_HANDLE ft_handle;
+    bool open_rw;
 };
 int toku_db_lt_on_create_callback(toku::locktree *lt, void *extra);
 void toku_db_lt_on_destroy_callback(toku::locktree *lt);
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/tools/tokuftdump.cc mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/tools/tokuftdump.cc
--- mariadb-10.3-10.3.18/storage/tokudb/PerconaFT/tools/tokuftdump.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/PerconaFT/tools/tokuftdump.cc	2020-01-26 18:37:30.000000000 +0000
@@ -181,7 +181,7 @@
     printf(" time_of_creation=         %" PRIu64 "    %s\n", ft->h->time_of_creation, timestr);
     format_time(ft->h->time_of_last_modification, timestr);
     printf(" time_of_last_modification=%" PRIu64 "    %s\n", ft->h->time_of_last_modification, timestr);
-    printf(" dirty=%d\n", ft->h->dirty);
+    printf(" dirty=%d\n", ft->h->dirty());
     printf(" checkpoint_count=%" PRId64 "\n", ft->h->checkpoint_count);
     printf(" checkpoint_lsn=%" PRId64 "\n", ft->h->checkpoint_lsn.lsn);
     printf(" nodesize=%u\n", ft->h->nodesize);
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/ha_tokudb.cc mariadb-10.3-10.3.22/storage/tokudb/ha_tokudb.cc
--- mariadb-10.3-10.3.18/storage/tokudb/ha_tokudb.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/ha_tokudb.cc	2020-01-26 18:37:30.000000000 +0000
@@ -1077,7 +1077,8 @@
         }
 
         buff = (uchar *)dest_key->data;
-        assert_always(buff != NULL && max_key_len > 0);
+        assert_always(buff != nullptr);
+        assert_always(max_key_len > 0);
     } else {
         assert_unreachable();
     }
@@ -1332,7 +1333,7 @@
             NULL,
             DB_BTREE,
             open_flags,
-            0);
+            S_IWUSR);
     if (error) {
         goto exit;
     }
@@ -1395,7 +1396,7 @@
     }
 
 
-    error = (*ptr)->open(*ptr, txn, newname, NULL, DB_BTREE, open_flags, 0);
+    error = (*ptr)->open(*ptr, txn, newname, NULL, DB_BTREE, open_flags, S_IWUSR);
     if (error) {
         my_errno = error;
         goto cleanup;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/ha_tokudb.h mariadb-10.3-10.3.22/storage/tokudb/ha_tokudb.h
--- mariadb-10.3-10.3.18/storage/tokudb/ha_tokudb.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/ha_tokudb.h	2020-01-26 18:37:30.000000000 +0000
@@ -387,7 +387,8 @@
 
     assert_debug(_mutex.is_owned_by_me());
     // can not change number of keys live
-    assert_always(_rec_per_key == NULL && _rec_per_keys == 0);
+    assert_always(_rec_per_key == nullptr);
+    assert_always(_rec_per_keys == 0);
     _rec_per_keys = rec_per_keys;
     _rec_per_key = rec_per_key;
 }
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/hatoku_cmp.cc mariadb-10.3-10.3.22/storage/tokudb/hatoku_cmp.cc
--- mariadb-10.3-10.3.18/storage/tokudb/hatoku_cmp.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/hatoku_cmp.cc	2020-01-26 18:37:30.000000000 +0000
@@ -957,9 +957,8 @@
     const void*  saved_key_data,
     const uint32_t saved_key_size
     ) {
-    assert_always(
-        (new_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH) &&
-        (saved_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH));
+    assert_always(new_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH);
+    assert_always(saved_key_size >= TOKUDB_HIDDEN_PRIMARY_KEY_LENGTH);
     ulonglong a = hpk_char_to_num((uchar *) new_key_data);
     ulonglong b = hpk_char_to_num((uchar *) saved_key_data);
     return a < b ? -1 : (a > b ? 1 : 0);
@@ -2537,7 +2536,8 @@
         bool is_col_in_pk = false;
 
         if (bitmap_is_set(&kc_info->key_filters[pk_index],field_index)) {
-            assert_always(!has_hpk && prim_key != NULL);
+            assert_always(!has_hpk);
+            assert_always(prim_key != nullptr);
             is_col_in_pk = true;
         }
         else {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result
--- mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-29.result	2020-01-26 18:37:30.000000000 +0000
@@ -31,7 +31,7 @@
 # number of rows should be 9
 explain select * from foo where a > 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	9	Using where
+1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	5	Using where
 # should have just 4 values
 select * from foo where a > 1;
 a	b
@@ -43,7 +43,7 @@
 # number of rows should be 9
 explain select * from foo where a > 1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	9	Using where
+1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	5	Using where
 # 9 values
 select * From foo where a > 1;
 a	b
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result
--- mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-30.result	2020-01-26 18:37:30.000000000 +0000
@@ -31,7 +31,7 @@
 # number of rows should be 9
 explain select * from foo where a < 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	9	Using where
+1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	5	Using where
 # should have just 4 values
 select * from foo where a < 50;
 a	b
@@ -43,7 +43,7 @@
 # number of rows should be 9
 explain select * from foo where a < 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	9	Using where
+1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	5	Using where
 # 9 values
 select * From foo where a < 50;
 a	b
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result
--- mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/r/mvcc-31.result	2020-01-26 18:37:30.000000000 +0000
@@ -31,7 +31,7 @@
 # number of rows should be 8
 explain select * from foo where a > 1 and a < 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	8	Using where
+1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	5	Using where
 # should have just 4 values
 select * from foo where a > 1 and a < 50;
 a	b
@@ -43,7 +43,7 @@
 # number of rows should be 8
 explain select * from foo where a > 1 and a < 50;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	8	Using where
+1	SIMPLE	foo	range	PRIMARY	PRIMARY	4	NULL	5	Using where
 # 8 values
 select * from foo where a > 1 and a < 50;
 a	b
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/t/type_bit.test mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/t/type_bit.test
--- mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb/t/type_bit.test	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb/t/type_bit.test	2020-01-26 18:37:30.000000000 +0000
@@ -268,7 +268,7 @@
 drop table t1;
 
 #
-# type was not properly initalized, which caused key_copy to fail
+# type was not properly initialized, which caused key_copy to fail
 #
 
 create table t1(bit_field bit(2), int_field int, key a(bit_field));
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb_bugs/r/2970.result mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb_bugs/r/2970.result
--- mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb_bugs/r/2970.result	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb_bugs/r/2970.result	2020-01-26 18:37:30.000000000 +0000
@@ -6,5 +6,5 @@
 insert into t2970 values (1,1,1,1),(1,2,3,4);
 explain select a,count(b),max(b) from t2970 where a > 0 group by a order by a;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t2970	index	a,a_2	a_2	10	NULL	2	Using where; Using index
+1	SIMPLE	t2970	range	a,a_2	a_2	5	NULL	2	Using where; Using index
 drop table t2970;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result
--- mariadb-10.3-10.3.18/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result	2020-01-26 18:37:30.000000000 +0000
@@ -12,6 +12,7 @@
 call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
 flush tables;
 # Crash testing ADD PARTITION
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_1";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -73,7 +74,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_2";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -137,7 +138,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_3";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -201,7 +202,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_4";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -265,7 +266,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_5";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -329,7 +330,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_6";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -393,7 +394,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_7";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -457,7 +458,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_8";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -522,7 +523,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_9";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -585,7 +586,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_9";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_add_partition_10";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -648,8 +649,9 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_add_partition_10";
+SET SESSION debug_dbug=@save_dbug;
 # Error recovery testing ADD PARTITION
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_1";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -766,7 +768,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_2";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -883,7 +885,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_3";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1000,7 +1002,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_4";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1117,7 +1119,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_5";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1234,7 +1236,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_6";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1351,7 +1353,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_7";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1468,7 +1470,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_8";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1587,7 +1589,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_9";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1706,7 +1708,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_9";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_add_partition_10";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1825,8 +1827,9 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_add_partition_10";
+SET SESSION debug_dbug=@save_dbug;
 # Test DROP PARTITION
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_1";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1887,7 +1890,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_2";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -1950,7 +1953,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_3";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2013,7 +2016,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_4";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2071,7 +2074,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_5";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2129,7 +2132,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_6";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2187,7 +2190,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_7";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2243,7 +2246,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_8";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2299,7 +2302,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_drop_partition_9";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2355,8 +2358,9 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_drop_partition_9";
+SET SESSION debug_dbug=@save_dbug;
 # Error recovery DROP PARTITION
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_1";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2471,7 +2475,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_2";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2586,7 +2590,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_3";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2701,7 +2705,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_4";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2806,7 +2810,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_5";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -2911,7 +2915,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_6";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3016,7 +3020,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_7";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3121,7 +3125,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_8";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3226,7 +3230,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_drop_partition_9";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3331,9 +3335,10 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_drop_partition_9";
+SET SESSION debug_dbug=@save_dbug;
 # Test change partition (REORGANIZE/REBUILD/COALESCE
 # or ADD HASH PARTITION).
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_1";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3396,7 +3401,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_2";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3461,7 +3466,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_3";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3526,7 +3531,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_4";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3591,7 +3596,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_5";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3656,7 +3661,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_6";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3721,7 +3726,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_7";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3787,7 +3792,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_8";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3853,7 +3858,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_9";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3917,7 +3922,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_9";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_10";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -3981,7 +3986,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_10";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_11";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4045,7 +4050,7 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_11";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,crash_change_partition_12";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4109,9 +4114,10 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,crash_change_partition_12";
+SET SESSION debug_dbug=@save_dbug;
 # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
 # or ADD HASH PARTITION).
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_1";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4230,7 +4236,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_2";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4349,7 +4355,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_3";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4468,7 +4474,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_4";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4587,7 +4593,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_5";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4706,7 +4712,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_6";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4825,7 +4831,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_7";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -4946,7 +4952,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_8";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -5067,7 +5073,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_9";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -5188,7 +5194,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_9";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_10";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -5309,7 +5315,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_10";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_11";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -5430,7 +5436,7 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_11";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,fail_change_partition_12";
 CREATE TABLE t1 (a INT, b VARCHAR(64))
 ENGINE = 'TokuDB'
@@ -5551,13 +5557,14 @@
 4	Original from partition p0
 UNLOCK TABLES;
 DROP TABLE t1;
-SET SESSION debug_dbug="-d,fail_change_partition_12";
+SET SESSION debug_dbug=@save_dbug;
 #
 # WL#4445: EXCHANGE PARTITION WITH TABLE
 # Verify ddl_log and TokuDB in case of crashing.
 call mtr.add_suppression("TokuDB: Warning: allocated tablespace .*, old maximum was ");
 call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
 call mtr.add_suppression("table .* does not exist in the TokuDB internal");
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_1";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -5656,7 +5663,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_2";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -5755,7 +5762,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_3";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -5854,7 +5861,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_4";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -5953,7 +5960,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_5";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6052,7 +6059,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_6";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6151,7 +6158,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_7";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6250,7 +6257,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_8";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6349,7 +6356,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_abort_9";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6448,7 +6455,8 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_abort_9";
+SET SESSION debug_dbug=@save_dbug;
+SET @save_dbug=@@debug_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_1";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6542,7 +6550,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_1";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_2";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6636,7 +6644,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_2";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_3";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6730,7 +6738,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_3";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_4";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6824,7 +6832,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_4";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_5";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -6918,7 +6926,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_5";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_6";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -7012,7 +7020,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_6";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_7";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -7106,7 +7114,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_7";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_8";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -7200,7 +7208,7 @@
 7	Original from table t2
 8	Original from table t2
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_8";
+SET SESSION debug_dbug=@save_dbug;
 SET SESSION debug_dbug="+d,exchange_partition_fail_9";
 CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
 INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
@@ -7294,4 +7302,4 @@
 3	Original from partition p0
 4	Original from partition p0
 DROP TABLE t2;
-SET SESSION debug_dbug="-d,exchange_partition_fail_9";
+SET SESSION debug_dbug=@save_dbug;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/math_test_int.cc mariadb-10.3-10.3.22/storage/tokudb/tests/math_test_int.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/math_test_int.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/math_test_int.cc	2020-01-26 18:37:30.000000000 +0000
@@ -54,16 +54,20 @@
                 assert(over);
             else if (m < -max)
                 assert(over);
-            else
-                assert(!over && n == m);
+            else {
+                assert(!over);
+                assert(n == m);
+            }
             n = int_sub(x, y, 8, &over);
             m = x - y;
             if (m > max-1)
                 assert(over);
             else if (m < -max)
                 assert(over);
-            else
-                assert(!over && n == m);
+            else {
+                assert(!over);
+                asset(n == m);
+            }
         }
     }
 }
@@ -82,16 +86,20 @@
                 assert(over);
             else if (m < -max)
                 assert(over);
-            else
-                assert(!over && n == m);
+            else {
+                assert(!over);
+                assert(n == m);
+            }
             n = int_sub(x, y, 16, &over);
             m = x - y;
             if (m > max-1)
                 assert(over);
             else if (m < -max)
                 assert(over);
-            else
-                assert(!over && n == m);
+            else {
+                assert(!over);
+                assert(n == m);
+            }
         }
     }
 }
@@ -104,20 +112,42 @@
 
     s = int_add(1, (1ULL<<23)-1, 24, &over); assert(over);
     s = int_add((1ULL<<23)-1, 1, 24, &over); assert(over);
-    s = int_sub(-1, (1ULL<<23), 24, &over); assert(!over && s == (1ULL<<23)-1);
+    s = int_sub(-1, (1ULL<<23), 24, &over);
+    assert(!over);
+    assert(s == (1ULL<<23)-1);
     s = int_sub((1ULL<<23), 1, 24, &over); assert(over);
 
-    s = int_add(0, 0, 24, &over); assert(!over && s == 0);
-    s = int_sub(0, 0, 24, &over); assert(!over && s == 0);
-    s = int_add(0, -1, 24, &over); assert(!over && s == -1);
-    s = int_sub(0, 1, 24, &over); assert(!over && s == -1);
-    s = int_add(0, (1ULL<<23), 24, &over); assert(!over && (s & ((1ULL<<24)-1)) == (1ULL<<23));
-    s = int_sub(0, (1ULL<<23)-1, 24, &over); assert(!over && (s & ((1ULL<<24)-1)) == (1ULL<<23)+1);
-
-    s = int_add(-1, 0, 24, &over); assert(!over && s == -1);
-    s = int_add(-1, 1, 24, &over); assert(!over && s == 0);
-    s = int_sub(-1, -1, 24, &over); assert(!over && s == 0);
-    s = int_sub(-1, (1ULL<<23)-1, 24, &over); assert(!over && (s & ((1ULL<<24)-1)) == (1ULL<<23));
+    s = int_add(0, 0, 24, &over);
+    assert(!over);
+    assert(s == 0);
+    s = int_sub(0, 0, 24, &over);
+    assert(!over);
+    assert(s == 0);
+    s = int_add(0, -1, 24, &over);
+    assert(!over);
+    assert(s == -1);
+    s = int_sub(0, 1, 24, &over);
+    assert(!over);
+    assert(s == -1);
+    s = int_add(0, (1ULL<<23), 24, &over);
+    assert(!over);
+    assert((s & ((1ULL<<24)-1)) == (1ULL<<23));
+    s = int_sub(0, (1ULL<<23)-1, 24, &over);
+    assert(!over);
+    assert((s & ((1ULL<<24)-1)) == (1ULL<<23)+1);
+
+    s = int_add(-1, 0, 24, &over);
+    assert(!over);
+    assert(s == -1);
+    s = int_add(-1, 1, 24, &over);
+    assert(!over);
+    assert(s == 0);
+    s = int_sub(-1, -1, 24, &over);
+    assert(!over);
+    assert(s == 0);
+    s = int_sub(-1, (1ULL<<23)-1, 24, &over);
+    assert(!over);
+    assert((s & ((1ULL<<24)-1)) == (1ULL<<23));
 }
 
 static void test_int32() {
@@ -128,20 +158,42 @@
 
     s = int_add(1, (1ULL<<31)-1, 32, &over); assert(over);
     s = int_add((1ULL<<31)-1, 1, 32, &over); assert(over);
-    s = int_sub(-1, (1ULL<<31), 32, &over); assert(s == (1ULL<<31)-1 && !over);
+    s = int_sub(-1, (1ULL<<31), 32, &over);
+    assert(s == (1ULL<<31)-1);
+    assert(!over);
     s = int_sub((1ULL<<31), 1, 32, &over); assert(over);
 
-    s = int_add(0, 0, 32, &over); assert(s == 0 && !over);
-    s = int_sub(0, 0, 32, &over); assert(s == 0 && !over);
-    s = int_add(0, -1, 32, &over); assert(s == -1 && !over);
-    s = int_sub(0, 1, 32, &over); assert(s == -1 && !over);
-    s = int_add(0, (1ULL<<31), 32, &over); assert((s & ((1ULL<<32)-1)) == (1ULL<<31) && !over);
-    s = int_sub(0, (1ULL<<31)-1, 32, &over); assert((s & ((1ULL<<32)-1)) == (1ULL<<31)+1 && !over);
-
-    s = int_add(-1, 0, 32, &over); assert(s == -1 && !over);
-    s = int_add(-1, 1, 32, &over); assert(s == 0 && !over);
-    s = int_sub(-1, -1, 32, &over); assert(s == 0 && !over);
-    s = int_sub(-1, (1ULL<<31)-1, 32, &over); assert((s & ((1ULL<<32)-1)) == (1ULL<<31) && !over);
+    s = int_add(0, 0, 32, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_sub(0, 0, 32, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_add(0, -1, 32, &over);
+    assert(s == -1);
+    assert(!over);
+    s = int_sub(0, 1, 32, &over);
+    assert(s == -1);
+    assert(!over);
+    s = int_add(0, (1ULL<<31), 32, &over);
+    assert((s & ((1ULL<<32)-1)) == (1ULL<<31));
+    assert(!over);
+    s = int_sub(0, (1ULL<<31)-1, 32, &over);
+    assert((s & ((1ULL<<32)-1)) == (1ULL<<31)+1);
+    assert(!over);
+
+    s = int_add(-1, 0, 32, &over);
+    assert(s == -1);
+    assert(!over);
+    s = int_add(-1, 1, 32, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_sub(-1, -1, 32, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_sub(-1, (1ULL<<31)-1, 32, &over);
+    assert((s & ((1ULL<<32)-1)) == (1ULL<<31));
+    assert(!over);
 }
 
 static void test_int64() {
@@ -152,20 +204,42 @@
 
     s = int_add(1, (1ULL<<63)-1, 64, &over); assert(over);
     s = int_add((1ULL<<63)-1, 1, 64, &over); assert(over);
-    s = int_sub(-1, (1ULL<<63), 64, &over); assert(s == (1ULL<<63)-1 && !over);
+    s = int_sub(-1, (1ULL<<63), 64, &over);
+    assert(s == (1ULL<<63)-1);
+    assert(!over);
     s = int_sub((1ULL<<63), 1, 64, &over); assert(over);
 
-    s = int_add(0, 0, 64, &over); assert(s == 0 && !over);
-    s = int_sub(0, 0, 64, &over); assert(s == 0 && !over);
-    s = int_add(0, -1, 64, &over); assert(s == -1 && !over);
-    s = int_sub(0, 1, 64, &over); assert(s == -1 && !over);
-    s = int_add(0, (1ULL<<63), 64, &over); assert(s == (int64_t)(1ULL<<63) && !over);
-    s = int_sub(0, (1ULL<<63)-1, 64, &over); assert(s == (int64_t)((1ULL<<63)+1) && !over);
-
-    s = int_add(-1, 0, 64, &over); assert(s == -1 && !over);
-    s = int_add(-1, 1, 64, &over); assert(s == 0 && !over);
-    s = int_sub(-1, -1, 64, &over); assert(s == 0 && !over);
-    s = int_sub(-1, (1ULL<<63)-1, 64, &over); assert(s == (int64_t)(1ULL<<63) && !over);
+    s = int_add(0, 0, 64, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_sub(0, 0, 64, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_add(0, -1, 64, &over);
+    assert(s == -1);
+    assert(!over);
+    s = int_sub(0, 1, 64, &over);
+    assert(s == -1);
+    assert(!over);
+    s = int_add(0, (1ULL<<63), 64, &over);
+    assert(s == (int64_t)(1ULL<<63));
+    assert(!over);
+    s = int_sub(0, (1ULL<<63)-1, 64, &over);
+    assert(s == (int64_t)((1ULL<<63)+1));
+    assert(!over);
+
+    s = int_add(-1, 0, 64, &over);
+    assert(s == -1);
+    assert(!over);
+    s = int_add(-1, 1, 64, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_sub(-1, -1, 64, &over);
+    assert(s == 0);
+    assert(!over);
+    s = int_sub(-1, (1ULL<<63)-1, 64, &over);
+    assert(s == (int64_t)(1ULL<<63));
+    assert(!over);
 }
 
 static void test_int_sign(uint length_bits) {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/math_test_uint.cc mariadb-10.3-10.3.22/storage/tokudb/tests/math_test_uint.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/math_test_uint.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/math_test_uint.cc	2020-01-26 18:37:30.000000000 +0000
@@ -51,14 +51,18 @@
             m = x + y;
             if (m > (1ULL<<8)-1)
                 assert(over);
-            else 
-                assert(!over && n == (m % 256));
+            else {
+                assert(!over);
+                assert(n == (m % 256));
+            }
             n = uint_sub(x, y, 8, &over);
             m = x - y;
             if (m > x)
                 assert(over);
-            else
-                assert(!over && n == (m % 256));
+            else {
+                assert(!over);
+                assert(n == (m % 256));
+            }
         }
     }
 }
@@ -75,14 +79,18 @@
             m = x + y;
             if (m > (1ULL<<16)-1)
                 assert(over);
-            else
-                assert(!over && n == (m % (1ULL<<16)));
+            else {
+                assert(!over);
+                assert(n == (m % (1ULL<<16)));
+            }
             n = uint_sub(x, y, 16, &over);
             m = x - y;
             if (m > x)
                 assert(over);
-            else
-                assert(!over && n == (m % (1ULL<<16)));
+            else {
+                assert(!over);
+                assert(n == (m % (1ULL<<16)));
+            }
         }
     }
 }
@@ -95,13 +103,23 @@
 
     s = uint_add((1ULL<<24)-1, (1ULL<<24)-1, 24, &over); assert(over);
     s = uint_add((1ULL<<24)-1, 1, 24, &over); assert(over);
-    s = uint_add((1ULL<<24)-1, 0, 24, &over); assert(!over && s == (1ULL<<24)-1);
-    s = uint_add(0, 1, 24, &over); assert(!over && s == 1);
-    s = uint_add(0, 0, 24, &over); assert(!over && s == 0);
-    s = uint_sub(0, 0, 24, &over); assert(!over && s == 0);
+    s = uint_add((1ULL<<24)-1, 0, 24, &over);
+    assert(!over);
+    assert(s == (1ULL<<24)-1);
+    s = uint_add(0, 1, 24, &over);
+    assert(!over);
+    assert(s == 1);
+    s = uint_add(0, 0, 24, &over);
+    assert(!over);
+    assert(s == 0);
+    s = uint_sub(0, 0, 24, &over);
+    assert(!over);
+    assert(s == 0);
     s = uint_sub(0, 1, 24, &over); assert(over);
     s = uint_sub(0, (1ULL<<24)-1, 24, &over); assert(over);
-    s = uint_sub((1ULL<<24)-1, (1ULL<<24)-1, 24, &over); assert(!over && s == 0);
+    s = uint_sub((1ULL<<24)-1, (1ULL<<24)-1, 24, &over);
+    assert(!over);
+    assert(s == 0);
 }
 
 static void test_uint32() {
@@ -112,13 +130,23 @@
 
     s = uint_add((1ULL<<32)-1, (1ULL<<32)-1, 32, &over); assert(over);
     s = uint_add((1ULL<<32)-1, 1, 32, &over); assert(over);
-    s = uint_add((1ULL<<32)-1, 0, 32, &over); assert(!over && s == (1ULL<<32)-1);
-    s = uint_add(0, 1, 32, &over); assert(!over && s == 1);
-    s = uint_add(0, 0, 32, &over); assert(!over && s == 0);
-    s = uint_sub(0, 0, 32, &over); assert(!over && s == 0);
+    s = uint_add((1ULL<<32)-1, 0, 32, &over);
+    assert(!over);
+    assert(s == (1ULL<<32)-1);
+    s = uint_add(0, 1, 32, &over);
+    assert(!over);
+    assert(s == 1);
+    s = uint_add(0, 0, 32, &over);
+    assert(!over);
+    assert(s == 0);
+    s = uint_sub(0, 0, 32, &over);
+    assert(!over);
+    assert(s == 0);
     s = uint_sub(0, 1, 32, &over); assert(over);
     s = uint_sub(0, (1ULL<<32)-1, 32, &over); assert(over);
-    s = uint_sub((1ULL<<32)-1, (1ULL<<32)-1, 32, &over); assert(!over && s == 0);
+    s = uint_sub((1ULL<<32)-1, (1ULL<<32)-1, 32, &over);
+    assert(!over);
+    assert(s == 0);
 }
 
 static void test_uint64() {
@@ -129,13 +157,23 @@
 
     s = uint_add(~0ULL, ~0ULL, 64, &over); assert(over);
     s = uint_add(~0ULL, 1, 64, &over); assert(over);
-    s = uint_add(~0ULL, 0, 64, &over); assert(!over && s == ~0ULL);
-    s = uint_add(0, 1, 64, &over); assert(!over && s == 1);
-    s = uint_add(0, 0, 64, &over); assert(!over && s == 0);
-    s = uint_sub(0, 0, 64, &over); assert(!over && s == 0);
+    s = uint_add(~0ULL, 0, 64, &over);
+    assert(!over);
+    assert(s == ~0ULL);
+    s = uint_add(0, 1, 64, &over);
+    assert(!over);
+    assert(s == 1);
+    s = uint_add(0, 0, 64, &over);
+    assert(!over);
+    assert(s == 0);
+    s = uint_sub(0, 0, 64, &over);
+    assert(!over);
+    assert(s == 0);
     s = uint_sub(0, 1, 64, &over); assert(over);
     s = uint_sub(0, ~0ULL, 64, &over); assert(over);
-    s = uint_sub(~0ULL, ~0ULL, 64, &over); assert(!over && s == 0);
+    s = uint_sub(~0ULL, ~0ULL, 64, &over);
+    assert(!over);
+    assert(s == 0);
 }
 
 int main() {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/sint_test.cc mariadb-10.3-10.3.22/storage/tokudb/tests/sint_test.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/sint_test.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/sint_test.cc	2020-01-26 18:37:30.000000000 +0000
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/tokudb_buffer_test.cc mariadb-10.3-10.3.22/storage/tokudb/tests/tokudb_buffer_test.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/tokudb_buffer_test.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/tokudb_buffer_test.cc	2020-01-26 18:37:30.000000000 +0000
@@ -32,9 +32,13 @@
 
 static void test_null() {
     tokudb::buffer b;
-    assert(b.data() == NULL && b.size() == 0 && b.limit() == 0);
+    assert(b.data() == nullptr);
+    assert(b.size() == 0);
+    assert(b.limit() == 0);
     b.append(NULL, 0);
-    assert(b.data() == NULL && b.size() == 0 && b.limit() == 0);
+    assert(b.data() == nullptr);
+    assert(b.size() == 0);
+    assert(b.limit() == 0);
 }
 
 static void append_az(tokudb::buffer &b) {
@@ -132,7 +136,8 @@
     }
     for (size_t i = 0; i < a.size()/2; i++) {
         unsigned char *cp = (unsigned char *) a.data() + 2*i;
-        assert(cp[0] == 'a'+i && cp[1] == 'a'+i);
+        assert(cp[0] == 'a'+i);
+        assert(cp[1] == 'a'+i);
     }
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/uint_test.cc mariadb-10.3-10.3.22/storage/tokudb/tests/uint_test.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/uint_test.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/uint_test.cc	2020-01-26 18:37:30.000000000 +0000
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/vlq_test.cc mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/vlq_test.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test.cc	2020-01-26 18:37:30.000000000 +0000
@@ -52,7 +52,8 @@
     in_s = tokudb::vlq_decode_ui(&n, b, 1);
     assert(in_s == 0);
     in_s = tokudb::vlq_decode_ui(&n, b, 2);
-    assert(in_s == 2 && n == 128);
+    assert(in_s == 2);
+    assert(n == 128);
 }
 
 static void test_80000000(void) {
@@ -63,7 +64,8 @@
     out_s = tokudb::vlq_encode_ui(v, b, sizeof b);
     assert(out_s == 5);
     in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-    assert(in_s == 5 && n == v);
+    assert(in_s == 5);
+    assert(n == v);
 }
 
 static void test_100000000(void) {
@@ -74,7 +76,8 @@
     out_s = tokudb::vlq_encode_ui(v, b, sizeof b);
     assert(out_s == 5);
     in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-    assert(in_s == 5 && n == v);
+    assert(in_s == 5);
+    assert(n == v);
 }   
 
 int main(void) {
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/vlq_test_uint32.cc mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test_uint32.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/vlq_test_uint32.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test_uint32.cc	2020-01-26 18:37:30.000000000 +0000
@@ -44,7 +44,8 @@
         assert(out_s == 1);
         uint32_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 1 && n == v);
+        assert(in_s == 1);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<7);
@@ -54,7 +55,8 @@
         assert(out_s == 2);
         uint32_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 2 && n == v);
+        assert(in_s == 2);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<14);
@@ -64,7 +66,8 @@
         assert(out_s == 3);
         uint32_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 3 && n == v);
+        assert(in_s == 3);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<21);
@@ -74,7 +77,8 @@
         assert(out_s == 4);
         uint32_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 4 && n == v);
+        assert(in_s == 4);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<28);
@@ -84,7 +88,8 @@
         assert(out_s == 5);
         uint32_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 5 && n == v);
+        assert(in_s == 5);
+        assert(n == v);
     }
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tests/vlq_test_uint64.cc mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test_uint64.cc
--- mariadb-10.3-10.3.18/storage/tokudb/tests/vlq_test_uint64.cc	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tests/vlq_test_uint64.cc	2020-01-26 18:37:30.000000000 +0000
@@ -46,7 +46,8 @@
         assert(out_s == 1);
         uint64_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 1 && n == v);
+        assert(in_s == 1);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<7);
@@ -56,7 +57,8 @@
         assert(out_s == 2);
         uint64_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 2 && n == v);
+        assert(in_s == 2);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<14);
@@ -66,7 +68,8 @@
         assert(out_s == 3);
         uint64_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 3 && n == v);
+        assert(in_s == 3);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<21);
@@ -76,7 +79,8 @@
         assert(out_s == 4);
         uint64_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 4 && n == v);
+        assert(in_s == 4);
+        assert(n == v);
     }
 
     printf("%u\n", 1<<28);
@@ -90,7 +94,8 @@
         assert(out_s == 5);
         uint64_t n;
         size_t in_s = tokudb::vlq_decode_ui(&n, b, out_s);
-        assert(in_s == 5 && n == v);
+        assert(in_s == 5);
+        assert(n == v);
     }
 }
 
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tokudb_buffer.h mariadb-10.3-10.3.22/storage/tokudb/tokudb_buffer.h
--- mariadb-10.3-10.3.18/storage/tokudb/tokudb_buffer.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tokudb_buffer.h	2020-01-26 18:37:30.000000000 +0000
@@ -134,8 +134,8 @@
         char* data_offset = (char*)m_data + offset;
         if (new_s != old_s) {
             size_t n = m_size - (offset + old_s);
-            assert_always(
-                offset + new_s + n <= m_limit && offset + old_s + n <= m_limit);
+            assert_always(offset + new_s + n <= m_limit);
+            assert_always(offset + old_s + n <= m_limit);
             memmove(data_offset + new_s, data_offset + old_s, n);
             if (new_s > old_s)
                 m_size += new_s - old_s;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tokudb_math.h mariadb-10.3-10.3.22/storage/tokudb/tokudb_math.h
--- mariadb-10.3-10.3.18/storage/tokudb/tokudb_math.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tokudb_math.h	2020-01-26 18:37:30.000000000 +0000
@@ -59,7 +59,8 @@
     bool* over));
 static uint64_t uint_add(uint64_t x, uint64_t y, uint length_bits, bool *over) {
     uint64_t mask = uint_mask(length_bits);
-    assert_always((x & ~mask) == 0 && (y & ~mask) == 0);
+    assert_always((x & ~mask) == 0);
+    assert_always((y & ~mask) == 0);
     uint64_t s = (x + y) & mask;
     *over = s < x;     // check for overflow
     return s;
@@ -75,7 +76,8 @@
     bool* over));
 static uint64_t uint_sub(uint64_t x, uint64_t y, uint length_bits, bool *over) {
     uint64_t mask = uint_mask(length_bits);
-    assert_always((x & ~mask) == 0 && (y & ~mask) == 0);
+    assert_always((x & ~mask) == 0);
+    assert_always((y & ~mask) == 0);
     uint64_t s = (x - y) & mask;
     *over = s > x;    // check for overflow
     return s;
diff -Nru mariadb-10.3-10.3.18/storage/tokudb/tokudb_status.h mariadb-10.3-10.3.22/storage/tokudb/tokudb_status.h
--- mariadb-10.3-10.3.18/storage/tokudb/tokudb_status.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/storage/tokudb/tokudb_status.h	2020-01-26 18:37:30.000000000 +0000
@@ -201,7 +201,7 @@
                 name,
                 NULL,
                 DB_BTREE, DB_CREATE | DB_EXCL,
-                0);
+                S_IWUSR);
     }
     if (error == 0) {
         *status_db_ptr = status_db;
@@ -230,7 +230,7 @@
                 NULL,
                 DB_BTREE,
                 DB_THREAD,
-                0);
+                S_IWUSR);
     }
     if (error == 0) {
         uint32_t pagesize = 0;
diff -Nru mariadb-10.3-10.3.18/strings/ctype-simple.c mariadb-10.3-10.3.22/strings/ctype-simple.c
--- mariadb-10.3-10.3.18/strings/ctype-simple.c	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/strings/ctype-simple.c	2020-01-26 18:37:30.000000000 +0000
@@ -1,5 +1,5 @@
 /* Copyright (c) 2002, 2013, Oracle and/or its affiliates.
-   Copyright (c) 2009, 2014, SkySQL Ab.
+   Copyright (c) 2009, 2019, 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
@@ -1598,7 +1598,8 @@
   int shift= 0, digits= 0, negative, addon;
 
   /* Skip leading spaces and tabs */
-  for ( ; str < end && (*str == ' ' || *str == '\t') ; str++);
+  for ( ; str < end && my_isspace(&my_charset_latin1, *str) ; )
+    str++;
 
   if (str >= end)
     goto ret_edom;
@@ -1726,10 +1727,20 @@
           goto ret_sign;
         }
       }
-      for (exponent= 0 ;
-           str < end && (ch= (uchar) (*str - '0')) < 10;
-           str++)
+      if (shift > 0 && !negative_exp)
+        goto ret_too_big;
+      for (exponent= 0 ; str < end && (ch= (uchar) (*str - '0')) < 10; str++)
       {
+        if (negative_exp)
+        {
+          if (exponent - shift > DIGITS_IN_ULONGLONG)
+            goto ret_zero;
+        }
+        else
+        {
+          if (exponent + shift > DIGITS_IN_ULONGLONG)
+            goto ret_too_big;
+        }
         exponent= exponent * 10 + ch;
       }
       shift+= negative_exp ? -exponent : exponent;
diff -Nru mariadb-10.3-10.3.18/strings/json_lib.c mariadb-10.3-10.3.22/strings/json_lib.c
--- mariadb-10.3-10.3.18/strings/json_lib.c	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/strings/json_lib.c	2020-01-26 18:37:30.000000000 +0000
@@ -320,15 +320,17 @@
     if (s->c_next != '\\')
       return s->error= JE_SYN;
 
+    s->c_str+= c_len;
     if ((c_len= json_next_char(s)) <= 0)
       return s->error= json_eos(s) ? JE_EOS : JE_BAD_CHR;
     if (s->c_next != 'u')
       return s->error= JE_SYN;
+    s->c_str+= c_len;
 
     if (read_4_hexdigits(s, code+2))
       return 1;
 
-    if ((c_len= my_utf16_uni(0, &s->c_next, code, code+4)) == 2)
+    if ((c_len= my_utf16_uni(0, &s->c_next, code, code+4)) == 4)
       return 0;
   }
   return s->error= JE_BAD_CHR;
@@ -823,6 +825,11 @@
 static int skip_key(json_engine_t *j)
 {
   int t_next, c_len;
+
+  if (json_instr_chr_map[j->s.c_next] == S_BKSL &&
+      json_handle_esc(&j->s))
+    return 1;
+
   while (json_read_keyname_chr(j) == 0) {}
 
   if (j->s.error)
diff -Nru mariadb-10.3-10.3.18/strings/my_strtoll10.c mariadb-10.3-10.3.22/strings/my_strtoll10.c
--- mariadb-10.3-10.3.18/strings/my_strtoll10.c	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/strings/my_strtoll10.c	2020-01-26 18:37:30.000000000 +0000
@@ -98,18 +98,25 @@
   if (endptr)
   {
     end= *endptr;
-    while (s != end && (*s == ' ' || *s == '\t'))
+    /* Skip leading spaces */
+    for ( ; s < end && my_isspace(&my_charset_latin1, *s) ; )
       s++;
+
     if (s == end)
       goto no_conv;
   }
   else
   {
     endptr= &dummy;				/* Easier end test */
-    while (*s == ' ' || *s == '\t')
-      s++;
-    if (!*s)
-      goto no_conv;
+    /* Skip leading spaces */
+    for ( ; ; s++)
+    {
+      if (!*s)
+        goto no_conv;
+      if (!my_isspace(&my_charset_latin1, *s))
+        break;
+    }
+
     /* This number must be big to guard against a lot of pre-zeros */
     end= s+65535;				/* Can't be longer than this */
   }
diff -Nru mariadb-10.3-10.3.18/support-files/CMakeLists.txt mariadb-10.3-10.3.22/support-files/CMakeLists.txt
--- mariadb-10.3-10.3.18/support-files/CMakeLists.txt	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/CMakeLists.txt	2020-01-26 18:37:30.000000000 +0000
@@ -68,11 +68,12 @@
     IF(CHECKMODULE AND SEMODULE_PACKAGE)
       FOREACH(pol mariadb)
         SET(src ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.te)
-        SET(tmp ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${pol}-pp.dir/${pol}.mod)
+        SET(tmp ${CMAKE_CURRENT_BINARY_DIR}/${pol}.mod)
         SET(out ${CMAKE_CURRENT_BINARY_DIR}/${pol}.pp)
         ADD_CUSTOM_COMMAND(OUTPUT ${out}
           COMMAND ${CHECKMODULE} -M -m ${src} -o ${tmp}
           COMMAND ${SEMODULE_PACKAGE} -m ${tmp} -o ${out}
+          COMMAND ${CMAKE_COMMAND} -E remove ${tmp}
         DEPENDS ${src})
         ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out})
         INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles)
diff -Nru mariadb-10.3-10.3.18/support-files/mariadb.service.in mariadb-10.3-10.3.22/support-files/mariadb.service.in
--- mariadb-10.3-10.3.18/support-files/mariadb.service.in	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/mariadb.service.in	2020-01-26 18:37:30.000000000 +0000
@@ -1,16 +1,22 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades.  If you want to customize, the
+# best way is to create a file "/etc/systemd/system/mariadb.service",
+# containing
+#	.include /usr/lib/systemd/system/mariadb.service
+#	...make your changes here...
+# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
+# which doesn't need to include ".include" call and which will be parsed
+# after the file mariadb.service itself is parsed.
 #
-# /etc/systemd/system/mariadb.service
+# For more info about custom unit files, see systemd.unit(5) or
+# https://mariadb.com/kb/en/mariadb/systemd/
+#
+# Copyright notice:
 #
 # This file 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.
-#
-# Thanks to:
-# Daniel Black
-# Erkan Yanar
-# David Strauss
-# and probably others
 
 [Unit]
 Description=MariaDB @VERSION@ database server
@@ -81,11 +87,12 @@
 # This isn't a replacement for my.cnf.
 # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
 ExecStart=@sbindir@/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
-@SYSTEMD_EXECSTARTPOST@
 
 # Unset _WSREP_START_POSITION environment variable.
 ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
 
+@SYSTEMD_EXECSTARTPOST@
+
 KillSignal=SIGTERM
 
 # Don't want to see an automated SIGKILL ever
@@ -119,6 +126,13 @@
 # LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
 PrivateTmp=false
 
+# Set an explicit Start and Stop timeout of 900 seconds (15 minutes!)
+# this is the same value as used in SysV init scripts in the past
+# Galera might need a longer timeout, check the KB if you want to change this:
+# https://mariadb.com/kb/en/library/systemd/#configuring-the-systemd-service-timeout
+TimeoutStartSec=900
+TimeoutStopSec=900
+
 ##
 ## Options previously available to be set via [mysqld_safe]
 ## that now needs to be set by systemd config files as mysqld_safe
diff -Nru mariadb-10.3-10.3.18/support-files/mariadb@.service.in mariadb-10.3-10.3.22/support-files/mariadb@.service.in
--- mariadb-10.3-10.3.18/support-files/mariadb@.service.in	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/mariadb@.service.in	2020-01-26 18:37:30.000000000 +0000
@@ -1,28 +1,35 @@
 # Multi instance version of mariadb. For if you run multiple versions at once.
-# Also used for mariadb@bootstrap to bootstrap Galera.
 #
-# create config file @sysconf2dir@/my{instancename}.cnf
+# create config file @sysconf2dir@/my{instancename}.cnf to be used as the
+# configuration file for this service.
 #
 # start as systemctl start mariadb@{instancename}.server
-
+#
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades.  If you want to customize, the
+# best way is to create a file "/etc/systemd/system/mariadb@.service",
+# containing
+#	.include /usr/lib/systemd/system/mariadb@.service
+#	...make your changes here...
+# or create a file "/etc/systemd/system/mariadb@.service.d/foo.conf",
+# which doesn't need to include ".include" call and which will be parsed
+# after the file mariadb@.service itself is parsed.
+#
+# For more info about custom unit files, see systemd.unit(5) or
+# https://mariadb.com/kb/en/mariadb/systemd/
+#
+# Copyright notice:
+#
 # This file 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.
-#
-# Thanks to:
-# Daniel Black
-# Erkan Yanar
-# David Strauss
-# and probably others
-# Inspired from https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-db/mysql-init-scripts/files/mysqld_at.service
 
 [Unit]
-Description=MariaDB @VERSION@ database server (multi-instance)
+Description=MariaDB @VERSION@ database server (multi-instance %I)
 Documentation=man:mysqld(8)
 Documentation=https://mariadb.com/kb/en/library/systemd/
 After=network.target
-
 ConditionPathExists=@sysconf2dir@/my%I.cnf
 
 [Install]
@@ -67,6 +74,8 @@
 # Execute pre and post scripts as root, otherwise it does it as User=
 PermissionsStartOnly=true
 
+@SYSTEMD_EXECSTARTPRE@
+
 # Perform automatic wsrep recovery. When server is started without wsrep,
 # galera_recovery simply returns an empty string. In any case, however,
 # the script is not expected to return with a non-zero status.
@@ -107,6 +116,8 @@
 # Unset _WSREP_START_POSITION environment variable.
 ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION%I"
 
+@SYSTEMD_EXECSTARTPOST@
+
 KillSignal=SIGTERM
 
 # Don't want to see an automated SIGKILL ever
@@ -140,6 +151,13 @@
 # LOAD DATA INFILE you can enable PrivateTmp=true for a little more security.
 PrivateTmp=false
 
+# Set an explicit Start and Stop timeout of 900 seconds (15 minutes!)
+# this is the same value as used in SysV init scripts in the past
+# if you need a longer timeout, check the KB:
+# https://mariadb.com/kb/en/library/systemd/#configuring-the-systemd-service-timeout
+TimeoutStartSec=900
+TimeoutStopSec=900
+
 ##
 ## Options previously available to be set via [mysqld_safe]
 ## that now needs to be set by systemd config files as mysqld_safe
diff -Nru mariadb-10.3-10.3.18/support-files/mysql-log-rotate.sh mariadb-10.3-10.3.22/support-files/mysql-log-rotate.sh
--- mariadb-10.3-10.3.18/support-files/mysql-log-rotate.sh	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/mysql-log-rotate.sh	2020-01-26 18:37:30.000000000 +0000
@@ -1,9 +1,9 @@
 # This logname can be set in /etc/my.cnf
-# by setting the variable "err-log"
-# in the [safe_mysqld] section as follows:
+# by setting the variable "log-error"
+# in the [mysqld] section as follows:
 #
-# [safe_mysqld]
-# err-log=@localstatedir@/mysqld.log
+# [mysqld]
+# log-error=@localstatedir@/mysqld.log
 #
 # If the root user has a password you have to create a
 # /root/.my.cnf configuration file with the following
@@ -21,7 +21,7 @@
 @localstatedir@/mysqld.log {
         # create 600 mysql mysql
         notifempty
-	daily
+        daily
         rotate 3
         missingok
         compress
diff -Nru mariadb-10.3-10.3.18/support-files/rpm/server-postin.sh mariadb-10.3-10.3.22/support-files/rpm/server-postin.sh
--- mariadb-10.3-10.3.18/support-files/rpm/server-postin.sh	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/rpm/server-postin.sh	2020-01-26 18:37:30.000000000 +0000
@@ -16,7 +16,8 @@
 # Make MySQL start/shutdown automatically when the machine does it.
 if [ $1 = 1 ] ; then
   if [ -x /usr/bin/systemctl ] ; then
-          /usr/bin/systemctl daemon-reload >/dev/null 2>&1
+          /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+          /usr/bin/systemctl preset mariadb.service >/dev/null 2>&1 || :
   elif [ -x /sbin/chkconfig ] ; then
           /sbin/chkconfig --add mysql
   fi
diff -Nru mariadb-10.3-10.3.18/support-files/rpm/server-preun.sh mariadb-10.3-10.3.22/support-files/rpm/server-preun.sh
--- mariadb-10.3-10.3.18/support-files/rpm/server-preun.sh	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/rpm/server-preun.sh	2020-01-26 18:37:30.000000000 +0000
@@ -9,7 +9,7 @@
                 %{_sysconfdir}/init.d/mysql stop > /dev/null
         fi
         if [ -x /sbin/chkconfig ] ; then
-                /sbin/chkconfig --del mysql > /dev/null 2>&1
+                /sbin/chkconfig --del mysql > /dev/null 2>&1 || :
         fi
 fi
 
diff -Nru mariadb-10.3-10.3.18/support-files/use_galera_new_cluster.conf mariadb-10.3-10.3.22/support-files/use_galera_new_cluster.conf
--- mariadb-10.3-10.3.18/support-files/use_galera_new_cluster.conf	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/support-files/use_galera_new_cluster.conf	2020-01-26 18:37:30.000000000 +0000
@@ -15,8 +15,11 @@
 Type=oneshot
 Restart=no
 
+ExecStartPre=
+
 # Override the multi instance service for a bootstrap start instance
 ExecStart=
 ExecStart=/usr/bin/echo "Please use galera_new_cluster to start the mariadb service with --wsrep-new-cluster"
 ExecStart=/usr/bin/false
 
+ExecStartPost=
diff -Nru mariadb-10.3-10.3.18/wsrep/wsrep_api.h mariadb-10.3-10.3.22/wsrep/wsrep_api.h
--- mariadb-10.3-10.3.18/wsrep/wsrep_api.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/wsrep/wsrep_api.h	2020-01-26 18:37:30.000000000 +0000
@@ -990,7 +990,7 @@
     void (*stats_free) (wsrep_t* wsrep, struct wsrep_stats_var* var_array);
 
   /*!
-   * @brief Reset some stats variables to inital value, provider-dependent.
+   * @brief Reset some stats variables to initial value, provider-dependent.
    *
    * @param wsrep provider handle.
    */
diff -Nru mariadb-10.3-10.3.18/wsrep/wsrep_gtid.c mariadb-10.3-10.3.22/wsrep/wsrep_gtid.c
--- mariadb-10.3-10.3.18/wsrep/wsrep_gtid.c	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/wsrep/wsrep_gtid.c	2020-01-26 18:37:30.000000000 +0000
@@ -42,7 +42,7 @@
             gtid->seqno = strtoll(str + offset, &endptr, 0);
 
             if (errno == 0) {
-                offset = endptr - str;
+                offset = (unsigned int)(endptr - str);
                 return offset;
             }
         }
diff -Nru mariadb-10.3-10.3.18/zlib/zlib.h mariadb-10.3-10.3.22/zlib/zlib.h
--- mariadb-10.3-10.3.18/zlib/zlib.h	2019-09-08 16:53:01.000000000 +0000
+++ mariadb-10.3-10.3.22/zlib/zlib.h	2020-01-26 18:37:30.000000000 +0000
@@ -1440,7 +1440,7 @@
    provided, but could be inferred from the result of gztell().  This behavior
    is the same as the behavior of fread() implementations in common libraries,
    but it prevents the direct use of gzfread() to read a concurrently written
-   file, reseting and retrying on end-of-file, when size is not 1.
+   file, resetting and retrying on end-of-file, when size is not 1.
 */
 
 ZEXTERN int ZEXPORT gzwrite OF((gzFile file,